Display Files, Intersystem Communication Files and Printer Files - IBM-ILE

Separate indicator areas, and major and minor return codes apply to display, ICF, and printer files.

I/O Considerations

Indicators allow information to be passed from a program to the system or from the system to a program. Display, ICF, and printer files can make use of indicators. Indicators are boolean data items that can contain a value of either 1 or 0 (character). There are two types of indicators:

Option Indicators pass information from a program to the system. For example, they can control which fields in a record can be displayed.

Response Indicators pass information from the system to an application when an input request finishes. For example, they can be used to inform the program which function keys were pressed by the workstation user.

To use indicators, the display, ICF, and printer files must be defined as an externally described file. The data description specification (DDS) for the externally described display file must contain a one-character INDICATOR field for each indicator. Indicators are either in the records read or written by the program (the indicators are in the file buffer) or in a separate indicator area.

Separate Indicator Areas

If you specify the INDARA keyword in the DDS, the indicators for the display, ICF, and printer files are returned in a separate indicator area. An indicator area is a 99-element character array with indices from 0-98.

The display, ICF, and printer files must be opened with the keyword indicators=y for the indicators to be specified in a separate indicator area. Use the _Rindara() function to identify the separate indicator buffer associated with the file.

If you do not specify the INDARA keyword in the DDS, the indicators for the display, ICF, or printer file will be specified in the record buffer. The number and order of the indicators that are defined in the DDS determine the number and order of the indicators in the record buffer. Indicators are always positioned first in the record buffer. The in_buf and out_buf pointers in the _RFILE structure point to the input and output record buffers for a file.

Major and Minor Return Codes

Major and minor return codes are used to report certain status information for display, ICF, and printer files. After a read (_Rreadindv() or _Rreadn()) or write (_Rwrite()) operation, the sysparm field in the _RIOFB_T structure points to the major/minor return code for the display, ICF or printer files. The header file <recio.h> declares the _RIOFB_T structure.

The Application Display Programming manual describes major and minor return codes and their meanings for display files. The Printer Device Programming manual describes major and minor return codes and their meanings for printer files.

Your program should test the return code after each I/O operation and define any error handling operations that are based on the major and minor return codes. If the major return code is 00, the operation completed successfully. If an error occurs with a display, ICF, or printer file your program should handle it as it occurs.

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

IBM-ILE Topics