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




     My example did not show this, but often I use something like:
     
     C                   If        0 <> System('command') 
     C* Error handler
     C                   Select
     C                   When      ErrorCFP='CPFxxxx'
     C* Fix Stuff
     C                   EndSL
     C                   EndIf
     
     
     The above code would not even need a defined ErrorFlag.
     
     I can't say how it compares to QCAPCMD, but it is superior to 
     QCMDEXC. One of the main advantages I've see is when applying 
     overrides to UC files, when using QCMDEXC I had to specify 
     OVRSCOPE(*JOB) so that the overrides were still applicable when 
     returning to the RPG program. System seems to execute at the same 
     call level as the calling program, so the OVRSCOPE parm is not 
     necessary. Makes life a bit simpler. 
     
     Here's a link to V4R3 online docs.
     http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QB3AT800/1.2.204
     
     
     hth
     eric.delong@pmsi-services.com


______________________________ Reply Separator _________________________________
Subject: 'system' function, was Re: Re[2]: Retrieving Spool File Name
Author:  <RPG400-L@midrange.com> at INET_WACO
Date:    5/25/00 8:44 AM


I stand corrected.  I was using a wrapper to QCAPCMD 
which returns the error message number.
     
Does one use the ErrorFlag usually, or do you use the 
imported variable instead?  (I almost asked how you 
convert the ErrorFlag into the ErrorCPF until I remember 
you can import variables along with subprocedures.)
     
I know that QCAPCMD can do a bazillion other functions, 
but, for this part of it, is there any advantage to one 
versus the other?
     
Uh, can you pass a link to this manual?
     
I haven't finished the whole RPG redbook yet.  Is this covered? 
I am just on my way to the 'library' after I finish this
memo.
     
     
     
     
     
     
eric.delong@pmsi-services.com on 05/24/2000 06:40:45 PM 
Please respond to RPG400-L@midrange.com@Internet
To:        RPG400-L@midrange.com@Internet 
cc:         
Fax to:        
Subject:        Re[2]: Retrieving Spool File Name in RPG
     
     
     System is a C runtime function. I use it all the time. 
     
     H DATFMT(*ISO) BNDDIR('QC2LE') DFTACTGRP(*NO)  
     
      * Prototyped Procedures / Functions ............................
     D ErrorCPF        S              7    import('_EXCP_MSGID')      
     D ErrorFlag       S             10i 0                            
     
     D System          PR            10i 0 extproc('system') 
     D   Cmd                           *   value options(*string)
     
     C                   EVAL      ErrorFlag = System('CLRPFM + 
     C                             FILE(PHPARV4)')              
     
     
     eric.delong@pmsi-services.com
     
     ______________________________ Reply Separator 
     _________________________________
     Subject: Re: Retrieving Spool File Name in RPG 
     Author:  <RPG400-L@midrange.com> at INET_WACO 
     Date:    5/24/00 2:35 PM
     
     
     system must be a wrapper someone at your company wrote.  I do a 
     WRKOBJ SYSTEM and do not find it.
     
     
     
     
     
     pcunnane@learningco.com on 05/24/2000 01:44:40 PM Please respond to 
     RPG400-L@midrange.com@Internet To:        
     RPG400-L@midrange.com@Internet
cc:         
Fax to:        
Subject:        Re: Retrieving Spool File Name in RPG
     
[While tossing about possible methods to set the USRDTA value of the spool 
files, the programmers responsible for the application programming stated 
that they did not feel it was productive to create a CL for every RPG that 
would need to set the USRDTA value and wanted to accomplish this from 
within the RPG program. This would avoid coding lots of CL's that merely 
passed parameter strings after doing an OVRPRTF. Perhaps this is a valid 
objection, perhaps it isn't. I'm not really able to influence their 
preference, in any event I figured that what they wanted to do ought to be 
easily accomplished from within the RPG with a bit of thought.]
     
     Maybe I'm missing something here, but couldn't you do the override 
     within the RPG program?  Set the printer file to USROPN, use the 
     system() API (or QCMDEXC) to override the printer file, and then OPEN 
     the file?
     
       Fprinter   o    e             printer usropn                  
       F                                                             
       D system          pr            10i 0 extproc('system')       
       D  cmd                            *   const options(*string)  
       D                                                             
       D UserData        s             10a                           
       D                                                             
       C                   callp     system('ovrprtf printer usrdta(' 
       C                              + UserData + ')')              
       C                                                             
       C                   open      printer                         
     
     Maybe I've misinterpreted your requirement.
     
     -- 
     Paul
+---
| 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 
+---
     
     
     
+---
| 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 
+---
     


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