× 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: CVWD@xxxxxxx
  • Date: Thu, 11 Sep 1997 11:55:21 -0400 (EDT)

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
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.