× 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: RPG - conversion vs re-write
  • From: Bob Cozzi <BobCozzi@xxxxxxx>
  • Date: Fri, 12 Sep 1997 09:49:56 -0500

Lance,

I don't object to the percent sign. It just goes against my grain that 
there is no way to handle, for date fields, a null date value. Setting on 
the NULLID does not alter the field's value. You can still use it as far as 
I know. I just, ad-hoc, wrote "IsNULL()" as a response to another note in 
which somebody asked for an ISNULL function.

Bob Cozzi
Bob@RPGIV.COM
www.rpgiv.com
AS/400 Books:  http://www.rpgiv.com/as400Books.html


On Thursday, September 11, 1997 10:55 AM, CVWD@aol.com [SMTP:CVWD@aol.com] 
wrote:
> In a message dated 97-09-11 08:33:26 EDT, you write:
>
> > Okay, here's some code that saves absolutely nothing, but is more
> >  English-like that %NULLID(ddd)=*ON
> >
> >
> >       D IsNULL          PR             1S 0
> >       D   TestDate                      L   Const
> >
> >       PIsNULL           B                   Export
> >       D IsNull          PI             1S 0
> >       D  TestDate                       L   Const
> >       C                   Return    (%NULLID(TestDate)=*ON)
> >       PIsNULL           E
> >
> >  Using this procedure, you can then do this in Calcs
> >
> >  C                  If            IsNull(MyDateFld)
> >  C                  /*  do your null-date routine here */
> >  C                  endif
> >
> >
> >  This would be the same as:
> >
> >  C                  If            %NullID(MyDateFld)=*ON
> >  C                  /*  do your null-date routine here */
> >  C                  endif
> >
> >
> >  Now, I suppose the thing that might byte me is the return type on the
> >  procedures. I used a 1-digit signed numeric. I don't know if 
Indicators
> can
> >  automatically be cast to zoned decimals, so if it doesn't work, do a 
Z-ADD
>
> >  deal right before the return, or similar.
> >
> >
>
> Is all that really worth it?  According to the ILE manual you can just 
say:
>
> C                  If            %Nullid(MyDateFld)
> C                  /*  do your null-date routine here */
> C                  endif
>
> What is it you object to so strenuously?  The percent sign?  Just 
wondering -
> Lance.
>
>
>
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
> | To unsubscribe from this list send email to MAJORDOMO@midrange.com
> |    and specify 'unsubscribe MIDRANGE-L' in the body of your message.
> | Questions should be directed to the list owner/operator: 
david@midrange.com
> +---
> 
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MAJORDOMO@midrange.com
|    and specify 'unsubscribe MIDRANGE-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.