Try copying that IFS file into a fixed length flat DB2 file that has a
record length big enough to contain all the data.

Then use an RPG II program (yes, I said that) to read the flat file
(internally defined) and place the data into the files you use for your

Others will laugh at me, but I've been importing bank reconciliation files
for 20-30 years with no trouble, and no rewriting of the RPG II programs
unless the bank changes its record layouts.

Paul Nelson
Cell 708-670-6978
Office 409-267-4027

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of John
R. Smith, Jr.
Sent: Saturday, November 07, 2015 10:39 AM
To: midrange-l@xxxxxxxxxxxx
Subject: Copying data from IFS to DB2

I have a multi-record variable length format IFS file that I need to copy to
a DB2 file. The first few fields are "keys" and a record type and then there
is a "block" data field similar to the layout shown below. The record
length and block data layout vary based on the record type.







I can't seem to get CPYFRMIMPF or CPYFRMSTMF to work due to various
reasons/errors. Should one of these two commands work and I just have the
parameters set wrong, is there another command that I'm not thinking of, or
am I stuck trying to write my own program to read the IFS and write the DB2.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].