|
Buzz, I would say the advantage in your RPGIV example is that you can pass an expression for your parameters. The other difference is that your first example would expect commands to be formatted as system 38, but that was probably unintentional. I don't believe you would notice any difference with call performance except that RPGIV can be more highly optimized. I would also go one step further and wrap the call to qcmdexc in a sub-procedure. This way when you decide to do some validity checking or error processing you only have to add it one place and all procedures that call it will benefit. David Morris >>> Buzz Fenner <bfenner@jonesborocwl.org> 08/17/99 02:51PM >>> 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 +---
As an Amazon Associate we earn from qualifying purchases.
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.