|
Actually, I am on V5R1 and I have stumbled onto a sequel statement that
converts characters to numeric and vice versa. Here is the code:
This takes a character field, and puts it into a numeric field. It does not
seem to matter if the character field is left justified or right justified.
C/Exec Sql
C+ Update upsebill
C+ Set uenetchg$ = cast(uenetchg as decimal(10,2))
C/End-Exec
Tracy L. Ball
The Jackson Group
Sr. Programmer/Analyst
(317) 781-4600 ext. 3107
-----Original Message-----
From: Chevalier, Rick [mailto:Rick.Chevalier@xxxxxxxxxxxxxxx]
Sent: Friday, May 16, 2003 12:41 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: How Do I convert a character to a numeric field in /free.
In V5R2 you would use one of the data conversion BIF's (%dec, %int,...). In
V5R1 you are pretty much stuck with the data structure method.
Rick
-----Original Message-----
How Do I convert a character to a numeric field in /free without using a
data structure.
at http://archive.midrange.com/rpg400-l.
_______________________________________________
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 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.