Hi , I have a PF abc in my library ,now i want to move it to IFS directory /home/xzy. I am using CPYTOIMPF with TOSTMF option as /home/xzy/abc.txt but it is failing saying "The copy did not complete for reason code 11"..please help
Software/Hardware used:
as400
ASKED:
November 3, 2010 5:48 PM
UPDATED:
November 18, 2010 7:50 PM
Can you recreate the problem ane then go to the 2nd level help to find out what reason code 11 is?
Or just give use the error message ID
The recovery is noted in the text for the message. Message ID is probably CPF2845 — you should tell us what the message is in order for us to have an idea about what to do. If the change has been made according to the instructions in the message and the problem still happens, we will need to see the CPYTOIMPF command in order to guess what might be wrong.
Tom
I have a PF abc in my library ,now i want to move it to IFS directory /home/xzy.
The CPYTOIMPF command doesn’t “move” files. It is intended to ‘export’ database files. Other DB2 variations have EXPORT functions. (The IMPORT function is CPYFRMIMPF on AS/400s.)
A database file cannot be “moved” to a directory outside of the /QSYS.LIB file system in the IFS.
Can you describe what you actually want to accomplish?
Tom
Actually i have created a pf MONITORJOB in my library now i am using CPYTOIMPF to import it to IFS as MONITORJOB.TXT .. I am using
CPYTOIMPF FROMFILE(DMYHPLIBR/MONITORJOB) +
TOSTMF(‘/HOME/DMYPGMR/MONITORJOB.TXT’) +
STMFCODPAG(*PCASCII) RCDDLM(*CRLF) .
When i open MONITORJOB.TXT it shows only one record(although Pf contains 2 record) and msg displayed is I record folded….This is one problem ….
Other is i am using QTMMSENDMAIL api for sending this txt file as attachment ..i am not sure what is to be used in file path and attachment filed…Help me out plz….
(although Pf contains 2 record)
Please use DSPFFD DMYHPLIBR/MONITORJOB to display the field list for that file. From the ‘Record Format Information’ section, copy/paste ‘Number of fields’ and ‘Record length’ values here.
Tom
Number of fields . . . . . . . . . . . . . : 1
Record length . . . . . . . . . . . . . . . : 132
Number of fields . . . . . . . . . . . . . : 1
First thing you should try is CPYTOSTMF instead of CPYTOIMPF. You don’t seem to be exporting a table; you seem to be trying to copy a flat test file to a streamfile.
See if CPYTOSTMF will give better results. If a different error comes up, it will possibly help narrow down the problem which might come from the data.
Tom