|
Rob: Rob Ward wrote: > I have an application in which I need to read a file "generically" so > the > record format is defined in the RPG program as a single field. I then > use > the output file from a DSPFFD to determine the actual field positions > of > the data in the file. I'm having a problem with packed fields though. > > Does anyone have a good routine to take a character field that > contains the > packed numeric data and moves it to a numeric field. > The Jan 1992 (see I am Y2K compliant), issue of Midrange Computing has an article to fix decimal data errors in files. S/36 people use it a lot because S/36 is more forgiving, while RPG/400 and ILE RPG are not (unless you take igndecerr option). Anyhow, this takes any db file which is externally defined (required) and checks and optionally fixes numeric zoned/ packed fields. You can modify this to do your job. It can be found and downloaded from their web site at http://www.midrangecomputing.com/mc/prog/92/ -- Thank You. Regards Dave Mahadevan.. mailto:mahadevan@fuse.net * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This is the Midrange System Mailing List! To submit a new message, * * send your mail to "MIDRANGE-L@midrange.com". To unsubscribe from * * this list send email to MAJORDOMO@midrange.com and specify * * 'unsubscribe MIDRANGE-L' in the body of your message. Questions * * should be directed to the list owner / operator: david@midrange.com * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.