The _Rwrite() function returns the number of characters that are successfully transferred across a communication line. When you use PDATA, unlike the _fwrite() function, the value that is returned by the _Rwrite() function (num_bytes) includes PDATA.
The program device that is associated with ICF files is a communications session. You establish the default device by implicitly acquiring it using the _Ropen() function. The implicitly acquired program device is determined by the ACQPGMDEV parameter on the CRTICFF, OVRICFF, or CHGICFF commands. If the program device name is specified on the ACQPGMDEV parameter the program device must be defined to the device file before it is opened. This is done by specifying the name on the PGMDEV parameter of the ADDICFDEVE or OVRICFDEVE commands.
If *NONE is specified for the ACQPGMDEV parameter of the CRTICFF, OVRICFF, or CHGICFF commands, you must explicitly acquire the program device using the _Racquire() function.
You can change the default program device in the following ways:
To release a program device, use the _Rrelease() function (the program device must have been previously acquired). This detaches the device from an open file; I/O operations can no longer be performed for this device. If you wish to use the device after releasing it, it must be acquired again.
All program devices are implicitly released when you close the file. If the device file has a shared open data path, the last close operation releases the program device.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.