× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



The "can it be cleaned up" was really referring the fact that when I went 
though the archive to check out what release %dec could truly be used. I 
had to read though Hans and Brad's banter about stuff that really had 
nothing to do with Character to Numeric at least 20 + emails to find and 
answer that had something to do with topic.

I do wish that v5r1 could do what v5r2 can with the %bifs. But if the 
Client would just move up....

Have a good day.

Bill Hopkins
 




"Carel Teijgeler" <coteijgeler@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/16/2003 11:53 AM
Please respond to RPG programming on the AS400 / iSeries

 
        To:     rpg400-l@xxxxxxxxxxxx
        cc: 
        Subject:        Re: Character to Numeric can it be cleaned up


Hans, 

I know that.

But I think the work was half done, as those BIFs only worked with values 
known at compile time (literals, constants) and not with values from 
fields in database files.

So a statement like "Eval     MyNumber = %DEC(MyCharacterField)" will not 
compile on V5R1 and older OS releases. This can be done at V5R2 (I hope). 
To get a numeric value in a character field into a numeric field you have 
to use MOVE. At V5R1 with /free at my disposal. (Joe Pluta's arguments are 
still standing!)

So, I still consider those BIFs useless at those OS levels. I would have 
been better, if IBM had not introduced them at that time.

Regards,
Carel Teijgeler

*********** REPLY SEPARATOR  ***********

On 16-8-03 at 9:37 Hans Boldt wrote:

>> Unfortunately, %DEC is not fully matured on V5R1 and only accept values
>> known at compilte time (read: hard coded values). This BIF is therefore 
rather useless at this OS level.
>> 
>> And to think of it: this BIF (and its cousins) were developed to dump 
MOVE in /free. (sic!)
>
>Sorry for the nitpicking, but %DEC, %INT, %UNS, etc. were added to the 
language several releases before /FREE.



_______________________________________________
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.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.