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



actually, '12G' is +127.  '12Q' is -127.


>From: Scott Klement <klemscot@klements.com>
>Reply-To: RPG400-L@midrange.com
>To: "'RPG400-L@midrange.com'" <RPG400-L@midrange.com>
>Subject: Re: TESTN
>Date: Tue, 31 Oct 2000 12:19:26 -0600 (CST)
>
>
>'12G' is a character representation of the number -127.  When you
>MOVE a negative number to a character field, it changes the value of
>the "zone" portion of rightmost byte to reflect that its a negative
>number.  (The change will usually result in a letter from A-R or the "{"
>character.)
>
>Therefore "12G" is a valid number.
>
>If you only want to test for valid positive numbers, do something like
>this:
>
>C                   MOVEL     '12G'         SIN               3
>C                   MOVE      *zeros        WORK              4
>C                   MOVEL     SIN           WORK
>C                   TESTN                   WORK                  81
>c                   eval       *inlr = *on
>
>By putting that extra zero at the end, the "G" ends up in the middle
>of the number, and will signal an error.
>
>
>On Tue, 31 Oct 2000, Lurton Keel wrote:
>
> > Here is a program.
> > C                   MOVEL     '12G'         SIN               3
> > C                   TESTN                      SIN                  81
> > c                    eval          *inlr = *on
> > indicator 81 is in pos 71-72.
> > My problem is that in the above example, indicator 81 is on even though
> > there is a "G" in the field.
> > The RPG reference says.
> > "Positions 71 and 72: Either the result field contains numeric 
>characters,
> > or it contains a 1-character field that consists of a letter from A to 
>R."
> > What's up
> >
>
>+---
>| 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
>+---

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.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.