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


  • Subject: Re: Char to numeric conversion question
  • From: Rob Berendt <rob@xxxxxxxxx>
  • Date: Mon, 19 Apr 1999 16:24:41 -0500

I was going to recommend the TESTN but, even though it can test for blanks, 
what you can do with that results is somewhat limited.  And for the indicator 
phobic it will send them over the edge.

Hey, try this!
C     ' ':'0'       XLATE     Number        Number





paulgjackson@yahoo.com on 04/19/99 04:05:40 PM
Please respond to RPG400-L@midrange.com@Internet
To:     RPG400-L@midrange.com@Internet
cc:      

Subject:        Char to numeric conversion question

Hello All,

Ok here's my problem. I am converting a spool file
into a data base work file.  I am reading the spooled
file records and trying to convert edited numeric
values into packed fields for storage.

For example I have a value from the spool file that
comes in as character 'bbbbb25.03' and I want to put
this into a 9,2 packed field.

I looked for RPGIV built in functions but could find
none that seemed to do the job.  Any suggestions on
how to do this in a relatively simple way?

Thanks in advance
-Paul

===
Paul G.Jackson
IBM Certified Specialist - AS/400 RPG Programmer
Home: (425) 401-0224   paulgjackson@yahoo.com 
Work: (425) 313-8594   pjackson@costco.com    

Boycott Proctor & Gamble products-see http://www.pginfo.net
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-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 thread ...


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.