CHAIN (RANDOM FILE ACCESS)


In Example 11.1, the file CUSTINQ is defined on line 1 as a combined, full-procedural, workstation file. The SFILE keyword defines the DISPLIST subfile and assigns the RRN field as the relative record number field used when processing this subfile. Lines 2 to 9 fill the subfile with information from a database file. Line 10 uses the CHAIN operation to randomly access the fifth subfile record. If the record exists, data is returned to the program. If the record does not exist, resulting indicator 1 (indicator 71) is set on.




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