× 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: 'system' function, was Re: Re[2]: Retrieving Spool File Name in RPG
  • From: Rob Berendt <rob@xxxxxxxxx>
  • Date: Thu, 25 May 2000 8:44:20 -0500

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

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.