So I'm learning RPG IV just because I want to... and I'm having trouble finding code examples that actually make sense. Right now I'm at an exercise in the book that I have no idea how to complete.. Would anyone be able to take a look and give me some steps or advice on how to do this?
This is the exercise in the book:
This next one is the externally described file that needs to be used in the exercise:
Can anyone help with this?
Read the book. I know the books can be difficult to follow along and never contain enough examples.
First check the data that's in the Before WUEXAMP and see data that in there. This is know if you will have to manipulate any of the data and check for verification for the data. For example you would wand grades that contain 999 and negative values.
After you know what kind of data you are working in, create pseudocode. This will help out and avoid logical errors in the future. Plus, this is a great habit to get into.
Luckily this is a mostly simple report. Declare all Variables. In your basic logical this should be in the loop While not
After the loop:
Make sure to have the rest of the basics. Name things accordingly. Instead of Write it should be Except if your records are internally described in O(output ) specs
Common Errors:
and
The '/' should be placed in the 7th column. None of the code within the free should be before the 8th column.
Check Chapter 2 for a completed program example of that book. (Programming in RPG IV by Jim Buck) There aren't many examples of RPG programs out there.
Useful links for the future. http://www.jaymoseley.com/hercules/rpgtutor/rpg002.htm#FileDescription http://www.jaymoseley.com/hercules/rpgtutor/rpg011.htm
Good Luck and always comment and document your code.