|
Douglas, I'm a little surprised no one suggested to use a "call atoi" .What I've done in some cases (e.g. , using IIM file from BPCS was one of them...) was to create a ILE-RPG "wrap" program that did the conversion from the 10-alfa (with numeric left adjusted) to 7/0 numeric (or whatever you decide...) right adjusted. If the alfa field could contain "decimal data (I mean, with decimals, with explicit decimal point/comma) then "atol" instead of "atoi" could be used. It's obvious calling an "intermediate" program to do the conversion each time for each record could be too much of a load, but it's just a possibility for you to consider, depending of what your needs are.
My 2 cents, ------------------------------------------------------------------------------------------------ Douglas Palme escribió:
I am in the process of modifying an RPG III program that I am not permitted to convert to ILE. One of the fields is a 10 character field that only contains numeric numbers and will never have more than seven digits..I know I could change the field length to 7 but I was told no to that as well as it might blow up other programs. Here is the delimna, I need to move the value to a 7 digit numeric. It is possible that it can have anywhere from 1 to seven digits. Example: '116769 ' - Charcter value I have a new field defined as 7,0
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.