Why not just use CPYTOIMPF?

I mean, that won't replace the packed data with blanks -- but it WILL replace the packed data with character data that will be readable by the Unix box. (That's assuming that the file is externally defined...)

Another way to omit the packed fields is to run a simple SQL statement or create a logical file that only contains the fields you need. Again, that wouldn't insert blanks, it'd just omit the ones you don't need...

I wonder why you'd want to replace it with blanks?

Rick.Chevalier@xxxxxxxxxxxxxxx wrote:

I've hit a wall and I'm hoping someone can help me with a simple

About 10 months ago our data warehouse group asked us to remove
packed fields from a file they receive from an outside vendor. At
the time I did something simple that replaced the packed fields with
blanks. I'm pretty sure I didn't write a program. Unfortunately I
don't have any notes on what I did and now they are asking to make it
a permanent process. I think it involved creating a file as ASCII
and copying data but I can't find a combination that works. I have
googled ASCII conversions on the iSeries as well as tried various
CRTPF, CPYFRMSTMF, CPYFTMIMPF, and SQL variations over the past day
and a half.

Does anyone have a way to do this short of writing a program or an
SQL update statement? There is an anomaly in the records that
precludes just updating fixed positions in the record. I may have to
do that anyway but I would prefer not to.


Rick Chevalier <<Chevalier, Rick.vcf>>

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 midrange.com 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].