NESTED CODE ILLUSTRATION


Nested DO, DOWxx, DOUxx, FOR, SELECT/WHENxx, and IF/THEN/ELSE levels appear in several examples. Occasionally a graphic is used to illustrate nesting levels. The source code may be indented for clarity and does not represent exact coding statement, but rather the nesting level of the source code. Example 5.3 illustrates this indented nesting graphic. The operation code columns are extended in this nested view of RPG source code.

Example 5.3: Graphic illustration of RPG nesting.

start example
 .....CL0n01Factor1+++++++<26   to      35>Factor2+++++++Result++++++++Len++DcHiLoEq      C                   IF               %Status = 0      C                   | DOW            %eof(CUSTMAST) = *OFF AND Count <= 20      C                   | | WRITE        SFL001      C                   | | IF           NOT %EOF(SFL001)      C                   | | | ADD        1             COUNT      C                   | | | READ       CUSTMAST      C                   | | ENDIF      C                   | ENDDO      C                   ENDIF 
end example




The Modern RPG IV Language
The Modern RPG IV Language
ISBN: 1583470646
EAN: 2147483647
Year: 2003
Pages: 156
Authors: Robert Cozzi

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net