On 08 May 2012 16:04, Stone, Joel wrote:
Trying to copy from Unix server to Iseries.

Finds file OK, but data is garbled. Any suggestions how to get this
to work?

CRTPF QTEMP/TEST1 RECLEN(111) only allows CCSID=65535

If I use DDS to create file, CPYFRMSTMF does not allow an
externally-described file as output.

===> CPYFRMSTMF FROMSTMF('qntc/serverName/ftp/CustomerFile')
TOMBR('qsys.lib/QTEMP.lib/TEST1.file/TEST1.mbr') MBROPT(*REPLACE)
CVTDTA(*AUTO) STMFCODPAG(*PCASCII) DBFCCSID(*FILE) ENDLINFMT(*CRLF)
TABEXPN(*NO)


A stream "text file" with records is more the equivalent to a "source physical file member." An externally described source file is supported as target for the TOMBR on that command. Use CRTSRCPF QTEMP/TEST1 RCDLEN(123) instead; optionally specify a CCSID() versus the probable default CCSID(*JOB).

If the data in the file.mbr TEST1.TEST1 was /garbled/ then presumably the data in the stream file CustomerFile was not the equivalent of *PCASCII. Use DSPF 'qntc/serverName/ftp/CustomerFile' and use F10=Hex to review the code points to verify the data, or issue DMP 'qntc/serverName/ftp/CustomerFile' to produce q QPSRVDMP spool file and review that for the hex data.

Regards, Chuck

This thread ...


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

This mailing list archive is Copyright 1997-2026 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.