|
Hello Tim, Keeping my opinions on the design (or lack thereof) fairly quiet ... Parameters passed between programs are never logged, OVRxxxx commands don't send completion messages, and LOGCLPGM only affects CL programs not CL commands run in a HLL program. That is why you can't see anything in the joblog. Assuming you can't put the OVRxxxx commands in the CL program that calls the 'mother' program, I would modify the 'mother' program as follows: o Put the call to QCMDEXC in a subroutine (if it is not there already) o Design a mechanism to inform the 'mother' program that it should log the OVRxxxx commands o Add conditional code to send the command being executed to the joblog as an *INFO or *DIAG message. (You use the QMHSNDPM API to do this or the SNDPGMMSG command from CL) Something like: C CMDEXC PLIST C PARM CMD 80 C PARM CMDLEN 150 C CMDLOG PLIST C PARM CMD CSR RUNCMD BEGSR C LOG IFEQ $TRUE C EXSR LOGCMD C ENDIF C CALL 'QCMDEXC' CMDEXC CSR ENDSR CSR LOGCMD BEGSR C CALL 'LOGCMDC' CMDLOG CSR ENDSR Column positions not checked for accuracy. Comments not included. LOGCMDC is a CL program (so I don't have to show all the parameters for QMHSNDPM in the example -- you would, of course, abstract the interface). The hard part is deciding the mechanism to indicate logging. A parameter could be used but an external method would be better. Perhaps a control file (what's one more file amongst 40-50), data area, or the job switches. Choose the least obscure method or provide a command to set the logging status for the job which would allow you to choose as obscure a technique as you like because the command becomes the documented interface. Regards, Simon Coulter. //---------------------------------------------------------- // FlyByNight Software AS/400 Technical Specialists // Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 // Fax: +61 3 9419 0175 E-mail: shc@flybynight.com.au // // Windoze should not be open at Warp speed. //--- forwarded letter ------------------------------------------------------- > X-Mailer: Mozilla 4.5 [en]C-DIAL (Win95; U) > Date: Sat, 12 Dec 98 10:54:09 -0500 > From: "Tim Truax" <truax@usaor.net> > To: "MIDRANGE-L list" <MIDRANGE-L@midrange.com> > Reply-To: MIDRANGE-L@midrange.com > Subject: clp-->rpg-->qcmdexc--many ovrdbf's > > Hello all, > I am interested to learn if there is a way to do the following: > I have a CL program that loads the 'mother of all RPG programs' and > within this 'mother RPG program' it is using the QCMDEXC call to set > upward of 40 or 50 file overrides (OVRDBF), which it then opens and > closes as it uses them. This 'mother RPG program' also extracts > information very quickly and then immediately returns to the caller. I > have used the LOG(4 0 *SECLVL) as well as the LOGCLPGM(*YES) to see if I > could get the AS400 to log these RPG Program QCMDEXC calls that do the > OVRDBF on many files, but to no avail... Any suggestions from the > distinguished list appreciated. > Thanks so much! > Tim Truax +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@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 mailing list archive is Copyright 1997-2025 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.