| 
 | 
On Thu, 24 May 2001, I wrote:
<snipped>
Here's the CL code for WAIT4ME - I use for debugging RPG programs so
hopefully it's not too off topic here ;-) Just include the line[1] 
      C                   CALL      'WAIT4ME'
at the start of the program you're wanting to debug
Regards, Martin
[1] and remember to remove it afterwards ;-)
/********************************************************************/
/* WAIT4ME: Send reply message to submitting user, & wait for reply */
/* MJR      Mar'98                                                  */
/********************************************************************/
PGM
  DCL        VAR(&MSGDTA) TYPE(*CHAR) LEN(512)
  DCL        VAR(&TOUSR) TYPE(*CHAR) LEN(10)
  DCL        VAR(&JOB) TYPE(*CHAR) LEN(10)
  DCL        VAR(&INQMSGRPY) TYPE(*CHAR) LEN(10)
  DCL        VAR(&JOBNBR) TYPE(*CHAR) LEN(6)
  DCL        VAR(&QUALJOB) TYPE(*CHAR) LEN(28)
  DCL        VAR(&MSGRPY) TYPE(*CHAR) LEN(1)
  MONMSG     MSGID(CPF0000)
  RTVJOBA    JOB(&JOB) USER(&TOUSR) NBR(&JOBNBR) +
               INQMSGRPY(&INQMSGRPY)
  CHGJOB     INQMSGRPY(*RQD)
  CHGVAR     VAR(&QUALJOB) VALUE(&JOBNBR || '/' |< &TOUSR |< +
               '/' |< &JOB)
  CHGVAR     VAR(&MSGDTA) VALUE(&QUALJOB)
/* Send the message, and pass back the reply */
  SNDUSRMSG  MSGID(INQ1111) MSGF(MyMsgF) +
               MSGDTA(&MSGDTA) TOUSR(&TOUSR) MSGRPY(&MSGRPY)
  CHGJOB     INQMSGRPY(&INQMSGRPY)
ENDPGM:
  RETURN
ENDPGM
/********************************************************************/
/* Add this message to the message file used above ... +
     ADDMSGD MSGID(INQ1111) MSGF(MyMsgF) MSG('Your program is +
     active. Run STRSRVJOB JOB(&1) followed b, then reply to this +
     message with a G.') SEV(99) FMT((*CHAR   28)) TYPE(*CHAR) +
     LEN(1) VALUES('G' 'g') SPCVAL(('g' 'G'))                       */
/********************************************************************/
--  
martin@dbg400.net / jamaro@firstlinux.net 
http://www.dbg400.net DBG/400 - DataBase Generation utilities  
Open Source test environment tools for the AS/400 / iSeries and 
miscellaneous database & spooled file management commands.
+---
| 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-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.