I have a text file of source code that I have downloaded saved in the IFS. If anyone cares, it is Scott Klement's IFSIO_H file, a header file that contains RPG prototypes for using the Integrated File System. I would like to store this code in the library file system with my other source code, so I can use it as a /copy
member from my RPG programs.
I expected to perform this copy with the CPYFRMSTMF command:
CPYFRMSTMF FROMSTMF('/QOpenSys/xxxxxxxx/ifsio_h.rpgle.txt') TOMBR('/QSYS.LIB/QGPL.LIB/QRPGLESRC.FILE/IFSIO_H.MBR')
This fails with the messages 'Database file CCSID is 65535.' and 'Stream file not copied.'. It is true that the destination file uses the default CCSID, as all my source code files do, but nothing I try to put in for conversion information in other parameters makes any difference.
Is there a way to perform the copy that I want using this command? Is there a different command I should be using instead?
Based on the error message, one might expect that any copying to a file with a CCSID of 65535 is not allowed, but I know that not to be true. I often upload printer file overlays using this command like:
CPYFRMSTMF FROMSTMF('/QOpenSys/xxxxxxxx/xxxxxx.plt')
TOMBR('/QSYS.LIB/QGPL.LIB/AFPIMAGES.FILE/xxxxxx.MBR')
MBROPT(*REPLACE) CVTDTA(*NONE) ENDLINFMT(*FIXED) TABEXPN(*NO)
This successfully copies an overlay plot file that I make in AutoCAD using a AFP print driver to the QGPL/AFPIMAGES file, after which I can run the CRTOVL
command to create a printer overlay. I just checked and QGPL/AFPIMAGES is at the default 65535 CCSID same as the QGPL/QRPGLESRC file. This means that this command can write to a file member some of the time, but I either have my parameters wrong, or there is something else about the QRPGLESRC source code file causing this problem.