Hi *,
I'm trying to make some decision, when scdtime of one of my my daily jobs has passed.
Program looks like:
H dftactgrp(*no) actgrp(*caller)
************************************************** ***************
D text S 200
************************************************** ***************
D qcmdexc PR extpgm('QCMDEXC')
D command 1024 const options(*varsize)
D comandLength 15 5 const
D************************************************* ****************
D*
/free
text = 'sbmjob (test_job) cmd(call blablabla) scdtime(100000)';
monitor;
qcmdexc(%trimr(text):%len(%trimr(text)));
on-excp 'CPF1634'; //Specified date or time has passed.
dsply 'Got U!';
//TO_DO - run now or don't run
endmon;
*inlr = *on;
/end-free
This program ends with an error. I can find in joblog (in order: CPF1634 and CPF1338):
Specified date or time has passed
Errors occurred on SBMJOB command
Is there any way to catch the first one (diagnostic) of those messages using on-excp?
I'm trying to make some decision, when scdtime of one of my my daily jobs has passed.
Program looks like:
H dftactgrp(*no) actgrp(*caller)
************************************************** ***************
D text S 200
************************************************** ***************
D qcmdexc PR extpgm('QCMDEXC')
D command 1024 const options(*varsize)
D comandLength 15 5 const
D************************************************* ****************
D*
/free
text = 'sbmjob (test_job) cmd(call blablabla) scdtime(100000)';
monitor;
qcmdexc(%trimr(text):%len(%trimr(text)));
on-excp 'CPF1634'; //Specified date or time has passed.
dsply 'Got U!';
//TO_DO - run now or don't run
endmon;
*inlr = *on;
/end-free
This program ends with an error. I can find in joblog (in order: CPF1634 and CPF1338):
Specified date or time has passed
Errors occurred on SBMJOB command
Is there any way to catch the first one (diagnostic) of those messages using on-excp?
Comment