Hi All,
I want to delete journal receivers and then monitor for any errors that occur as a part of deletion.
After monitoring i want to send email to my inbox containing the error text and error ID.
Below is the code i am trying with variables along with there lenghts declared .
Please let me know if this is correct
DCL VAR(&MSGID) TYPE(*CHAR) LEN(7) VALUE(' ')
DCL VAR(&MSGTEXT) TYPE(*CHAR) LEN(300) VALUE(' ')
DCL VAR(&MSGF) TYPE(*CHAR) LEN(10) VALUE(' ')
DCL VAR(&MSGFLIB) TYPE(*CHAR) LEN(10) VALUE(' ')
DCL VAR(&VAR1) TYPE(*CHAR) LEN(30) VALUE('The +
journal receiver name is ')
DCL VAR(&VAR2) TYPE(*CHAR) LEN(20) VALUE('The +
error code is')
DLTJRNRCV JRNRCV(*LIBL/&journalreceiver) DLTOPT(*IGNINQMSG)
MONMSG MSGID(CPF0000) EXEC(DO)
RCVMSG MSGTYPE(*EXCP) MSG(&MSGTEXT) MSGID(&MSGID) +
MSGF(&MSGF) MSGFLIB(&MSGFLIB)
SNDDST TYPE(*LMSG) +
TOINTNET(('xxx@xxx.com')) +
DSTD(EMAIL) LONGMSG(' ' *TCAT &MSGTEXT +
*BCAT &VAR1 *BCAT &ODOBNM *BCAT &VAR2 +
*BCAT &MSGID *TCAT ' ') SUBJECT('xxx')
Thanks
Sumit
I want to delete journal receivers and then monitor for any errors that occur as a part of deletion.
After monitoring i want to send email to my inbox containing the error text and error ID.
Below is the code i am trying with variables along with there lenghts declared .
Please let me know if this is correct
DCL VAR(&MSGID) TYPE(*CHAR) LEN(7) VALUE(' ')
DCL VAR(&MSGTEXT) TYPE(*CHAR) LEN(300) VALUE(' ')
DCL VAR(&MSGF) TYPE(*CHAR) LEN(10) VALUE(' ')
DCL VAR(&MSGFLIB) TYPE(*CHAR) LEN(10) VALUE(' ')
DCL VAR(&VAR1) TYPE(*CHAR) LEN(30) VALUE('The +
journal receiver name is ')
DCL VAR(&VAR2) TYPE(*CHAR) LEN(20) VALUE('The +
error code is')
DLTJRNRCV JRNRCV(*LIBL/&journalreceiver) DLTOPT(*IGNINQMSG)
MONMSG MSGID(CPF0000) EXEC(DO)
RCVMSG MSGTYPE(*EXCP) MSG(&MSGTEXT) MSGID(&MSGID) +
MSGF(&MSGF) MSGFLIB(&MSGFLIB)
SNDDST TYPE(*LMSG) +
TOINTNET(('xxx@xxx.com')) +
DSTD(EMAIL) LONGMSG(' ' *TCAT &MSGTEXT +
*BCAT &VAR1 *BCAT &ODOBNM *BCAT &VAR2 +
*BCAT &MSGID *TCAT ' ') SUBJECT('xxx')
Thanks
Sumit
Comment