Monday, 3 December 2018

Score Card for RPGLE Programming Original


Image result for rpg iSeries score card

Here’s a self-assessment score card that will provide insight into your knowledge of ILE RPG. Many of the skills listed here require knowledge of newer or more advanced ILE RPG language features and are essential to incorporating contemporary "best practices" into your development work.
Each entry below asks you to rate your knowledge of a particular ILE RPG feature.
This self-assessment isn’t intended as a comprehensive test of essential RPG programming skills, such as declaring and using files. Most RPG language features for core programming tasks, such as file I/O, have been around a long time, many dating back even to RPG III on the S/38. Essentially, the self-assessment here is meant to provide a measure of how well you’re keeping up with more recent ILE RPG programming skills that can help you write better-structured, more flexible, and more reliable programs. 

For each of the ILE RPG features listed, rate your knowledge using the following scale:
0 — Know very little about why or how to use the feature
1 — Have some idea what the feature does, but not sure how to use it
2 — Have enough basic understanding to use the feature in limited ways
3 — Have a full understanding of when and how to use the feature 

When you’ve completed the inventory, you sum your individual ratings to see how you stand. 

Control (H) Specifications
You can use H-specs to control a variety of important compilation options. In many cases, an H-spec keyword is equivalent to a parameter you can specify on the CrtBndRpg and CrtRpgMod commands.
Several H-spec keywords are covered in other sections of the assessment. This section includes useful keywords that don’t fit neatly elsewhere.
Rate your knowledge about the following H-spec keywords, and give a brief summary of your understanding:
1. ActGrp and DftActGrp

2. NoMain

3. Optimize

4. Option( *NoExpDds )

5. UsrPrf

File (F) Specifications and Database Operations
Externally described files have been around since the first S/38 shipped. They’re a core OS/400 feature that a competent RPG programmer must master. But several features that have been around for a while (e.g., user-controlled opens and transaction support) aren’t yet as widely used as they should be. And a few newer features, such as specifying which library, file, and or member should be opened, belong in every programmer’s arsenal.
Rate your knowledge about the following F-spec keywords, and give a brief summary of your understanding:
6. Commit

7. ExtFile and ExtMbr

8. IndDs
 
9. UsrOpn
   
Rate your knowledge about the following D-spec keywords, and give a brief summary of your understanding:
10. Using LikeDs(…: *Key) and LikeRec(…: *Key) to declare a key data structure.
Rate your knowledge about the following database I/O operation features, and give a brief summary of your understanding:
11. Open and Close operations
           
12. Using %KDS function or free-form key list in a keyed I/O operation

13. Using %Fields function in an Update operation

14. *Start and *End special values for SetLL operation

Rate your knowledge about the following transaction support features, and give a brief summary of your understanding:
15. Commit and Rollbk operations

Definition (D) Specifications: General Features
If you’re still programming with D-specs as they existed several years ago, it’s time to crack the books and get familiar with newer features.
This section focuses on features common to different kinds of variable declarations. The Procedure
Definition section covers parameter declarations. Several other sections include additional D-spec features, as well.
Rate your knowledge about declaring and using the following types of variables, and give a brief summary of your understanding:
16. Variables with long names (i.e., greater than fourteen characters)

17. Mnemonics (named constants)

18. Variable-length character variables

19. Boolean (indicator) variables
           
20. Data structures with qualified subfield names


Rate your knowledge about the following D-spec keywords, and give a brief summary of your understanding:
21. Like
           
22. LikeDs and LikeRec

23. NoOpt

24. Overlay

25. Prefix

Runtime Feedback and Error Handling
A programmer must have familiarity with ILE RPG’s facilities for obtaining runtime feedback, including detection and handling of runtime errors. A mix of old and new features provides the foundation for this aspect of professional RPG programming.
Rate your knowledge about the following runtime feedback structures, and give a brief summary of your understanding:
26. File Information Data Structure

27. Program Status Data Structure

Rate your knowledge about the following error detection and handling features, and give a brief summary of your understanding:
28. (E) opcode extender                              

29. *PSSR subroutine

30. Monitor blocks

Rate your knowledge about the following error and I/O status built-in functions, and give a brief summary of your understanding:
31. %Eof

32. %Equal

33. %Error

34. %Found

35. %Open

36. %Status

Extended and Free-Format Syntax:
It’s now possible to write almost every bit of executable code using a more readable and flexible free-format syntax. Okay, so your nice-looking program might still be broken up by the notoriously clunky P- and D-specs to define subprocedures. Still, it’s way past time to master and use free format wherever you can.
Rate your knowledge about free-format syntax and features, and give a brief summary of your understanding:
37. Coding arithmetic and string expressions.

38. (E) and (M) operation extenders

39. Coding assignments without an explicit Eval opcode.

40. Using free-format syntax and Boolean expressions for control operations (e.g., If and For opcodes).

