Open Display Files as Record Files - IBM-ILE

To open an iSeries display file or subfile as a record file, use the _Ropen() function with one of the following modes:

•rr •wr and ar •ar+ •rr+ and wr+

The valid keyword parameters are:

•lrecl •indicators •secure •riofb

I/O Considerations for Record Display Files

The program device that is associated with display files is a workstation.You establish the default device by implicitly acquiring it using the _Ropen() function. The implicitly acquired program device is determined by the DEV parameter on the CRTDSPF, CHGDSPF, or OVRDSPF commands. If *REQUESTER is specified on the DEV parameter, then the program device from which the program was called is implicitly acquired. It becomes the default program device for I/O operations to the display file.

If *NONE is specified on the DEV parameter of the CRTDSPF, CHGDSPF, or OVRDSPF commands, you must explicitly acquire the program device with the _Racquire() function. The explicitly acquired program device now becomes the default device for subsequent I/O operations to the device file.

You can change the default program device in the following ways:

  • Use the Racquire() function to explicitly acquire another program device. The device that is just acquired becomes the current program device.
  • Use the _Rpgmdev() function to change the current program device that is associated with a file to a previously-acquired device. This program device can be used for subsequent input and output operations to the file.
  • The actual program device that is read becomes the default device if you read from an invited device using the _Rreadindv() function.
  • Use the _Rrelease() function to release a device from the file. When you release the device, it is no longer available for I/O operations.

I/O Considerations for Record Subfiles

I/O operations to the subfile record format do not cause data to appear on the display. You must read or write the subfile control record format to transfer data to or from the display. Use the _Rformat() function to distinguish between subfile record formats and subfile control formats. If the format you specify with the _Rformat() function refers to a subfile record format, no data is transferred to or from the display.

To read the next changed subfile record, use the _Rreadnc() function. This function searches for the next changed record from the current position in the file. If this is the first read operation, the first changed record in the subfile is read.If the end-of-file is reached before finding a changed record, EOF is returned in the num_bytes field of the _RIOFB_T structure.

Record Functions for Display Files and Subfiles

Use the following record functions to process display files and subfiles:

Record Functions for Display Files and Subfiles


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

IBM-ILE Topics