Not sure but we could use some additional info.
Can you run the command CPYTOIMPF on another file?
Are there any unusual column types in the file you're attempting to copy? -- ie: BLOG's
Is there any crupt data in the file you're attempting to copy?
What is the value for the TO STREAM file? Can you use CPYTOIMPF to send another file to this location?
What other parameters have you set in this command?
Thanks Phil
Phil,
I can run these CPYTOIMPF commands on a command line just like like my CL is doing and have no problem:
CPYTOIMPF FROMFILE(&RUNLIB/RPTSFILE *ALL) +
TOSTMF('/REPORTS/RNB/RPTSFILE.TXT') MBROPT(*REPLACE) +
STMFCODPAG(*PCASCII) RCDDLM(*CRLF) +
DTAFMT(*FIXED)
CPYTOIMPF FROMFILE(&RUNLIB/RPTSFRMS *ALL) +
TOSTMF('/REPORTS/RNB/RPTSFRMS.TXT') MBROPT(*REPLACE) +
STMFCODPAG(*PCASCII) RCDDLM(*CRLF) +
DTAFMT(*FIXED)
---------------------------------------
Jasingle
So it fails in your CL in batch but not when you issue the command interactively.
If you call the CL interactively does it fail?
If not, you're looking at authority or library list.
Authorities would include authority to /REPORTS/RNB/
and it might baulk if RPTSFILE.TXT or RPTSFRMS.TXT exist and were placed there with a different user.
Phil
To see other answers submitted to the Answer Wiki
View Answer History.