Académique Documents
Professionnel Documents
Culture Documents
Objectives:
Describe the RPG Specification forms Create a simple read/write RPG program Explain how to include comment lines in a program Explain how to do output editing to control the appearance of a report
Specifications in RPG IV
Different specifications for different purposes File Description Specifications Input Specifications Definition Specifications Calculation Specifications Output Specifications
Input Specifications
Record Identification Entries
File Name Sequence
Output Specifications
Record Identification Entries
File Name Type Exception Name Space and Skip Entries
Calculation Specifications
Except Read Dow Enddo Eval Return
Internal Documentation
Comment lines * in position 7
Edit Codes
Commas Print No Zero Sign Yes Yes 1 Yes No 2 No Yes 3 No No 4 C Right - Floating R A J N B K O C L P D M Q
Edit Words
This Value 999999999 999999999 1234123412 00012^14 00012^14 05612^14 with this edit word bbb-bb-bbbb bbb&bb&bbbb 0(bbb)bbb-bbbb bbb$0.bb $bbbb0.bb $bb,bb0.bb prints as 999-99-9999 999 99 9999 (123)412-3412 $12.14 $ 12.14 $ 5,612.14
Points to Remember
RPG programs are written as fixedform specifications. Different specification forms convey different kinds of information to the RPG compiler File Specifications contain descriptions of all files used within a program.