To use indicators as a separate structure you must specify:
You must also set the address of the separate indicator area by using the _Rindara() function for record files, before performing I/O operations.
If indicators are requested, and exist in the format, a 99-byte structure definition is created. The structure definition contains a field declaration for each indicator defined in the DDS. The name of each field is INXX, where XX is the DDS indicator number. The sequence of bytes between indicators is defined as INXX_INYY, where XX is the first undefined byte and YY is the last undefined byte in a sequence.
Figure 122. DDS Source for Indicators
|
#pragma mapinc("example/temp","exindic/test(fmt)","indicators","") #include "example/temp"
When this DDS is included in your ILE C/C++ program, the following structure is generated:
Figure 123. Structure Definition for Indicators
|
This shows a type definition of a structure for the indicators in the format FMT of the file EXINDIC/TEST. The external file description contains three indicators: IN50, IN51, and IN99. The DDS keyword INDARA is also specified in the DDS for the file.
If indicators are defined for a record format and the INDICATOR option is not specified on the #pragma mapinc directive or GENCSRC command, a list of the indicators in the DDS is included as a comment in the header description.
The following shows the header description created when the file description
for the file EXINDIC/TEST is included in your program and the indicators
option is not specified on the #pragma mapinc directive.
Figure 124. Header Description Showing Comments for Indicators
|
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.