Page 1 of 1

IFSIO OPEN

Posted: Thu May 11, 2023 5:51 pm
by fanmechanic
Not sure if this is the right place, but since the IFSIO_H member is in FTPAPI....

We process inbound files from the IFS and it has been fine for years. A few days ago we upgraded from 7.2 to 7.4 and suddenly we can't open files for read. The process to open new files to write and send is Ok. debugging shows the generic -1 value for the file descriptor.

FD = OPEN(%TRIM(FILE) :O_RDONLY+O_TEXTDATA);

Any ideas to point me in the right direction are greatly appreciated.

Re: IFSIO OPEN

Posted: Thu May 11, 2023 6:13 pm
by fanmechanic
i was able to retrieve the errmsg ad got "identifier does not exist". more research

Re: IFSIO OPEN

Posted: Thu May 11, 2023 6:29 pm
by fanmechanic
correction, mistyped checking the error. real message is "conversion error"

Re: IFSIO OPEN

Posted: Thu May 11, 2023 6:59 pm
by fanmechanic
for some reason since the OS upgrade the files are now CCSID 1208, not 819 like they were before.

Re: IFSIO OPEN

Posted: Mon May 15, 2023 3:20 pm
by Scott Klement
Moving thread to general RPG forum...

Re: IFSIO OPEN

Posted: Mon May 15, 2023 3:22 pm
by Scott Klement
In order to read UTF-8 files, you need to enable CCSID support.

Code: Select all

fd = open(%TRIM(FILE) :O_RDONLY+O_TEXTDATA+O_CCSID: 0: 0);