I have received the physical file at the IFS location and now I am required to copy the IFS file to a physical file in my dev library so that I can further process the physical file (PF) in one of the RPG programs.
Sorry, you do not have permission to ask a question, You must login to ask a question.
Sorry, you do not have permission to ask a question.
we can copy the ifs file to the physical file using the
CPYFRMIMPF
(copy from import file) command. Like CPYTOIMPF command is used to copy physical files to ifs in the same way CPYFRMIMPF is used to copy physical files in ifs back to the physical file.CPYFRMIMPF FROMSTMF('/home/developer/pfname')
TOFILE(libname/filename)
MBROPT(*replace)
RCDDLM(*LFCR)
STRDLM(*NONE)
RMVCOLNAM(*YES)
here.
cpyfrmimpf
command parameter FROMSTMF received the value filename and ifs user path where the file is located. TOFILE parameter received the value library name/filename RCDDLM is *LFCR(line feed and carriage return) STRDLM(*NONE), by default its *DBLQUOTE and RMVCOLNAM(*YES), we need to remove column names if we have column names present in the ifs file.