Please help me, I'm just a newbie with AS400 environment.
I have created a DB2 table with 47 fields with assorted data types (char, varchar, numeric, int and decimal).
My input file is to be taken from the IFS and that file is a text file (.txt) without column headings and without delimiter as well.
I have created a flat file to the QTEMP library using the statement below:
CPYFRMSTMF FROMSTMF(&ORIGIN) TOMBR(&DEST) +
MBROPT(*REPLACE) +
ENDLINFMT(*CRLF) TABEXPN(*NO)
The above statement executed perfectly, so the temporary file was created with all the records from the text file copied in it.
I'm trying to load the records from that temporary file using the statement below:
CPYF FROMFILE(QTEMP/&TEMPFILE) +
TOFILE(&LIBRARY/&FINALTABLE) MBROPT(*ADD) +
FMTOPT(*MAP *DROP)
The statement above went unsuccesful.
What would be the alternative or the solution to this case?
Many thanks.
I have created a DB2 table with 47 fields with assorted data types (char, varchar, numeric, int and decimal).
My input file is to be taken from the IFS and that file is a text file (.txt) without column headings and without delimiter as well.
I have created a flat file to the QTEMP library using the statement below:
CPYFRMSTMF FROMSTMF(&ORIGIN) TOMBR(&DEST) +
MBROPT(*REPLACE) +
ENDLINFMT(*CRLF) TABEXPN(*NO)
The above statement executed perfectly, so the temporary file was created with all the records from the text file copied in it.
I'm trying to load the records from that temporary file using the statement below:
CPYF FROMFILE(QTEMP/&TEMPFILE) +
TOFILE(&LIBRARY/&FINALTABLE) MBROPT(*ADD) +
FMTOPT(*MAP *DROP)
The statement above went unsuccesful.
What would be the alternative or the solution to this case?
Many thanks.
Comment