Thursday, March 6, 2008

Are you /FREE:

• Free form RPG was introduced in V5R1 of OS/400. For those of you who have not tried it yet, these are the rules for coding in free form.
• Free form code is placed between the /FREE and /END-FREE compiler directives.
• The structure of an operation is the operation code followed by Factors 1, 2, and the Result Field.

• Each statement must end with a semicolon (;).
• Operands are no longer limited to 14 characters, especially for operations that used Factor 1.
• No blanks are allowed between an operation code and extenders.
• Only one operation code may be coded on a line.
• Comments are delimited by //. Comments may be placed at the end of any free-form statement (after the ;).
• Some operation codes are not currently supported (more in a moment).
• Some operation codes (such as CALLP and EVAL) are optional, except where an extender is needed.

No comments: