CPYFRMIMPF command error.

Mpeter

Well Known Member
Hello Listers,

This is regarding the problem I had with the Copy command.

Here is my requirement:

I need to upload the data from my excel into one of the Z-files.

Here is the format of the file:

Physical file:

Ftest
I test
ID 4p 0



Now I wrote a CLP:
PGM
DCL VAR(&PATH) TYPE(*CHAR) LEN(32) +
VALUE('/HOME/MPeter/Mark/COPY1.TXT')
CPYFRMIMPF FROMSTMF(&PATH) TOFILE(FTEST) STMFLEN(4) +
DTAFMT(*FIXED) RMVBLANK(*NONE) +
FLDDFNFILE(FTEST)
MONMSG MSGID(CPF0000 CPC0000 CPD0000)
ENDPGM
I donot know what we need to give in the FLDDFNFILE.

The Copy.txt contains the data:
1000
1001
1002
1003

But after running it the data didnot get copied.

Please let me know if I am doing some thing wrong.

Thanks
Mark
A7.3 Cum12,V5R4.
 
If you have exported your spreadhseet as a CSV file and uploaded it to the IFS properly then usually you don't need a field definition file when using the CPYFRMIMPF command:

CPYFRMIMPF FROMSTMF('/HOME/MPeter/Mark/COPY1.TXT') +
TOFILE(*LIBL/FTEST) RCDDLM(*CRLF) +
STRDLM(*NONE) RPLNULLVAL(*FLDDFT)

Its best to run the command straight from a command line to test that it works properly. If you receive an error, then use the DSPJOBLOG command to determine what error code(s) your receiving...

Terry
 
Hi,

I tried but this also didnot work.

I therefore request you to suggest me the entire procedure with an example.

Please help me.

Thanks
mark
A7.3
 
Hello,

I could resolve the issue. Thanks for your support.


Thanks
Mark
 
Back
Top