× 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: Convert Alpha to Numeric
  • From: "chandran balaji" <cbalajivk@xxxxxxxxxxx>
  • Date: Fri, 14 Apr 2000 15:18:42 PDT

i might move the alpha to a numeric field with 0 decimals and devide it by 
1000 and then move the result to the final result field. but the only thing 
i am not sure is the disparity in the length of the 2 fields (20 alpha and 
10.3 numeric).

move      *blanks       alpha20          20
move      *zeros        num020           20 0
move      *zeros        dec103           10 3
move      '12345678'    alpha20
move      alpha20       num020
eval      dec103 = (num020/1000)

result DEC103 = 0012345.678

hope it helps

BVK
======================================================================
From: "Baltus, Kevin" <KBaltus@automaticproducts.com>
Reply-To: RPG400-L@midrange.com
To: "'RPG400-L@midrange.com'" <RPG400-L@midrange.com>
Subject: Convert Alpha to Numeric
Date: Fri, 14 Apr 2000 16:00:53 -0500

Hello.  I may be asking a basic question but what is the best way to convert
an alpha field into a numeric?  In my situation I have a 20-Alpha where the
values are whole numbers.  I need to get that whole number into a 10.3
field.

Any suggestions would be greatly appreciated!  Thanks!

--------------------------------------------------------
Kevin Baltus - Programmer/Analyst
(651) 290-6179   kbaltus@automaticproducts.com
Gross-Given Mfg/Automatic Products International
http://www.automaticproducts.com

Blatant Band Plug
http://www.twitch.org




______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| 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.