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



Well to me, I believe this example would be no more that doing the same
thing 2 different ways....
As for the advantage of ILE, a better example would be this....  You have a
program a, and it needs to know what day of the week is it.  You could code
program 'a' with the routine, or in the old rpg you could write another rpg
program to do the calculation and then return.  Or in ILE you create another
program but you bind it to program 'a' so the function is called faster.
Plus when you create a function/procedure in ILE it's nicer becase the
passing of parm's are nice, plus the procedure can return a value.

And as for your example, here's a little trick...

        0232.00 C     *in06         ifeq      *on
        0233.00 C                   callp     RunCmd('DSPMSG':6)
        0234.00 C                   else
can be coded...
        0232.00 C                   if          *in06
        0233.00 C                   callp     RunCmd('DSPMSG':6)
        0234.00 C                   else



> -----Original Message-----
> From: Buzz Fenner [SMTP:bfenner@jonesborocwl.org]
> Sent: Tuesday, August 17, 1999 1:51 PM
> To:   'rpg400-l@midrange.com'
> Subject:      Call or Bound Call
> 
> Hi all,
> 
> I'm slowly teaching myself ILE RPG (yikes!), rather RPG IV (apology to 
> B.C.).  The following code is a simple call to the command parser.  Here's
> 
> the old code and the new code:
> 
> 0353.00      C           *IN06     IFEQ '1'
> 0354.00      C                     CALL 'QCAEXEC'
> 0355.00      C                     PARM 'DSPMSG'  CMD     6
> 0356.00      C                     PARM 6         LENGTH 155
> 0357.00      C                     ELSE
> 
> 
> 0059.00 D*
> 0060.00 DRunCmd           pr                  extpgm('QCMDEXC')
> 0061.00 D command                       80a   const
> 0062.00 D length                        15p 5 const
> 0063.00 D*
> 
> bunch of code, etc.
> 
> 0231.00 C*
> 0232.00 C     *in06         ifeq      *on
> 0233.00 C                   callp     RunCmd('DSPMSG':6)
> 0234.00 C                   else
> 
> From a technical viewpoint, are these two chuncks of code equivalent?  Or,
> 
> is the RPG IV code a bound call of some sort?  The discussion in the 
> reference manual leads me to believe that the RPG IV code represents a 
> dynamic call to QCAEXEC.  Plus, if they are equivalent, what is the 
> advantage of the RPG IV code (if any)?
> 
> 
> Buzz Fenner
> bfennerNS@jonesborocwl.org
> Remove NS to reply
> 
> +---
> | 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
> +---
+---
| 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.