Some of IBM’s error messages are more cryptic than others. Copying files from the IFS using CPYFRMIMPF sometimes spits out error messages which are less than clear:
CPYFRMIMPF FRMSTMF('/FOLDER/FOLDER/FILE') TOFILE(*LIBL/FILENAME) MBROPT(REPLACE) RCDDLM(LF) STRDLM(NONE) RMVBLANK(NONE)FLDDLM(TAB) ERRRCDOPT(REPLACE) RPLNULLVAL(FLDDFT)
File system error occurred. Error number 3021
Copy command ended because of error.
Internet Search for CPYFRMIMPF 3021 shows nothing!
Lookup the related CPE error message: DSPMSGD CPExxxx
so, in this case, 3021 means
In this case the ‘value specified for the argument is not correct‘ is telling us that the FRMSTMF value is incorrect, or file is not found.
Fix the FRMSTMF file name or add some error checking to your program code.
IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Alpha Nerd and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and in the words of the most interesting man in the world: Stay thirsty my friend.
How to rename IFS Files
Going the (Levenshtein) Distance in RPG Free
Don’t hardcode library names in your TURNOVER SQL source #youbigsilly
How to Install IBM Access Client Solutions (ACS)
5733XJ1 IBM i Access Client Solutions – QuickStartGuide
Install LANSA AXES – Automatic Web Interface for IBM i (AS/400) 5250 Applications
IBM i Data Obfuscation – Making Data Foggy Murky and Squinty
How to copy IBM i IFS folder
How to rename Fresche (BCD) Presto Library – XL_PRESTO