Sunday, April 08, 2007

RPG on the AS/400 - Free, /FREE simple guidelines

RPG FREE has some simple guidelines beyond just the commands that really are more like uber strict rules. I'd like to mention a few here just to give you a heads up.

1. Every statement must end with a semi-colon, ;.
Note statement versus line.

2. A statement may continue onto the more than one line.
Note that you do not place a semi-colon on every line, just at the end of the statement.

3. For built in functions, case is not significant.
In other words, Chain, CHAIN, and chain are all the same.

4. For everything else, case matters for all characters.
In other words, a variable of name TCost is not the same variable as tCost, or TCOst. Case matters.

5. The format for existing commands such as Chain, ReadE, and SetLl is no longer

Factor1 Commmand Factor2


Command Factor1 Factor2

6. Want to do a Chain now? Instead of a key list built like this

KFLD myFld1
KFLD myFld2

myKey Chain myFile 79

now you can do this

Chain (myFld1: myFld2) myFileFormat;
If %Found;

Guess which I prefer?

If you have more gotcha type tips, be sure to forward them along to

Thanks for visiting,

No comments: