Specifying Indicators in a Separate Indicator Area - IBM-ILE

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.

Example

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.

  1. To create the display file T1520DD0 using the DDS source shown below, type:
  2. CRTDSPF FILE(MYLIB/T1520DD0) SRCFILE(QCLE/QADDSSRC)

    T1520DD0 — DDS Source for a Phone Book Display

    DDS Source for a Phone Book Display

  3. To create the program T1520ID2 using the source shown below, type:
  4. CRTBNDC PGM(MYLIB/T1520ID2) SRCFILE(QCLE/QACSRC)

    T1520ID2 — ILE C Source to Specify Indicators in a Separate Indicator Area

    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.

  5. To run the program T1520ID2, type:
  6. CALL PGM(MYLIB/T1520ID2)

    The output is as follows:

    Figure

     output is as follows


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM-ILE Topics