The following example shows how to specify an indicator in a record that is read by program T1520ID1. The indicator is placed in the file buffer of an externally described file. The DDS for the externally described file contains one character indicator field.
Figure 139 shows the DDS source.
CRTDSPF FILE(MYLIB/T1520DD9) SRCFILE(QCPPLE/QADDSSRC)
CRTBNDC PGM(MYLIB/T1520ID1) SRCFILE(QCPPLE/QACSRC)
CALL PGM(MYLIB/T1520ID1)
The output is as follows:
+--------------------------------------------------------------------------------+ | PHONE BOOK | | Name: | | Address: | | Phone #: | | F3 - EXIT | +--------------------------------------------------------------------------------+
Figure 139. T1520DD9 -- DDS Source for a Phone Book Display
|
Figure 140. T1520ID1 -- ILE C Source to Specify Indicators as Part of the File Buffer
|
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.