× 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 "N" data type in RPG IV is an indicator data type.
I can contain *ON or *OFF and can be tested like most other built-in
indicators.

C              IF          TOOBIG
C              do something when TOOBIG=*ON...
C              endif

Is the same code as:

C              IF          *IN38
C              do something when *IN38=*ON...
C              ENDIF

So rather than this:
     d TOBIG                              like(*inlr)

code this:

     d TOBIG                          1N

Bob Cozzi
cozzi@rpgiv.com
Visit the on-line  Midrange  Developer  forum at: http://www.rpgiv.com

> -----Original Message-----
> From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]
On
> Behalf Of tomh@simas.com
> Sent: Wednesday, January 23, 2002 5:24 PM
> To: rpg400-l@midrange.com
> Subject: RE: NOT on the left side
>
> This is a multipart message in MIME format.
> --
> [ Picked text/plain from multipart/alternative ]
> This works for me  (v4r5):
>
>  d                 ds                  inz
>  d retval                              like(*inlr)
>
> Then I use the 'retval' field in boolean type statements:
>
> c             if     not retval
> c*  retval is *off,
> c            endif
>
>
>
> Tom Hightower
> Solutions, Inc
> http://www.simas.com
>
>
>
>
>
> "Joel R. Cochran" <jrc@masi-brac.com>
> Sent by: rpg400-l-admin@midrange.com
> 01/23/02 04:00 PM
> Please respond to rpg400-l
>
>
>         To:     "'rpg400-l@midrange.com'" <rpg400-l@midrange.com>
>         cc:
>         Subject:        RE: NOT on the left side
>
>
> As far as I know, though, the only way to really implement this is
with
> indicators.  I'd rather be able to create a field on a D spec and give
it
> a
> definition type of boolean... no need to define size.  I don't know if
you
> can use indicators in if statements like so...
>
> if ( *in30 )
>
> or do you have to code it like this...
>
> if ( *in30 = *on )
>
>
> Maybe there is already a way to accomplish this, like defining a field
> with
> "like (*in01)" (and if you do, is it character or numeric?), but it
seems
> in
> every other language booleans are primitive data types...
>
>
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> 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 ...

Replies:

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.