41. Using free-format version of opcodes for I/O and other operations.

Rate your knowledge about these equivalent built-in functions for fixed-format opcode capabilities, and give a brief summary of your understanding:
42. %BitAnd, %BitOr, %BitNot

43. %Char and other data conversion functions

44. %Check and %CheckR

45. %Date, %Time, and %Timestamp

46. %Diff, %Years, and %Months

47. %Div and %Rem

48. %EditC and %EditW

49. %Lookup and %Tlookup (including binary search feature)

50. %Occur

51. %Scan

52. %SubArr

53. %ShtDn

54. %SubDt

55. %SubSt

56. %Xlate

57. %Xfoot

Array Declaration and Processing Features
Arrays are ubiquitous in application programs, and ILE RPG’s support has been significantly improved in recent releases. If you still think "array" means "multiple-occurrence data structure," it’s time to discover what you can now do with the real thing.
Rate your knowledge about the following D-spec features, and give a brief summary of your understanding:
58. Declaring two-dimensional arrays

59. Declaring arrays whose elements are data structures

60. Using the Inz and Overlay keywords to specify initial values for an array.

Rate your knowledge about the following function and feature:
61. %Elem

62. Using "* " to reference all elements

Based Variables and Dynamic Storage Features
Based variables and dynamic storage allocation provide greater flexibility in programs. Modern languages, such as Java, take care of storage management for you. But at least now ILE RPG lets you do such things as allocate an array with varying numbers of elements. In ILE RPG, based variables and pointers are the key to dynamic storage and are also necessary to exploit some system APIs.
Rate your knowledge about declaring and using the following types of variables, and give a brief summary of your understanding:
63. Pointer variables

64. Based variables

Rate your knowledge about the following functions and features, and give a brief summary of your understanding:
65. %Addr function   

66. %Alloc, %Dealloc, and %Realloc functions

67. Pointer arithmetic (incrementing/decrementing addresses; using offsets with addresses)

User-defined Procedures and Functions
Procedures and functions are the fundamental building blocks for modular programming, a practice that is essential to managing the development and modification of complex software. If you’re not writing procedures in your new ILE RPG code you’re about twenty years behind contemporary programming practices.
Rate your knowledge about defining procedures and functions, and give a brief summary of your understanding:
68. Declaring a procedure prototype (PR D-spec)
           
69. Defining a procedure — Begin-procedure and End-procedure specifications (P-specs)

70. Declaring a procedure interface (PI) D-spec

71. Declaring procedure parameters (basic techniques)

72. Declaring and using data structure parameters

73. Declaring and using array parameters
           
74. Declaring and using variable-length parameters (*VarSize option)

75. Declaring and using variable-length character-string parameters (*VarSize and *String options)

76. Choosing when to pass parameters by value vs. by reference (Value keyword)

77. Declaring and using read-only parameters (Const keyword)

78. Declaring and using optional parameters (*NoPass and *Omit options)

79. Declaring local variables in a procedure

80. The difference between local vs. global scope of identifiers

81. The difference between static vs. automatic storage for local variables (Static keyword)

Rate your knowledge about implementing procedures and functions, and give a brief summary of your understanding:
82. %Parms function
           
83. Return expression opcode (to return a function result)

Rate your knowledge about calling procedures and functions, and give a brief summary of your understanding:
84. CallP opcode

85. The difference between a dynamic program call (Call or CallP) vs. a static procedure call (CallB or CallP)

Source Code Inclusion Features
Code reuse is one of the simplest, yet most powerful techniques to save time and improve
consistency.
Rate your knowledge about the following source code inclusion features, and give a brief summary of your understanding:
86. Option( *NoShowCpy ) keyword on H-spec

87. /Copy compiler directive

88. /Include compiler directive

89. /Eof compiler directive

Conditional Compilation
Conditional compilation is another simple technique that’s immensely useful for testing, problem diagnosis, and expanded code reuse.
Rate your knowledge about the following conditional compilation features, and give a brief summary of your understanding:
90. Option( *NoShowSkp ) keyword on H-spec

91. /Define and /Undefine compiler directives

92. /If, /Else, /ElseIf, and /EndIf compiler directives

93. Define parameter on CrtBndRpg and CrtRpgMod commands

OS/400 ILE Modular Programming Features
To practice modular programming with ILE RPG, you must understand related OS/400 ILE features for creating and running programs and service programs.
Rate your knowledge about the following OS/400 ILE features, and give a brief summary of your understanding:
94. Creating a program from multiple modules (CrtPgm command)
           
95. Creating a service program from multiple modules (CrtSrvPgm command)

96. Creating a program or service program with references to procedures in a (different) service program

97. Specifying an activation group for a program or service program

98. Bind-by-copy vs. bind-by-reference

99. Exporting procedure names

100. Using binder language

101. Using a binding directory

Completion
Thank you for taking the time to complete this score card.

No comments:

Post a Comment

Popular Posts