× 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: QCMDEXC question
  • From: David Morris <dmorris@xxxxxxxxxxxxx>
  • Date: Wed, 14 Jan 1998 17:32:49 -0700

John,

I would agree CL is the most readable when you limit yourself to RPGIII and CL. 
 
I would say that an RPGIV procedure with a prototype that calls QCMDEXC is a 
better solution.  Even If you have to call QCMDEXC, which may look ugly in your 
procedure, on the application side it can enhance readability.  The RPGIV call  
can also be more flexible.  You can define what messages to monitor for and 
depending on where you call the program from act appropriately.  We have 
a procedure that executes a command and passes an optional message ID and 
associated text.  Also returned is an error on command flag.  This procedure 
along with several standard message procedures is all I need to execute a 
command 
from an RPGIV program.  You mention binding and ILE CL.  ILE CL is too little 
too 
late and also has a major bug (IBM calls it a restriction with a workaround)  
when
using return variables.

I know you would agree that CL is in need of more than just a facelift.  Until 
it is updated 
I would not recommend it over an RPGIV procedure which does a call to QCMDEXC 
for 
the purpose of executing a single command.

David Morris


>>> John Carr <74711.77@compuserve.com> 01/11 10:07 AM >>>

RE: Re: QCMDEXC question

>Try this to see if it works
>
>// DO OPEN FILE, USE USER CONTROL  OPTION>
>
>call 'QCMDEXEC'          XX01XX
>     PARM      CHKOBJ    //CHECK OBJ
>     PARM      PARM2
>
>*IN01     IFEQ *ON
>call 'QCMDEXEC'          XX01XX
>     PARM      CRTBJ          //CRT OBJ
>     PARM      PARM2
>     ELSE
>call 'QCMDEXEC'          XX01XX
>     PARM      OVROBJ    //OVR OBJ
>     PARM      PARM2
>     ENDIF


Ya this looks a lot simpler to understand and maintain than


PGM    (&file)
DCL &FILE *CHAR 10

CHKOBJ &FILE TYPE(*FILE)
MONMSG (BLAH BLAH BLAH)  DO
CLRPFM &FILE
ELSE DO
CRTPF  &FILE
ENDDO


ENDPGM

OR something like that.  Error handling can be implemented.  Forwarding
of error can be implemented.  Native language(CL) doing what comes 
native(CL commands).

Call bound = little overhead

But the QCMDEXEC  is probably alot easer to read/maintain/debug 
TIC (tongue in cheek)

Is this a SYS/36 APP ??  or in other words Why are you creating files 
on the fly??

Quick trivia test.

Question:   How do you know the app you're working on is a converted 
SYS/36 app????

Ans. It has 3 job steps and it creates 8 temporary work files.

Love those RETAIN-S and RETAIN-J designs
+---
| 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 MIDRANGE-L-UNSUB@midrange.com.
| 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 MIDRANGE-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-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.