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



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.



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.