You can specify indicators in records to be read or written by a program in a separate indicator area using the INDARA keyword in DDS.
The following example illustrates how indicators are returned in a separate indicator area. The INDARA keyword that is specified in the DDS means that the indicator for the display is returned to a separate indicator area.
Figure 137 shows the DDS source.
CRTDSPF FILE(MYLIB/T1520DD0) SRCFILE(QCPPLE/QADDSSRC)
CRTBNDC PGM(MYLIB/T1520ID2) SRCFILE(QCPPLE/QACSRC)
CALL PGM(MYLIB/T1520ID2)
The output is as follows:
+--------------------------------------------------------------------------------+ | | | PHONE BOOK | | Name: | | Address: | | Phone #: | | | | | | | | | | | | F3 - EXIT | | | +--------------------------------------------------------------------------------+
Figure 137. T1520DD0 -- DDS Source for a Phone Book Display
|
Figure 138. T1520ID2 -- ILE C Source to Specify Indicators in a Separate Indicator Area
|
This program uses response indicators IND_ON '1' and F3 2 to inform the ILE C program T1520ID2 that a user pressed F3. The _Rindara() function accesses the separate indicator buffer indicator_area associated with the externally described file T1520DD0. The display file T1520DD0 is opened with the keyword indicators=yes to return the indicator to a separate area.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.