The fwrite() function returns the number of elements that are successfully written. When you use PDATA, the value returned by the fwrite() function does not take PDATA into consideration. When using PDATA, errno is set to ETRUNC even though all the data was successfully written.
The program device that is associated with ICF files is a communications session. You establish the default device by implicitly acquiring it using the fopen() function.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.