|
Pseudo-code:
a) fopen file
b) dow fgets() = successful;
c) Load record into a data structure or something of character fields.
d) Convert numeric fields from character useing the %dec() BIF in RPG (V5R2 later) or atof() in C or earlier versions of RPG.
e) Write database record
f) end of DOW loop
g) fclose() IFS file.
It's a really simple program -- it'd take me about 20 minutes to write.
On Wed, 9 Feb 2005, Angela Wawrzaszek wrote:
Doing that though how do I convert the character representations of the numbers to actual numbers? Do I have to parse out each position looking for numbers, decimals and blanks?
Ie. Of how .txt file looks once copied to a flat file:
LI361505085 AS EE11 17.000 .000 .000 .000 20021007 0
Actual specs of 'real' file are
ID 2 A Item# 5 A Lot# 10 A ( blank on many of the records) Loc 6 A OpenBal 11 3 P Issue 11 3 P Receipts 11 3 P Adjust 11 3 P Date 8 0 P Extra 1 A
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.