Last week I mentioned the
CPYTOIMPF command and how easy it makes reformatting data so that it can be handled by other platforms. Not surprisingly the IBM i makes it just as easy to handle data coming back with the CPYFRMIMPF command.
Using the same files as last time, the command looks like this:
CPYFRMIMPF FROMSTMF('/home/PAUL/MarketingReport.csv') TOFILE(MRKRPT01) MBROPT(*REPLACE) RCDDLM(*CRLF) FLDDLM(';')
This time, I am copying data from the MarketingReport.csv CSV file into a previously defined (and it must be previously defined) table, MRKRPT. I’m replacing the existing data and using the local and Windows conventions for Record and Field delimiters.
All of this means that, regardless of where a set of data originated, making it available to applications on the IBM i really is a piece of cake.