We have three Stream files that I need to copy into standard ISeries database files used in our ERP system. I found the 'CPYFRMSTMF' command, but this cmd seems to allow copies only to other Stream type files with directories.(QSYS.LIB) Does anyone know how to copy a stream file into an actual database file?
Thanks!
Software/Hardware used:
ASKED:
October 12, 2005 9:41 PM
UPDATED:
November 15, 2009 4:10 AM
You can have a better result is uses CPYFRMIMPF : if is able to populate a DB2 file with columns, particularly, it is able to apply default values to null columns, a common state in text files that is rarely described in common 400 files.
Note that although the CPFRMSTMF TOMBR() is a ‘database’ file, it must be “either a source physical file or a program-described physical file.” An externally-described database file is not allowed. As such, there isn’t much reason to do the copy. Any input from it by program can come from the streamfile almost as easy as from the program-described file. Further, issues such as line-wrap and CCSIDs might be under much better control by reading the streamfile.
Tom