As the others have said, I generally do a MONMSG CPF0000 at the top for unexpected stuff and handle any specific errors in the code. This one pages the on-call programmer if there is something I hadn't thought of. It dumps the program so I can see what the variables were at the time of the error. PGM RTVJOBA JOB(&JOB) USER(&USER) NBR(&NBR) /* General error trap (will page programmer and exit). */ MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(ERROR)) /* Delete the archive from the last run for this due day. */ /* Go to the IFS root, then attempt to go to the statement directory. */ CHGCURDIR DIR('/') CHGCURDIR DIR(&STM_ROOT) /* Create the root statements folder if not found. */ MONMSG MSGID(CPFA0A9) EXEC(DO) CRTDIR DIR(&STM_ROOT) CHGCURDIR DIR(&STM_ROOT) ENDDO /* If directory not found, create it. */ CHGCURDIR DIR('/') CHGCURDIR DIR(&STM_ROOT) CHGCURDIR DIR(&SUBDIR) MONMSG MSGID(CPFA0A9) EXEC(DO) CRTDIR DIR(&DIR) ENDDO RETURN /* Error processing (general). */ ERROR: LXIPAG/SNDPAGMSG MSG('Job' *BCAT &NBR *TCAT '/' *TCAT + &USER *TCAT '/' *TCAT &JOB *BCAT 'had an + unexpected error. See job log and dumps + for job.') TOUSERS((PROGRAMMER AR)) MONMSG MSGID(CPF0000) DMPCLPGM RETURN ENDPGM Francis Lapeyre IS Dept. Programmer/Analyst Stewart Enterprises, Inc. E-mail: flapeyre@xxxxxxxx -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jerry Draper Sent: Thursday, November 16, 2006 4:49 PM To: Midrange Systems Technical Discussion Subject: monmsg question I have a CL that does a monmsg at the top of my CL after the DLC's which I thought would apply all the way to the end of the CL eliminating the need to MONMSG each command. I want this CL to finish without halting. Jerry MONMSG MSGID(CPF9000 CPF3000) However after doing a RSTLIB *ALLUSR I get this unmonitored message: CPF3779 Escape 30 11/13/06 19:30:32 *N *N *N RESTHAC Message . . . . : 305 libraries restored; 35 partially restored; 0 not restored. which triggers a halt CPF9999 Escape 40 11/13/06 19:30:32 QMHUNMSG *N RESTHAC Message . . . . : Function check. CPF3779 unmonitored by RESTHAC at statement 4100, instruction X'0029'. and then, in anguish: CPA0701 Inquiry 99 11/13/06 19:30:32 QCLXERR QSYS 00C6 *EXT Message . . . . : CPF3779 received by RESTHAC at 4100. (C D I R) Cause . . . . . : Control language (CL) program RESTHAC in library UUJDRAPER1 detected an error at statement number 4100. Message text for CPF3779 is: 305 libraries restored; 35 partially restored; 0 not restored.
This mailing list archive is Copyright 1997-2013 by MIDRANGE dot 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 here. If you have questions about this, please contact