On 2019-03-20 1:21 PM, Stephen Piland wrote:

I try and open the first file (and masterFd=1) using...
masterFd = open(%trim(masterFilename):O_WRONLY+O_CREAT+O_APPEND:1208);


When you specify O_CREAT, the third parameter represents the "mode", aka the permission bits.

For example
open(name:O_WRONLY+O_CREAT+O_APPEND:M_RDWR);

To specify the CCSID, you need to add O_CCSID to the open flags.

This presentation by Scott Klement should help with the open() parameters:
https://www.scottklement.com/presentations/RPG%20and%20the%20IFS.pdf

There may also be issues with how you are reading the second file. Could you show us how you are opening that one.


This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].