CPYTOIMPF error code 3025

45 pts.
Tags:
AS/400 errors
CPYTOIMPF
Error number 3025
IBM DB2
I am new to AS/400 and I wanted to transfer a file from AS/400 to PC using CPYTOIPMF as per advised here. But I am receiving an error, "File system error occurred" (Error number 3025) What's wrong? 

Answer Wiki

Thanks. We'll let you know when a new response is added.

Please show us the command you are issuing and the error message.
You may need to dspjoblog to see the complete error messages.

Phil

Discuss This Question: 12  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Teandy
    CPYTOIMPF is for copying files from the AS/40 to the IFS. Not directly to the PC. Once you have the file on the IFS you will then need to find a way to get it to the user. You can do this by either mapping a drive, FTP, or email.
    5,860 pointsBadges:
    report
  • Whatis23
    Error number 3025 is for "No such path or directory". If it exist you may not have authority to it.
    5,665 pointsBadges:
    report
  • Sk1234567
    CPYTOIMPF FROMFILE(TESTSUB/TRUCKPF) + TOSTMF('D:/example/TC1.CSV') MBROPT(*ADD) + RCDDLM(*CRLF) DTAFMT(*DLM) I want the file truckpf to be transfered to tc1.csv in the d directory. but iam getting an error "Copy command ended because of error" Please help me................
    10 pointsBadges:
    report
  • philpl1jb
    ’D:/example/TC1.CSV’ D: is how the folder looks from your PC side but the 400 looks at things differently If you have authority WRKFLR will probably give you the path The path will actually begin with a / so it might be /myfldr/mysubfldr/example/TC1.CSV You will also want to look into job logs for more error messages. Phil
    54,090 pointsBadges:
    report
  • TomLiotta
    CPYTOIMPF FROMFILE(TESTSUB/TRUCKPF) + TOSTMF(’D:/example/TC1.CSV’) MBROPT(*ADD) + RCDDLM(*CRLF) DTAFMT(*DLM) CPYTOIMPF is an AS/400 command. AS/400s don't have D: drives. Your AS/400 has no clue what a D: drive is. Since there are probably multiple PCs in your network, there might be a different D: drive on each PC; the AS/400 would have no way of knowing which D: drive it was. You need to specify a path that is visible from a program running inside the AS/400. Phil probably made a typo and intended to specify the WRKLNK command. Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    No Tom, WRKFLR, work with folders, or am I showing my age. We both assumed that your D drive was a mapped drive on the I-series IFS. The file must be in a folder on the i-series to use the CPYTOIMPF command. Oguk
    54,090 pointsBadges:
    report
  • TomLiotta
    The file must be in a folder on the i-series... No. It must be in a directory but not necessarily in a folder. (CPYTOPCD requires a folder.) Also, the question says "to pc". The only AS/400 copy target that will get to a PC will be in the /QNTC file system (or a mounted NFS directory). Copying to a folder doesn't get out of the AS/400. The OP would need to do some copy function on the PC via a mapped drive to do the copying "to pc" if the AS/400 target was a folder. WRKLNK will work over folders as well as directories that are not folders. WRKFLR only works with "folders". However, it's indeed possible that the OP was leaving some details out and didn't really mean "to pc". It could indeed mean "to some location that my pc can access in order to do the copy to pc". Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    Then again, this isn't about the OP... hmmm... complications... That's one problem with adding to an existing thread. If circumstances are different, it should go in a different thread. Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    Right Tom, Too much to do, too little time. CPYTOIMPF can copy an AS/400 file to an AS/400 directory. A seperate step is necessary to copy that file to your PC. Phil
    54,090 pointsBadges:
    report
  • ufi8305
    AS/400 error CPFA0D4, error code 3025
    If you want to transfer the file with an CL-program, it's important to write the name of the folder in capital letters. 

    CPYTOIMPF  FROMFILE(AMARIQRY/MQ001610) +           
                 TOSTMF('/WWS_QUERIES/MQ001610.CSV') + 
                 MBROPT(*REPLACE) FROMCCSID(273) +     
                 STMFCCSID(*PCASCII) RCDDLM(*CRLF) +   
                 FLDDLM(';') ADDCOLNAM(*SQL)           

    I first wrote the name of parameter TOSTMF in small letters and got the discribed error. 

    Sorry for any grammatical errors, I'm from switzerland.
    10 pointsBadges:
    report
  • TheRealRaven
    @ufi8305 : It's only important to use upper-case when (1) the target is a case-sensitive file system and (2) the target name actually uses upper-case. If it's a case-sensitive file system and the target name uses lower-case letters, then upper-case will fail. Unix/Linux file systems are generally case-sensitive, and Windows is not. The /QOpenSys file system on IBM i is a Unix-like file system, so it's case-sensitive.

    On IBM i, a name such as '/WWS_QUERIES/MQ001610.CSV' would be in the /root file system, so would not be case-sensitive by default. If, however, it was a mount over a remote file system, it might or might not be, depending on the remote target.

    The CPYTOIMPF command itself doesn't care about upper-/lower-case. It's only whatever the target attributes require that matters. The target may be local to the IBM i server or be on a remote server or PC.

    The parameter names such as TOSTMF() can be upper- or lower-case. Again, the command itself doesn't care nor does the IBM i system. It would only make a difference if you typed it into some command-processor program that demanded upper-case for some bizarre reason. (I've never seen one.)
    21,845 pointsBadges:
    report
  • ronbo2000
    In our case it was more of a network connectivity issue than the IBMi itself.  We always make sure mapped drives from external server (non-IBMi) always has the path validated in the QNTC (QTNC/RemoteServerName) by invoking the mkdir '/QNTC/RemoteServerName' command. Also make sure the account credentials you use to map the drive is valid for both IBMi and the server you are connecting to, otherwise, you run into authentication issue. After that you run the CPYTOIMPF with the correct parameters (you need to test this manually before you put them in CL as some servers does not convert characters the same way). Case sensitive servers will require you to make sure the path you specify to the TOSTMF parameter is correct.

    To get back to the topic, sometimes, not often, we get a CPFA0D4 message which you need to monitor for, with a 3025 error. We just delay and look back to the mkdir process and run the CPYTOIMPF command again. The next time around it may be successful. We allow 3 attempts and if it fails, we automatically send notification to our operations to check network otherwise, then can respond to the message to retry.
    10 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: