The iseries package has po header and detail files. They are regular dds files. When sending certain pos through edi, another file is populated. This file is also a phys file with a type field (h or d) and a long text field that contains all the data from the regular po files. It's this field that appears to have the 'bad' data in it. From what I can see, this long text field contains the packed and signed data in what appears to still be the packed or signed format! When I move it to the ifs, it doesn't appear to make this field completely readable.
-----Original Message-----
From: "Mike Krebs" <mkrebs@xxxxxxxxxxxxxxxxxx>
To: "'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx>
Sent: 7/19/07 2:47 PM
Subject: RE: Getting data to the IFS
Mark,
A little bit slower.
The iSeries program creates a standard PF that has data in it? This PF has
fields defined as numbers as well as text?
This file is "slapped" together into a another standard PF? This step takes
the numbers and makes them char?
You copy this to the IFS.
When it gets to the IFS, the data changes?
As well, you get excess CR/LF?
Mike Krebs
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Mark Keller
Sent: Wednesday, July 18, 2007 8:03 PM
To: RPG programming on the AS400 / iSeries
Subject: Getting data to the IFS
Looks like a lot of us are using the IFS! :)
What I'm doing:
We use a package that creates a text "flat file" that is used for EDI.
In creating this file, the package just slaps all the fields from 2 other
files into this file as such:
Header record--------------------------- Detail record-----------------
Detail record----------------- Header record---------------------------
Detail record-----------------
Etc... The file is defined to be the length of the Header file record
format (it's the longest of the two.)
When I try to view this file using SQL, some data is not viewable. This
appears to be some of the numeric data, either defined as Packed or Signed.
I use CPYTOIMPF to get this "flat file" to the IFS. My assumption was that
the EDI tool we use (not iSeries) would be able to convert the fields
itself, but as we are finding out, it can't. Numbers are wrong, in some
places, we see extra linefeeds that throw the edi translator off.
I think that my CPYTOIMPF is not working correctly because the fields have
already been written "badly" into text format.
I'm looking for suggestions on how to handle this. Do I need to translate
the fields back to their original formats and then recreate the text string?
This would suck, because there are a LOT of fields.
While researching this, I've looked all over. I've found suggestions on how
to use CPYTOIMPF and CPYTOSTMF, but nothing that has yet to help me.
Any help is GREATLY appreciated!
Also, I'm travelling this week and my response time might be a bit slow.
TIA, Mark
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.