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.

             RTVJOBA    JOB(&JOB) USER(&USER) NBR(&NBR)

/* General error trap (will page programmer and exit).


/* 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)                                  
/* If directory not found, create it.                                */ 
             CHGCURDIR  DIR('/')                                        
             CHGCURDIR  DIR(&STM_ROOT)                                  
             CHGCURDIR  DIR(&SUBDIR)                                    
             MONMSG     MSGID(CPFA0A9) EXEC(DO)                         
             CRTDIR     DIR(&DIR)                                       



/* Error processing (general). */


                          &USER *TCAT '/' *TCAT &JOB *BCAT 'had an +

                          unexpected error. See job log and dumps +

                          for job.') TOUSERS((PROGRAMMER AR))

             MONMSG     MSGID(CPF0000)





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.


  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

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 

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

Return to Archive home page | Return to MIDRANGE.COM home page