Free software training Videos

Free software training Videos
https://www.youtube.com/user/VLRTraining

List Of Best WebSites

Sunday, 25 November 2012

monmsg in cl programmin

Monitor Message (MONMSG)

 

The Monitor Message (MONMSG) command is used to monitor escape, notify, and status messages sent to the program message queue of the program in which the command is used. Completion and diagnostic messages cannot be monitored.

Referance 

----------------------
 EXAMPLE-1
         *************** Beginning of data *****************************
0001.00 PGM                                                          
0002.00 CRTSRCPF FILE(A434567890)                                    
0003.00              MONMSG     MSGID(CPF7302) EXEC(GOTO CMDLBL(END1))
0004.00              SNDUSRMSG  MSG('physical file created')         
0005.00       /*       DLTF       FILE(A434567890)        */              
0006.00  END1:       ENDPGM                                          
        ****************** End of data ********************************

EXAMPLE-2
        *************** Beginning of data *************************************
0001.00 PGM                                                                    
0002.00              DCL        VAR(&A) TYPE(*DEC) LEN(3) VALUE(123)           
0003.00              DCL        VAR(&C) TYPE(*CHAR) LEN(5)                     
0004.00              DCL        VAR(&B) TYPE(*DEC) LEN(3)                      
0005.00              CHGVAR     VAR(&A) VALUE(&A / &B)                         
0006.00            MONMSG     MSGID(MCH1211) EXEC(CHGVAR VAR(&A) VALUE(1))     
0007.00              CHGVAR     VAR(&C) VALUE(&A)                              
0008.00              SNDUSRMSG  MSG(&C)                                        
0009.00              ENDPGM                                                    
        ****************** End of data **************************************** 

No comments:

Post a Comment