Using VESoft's MPEX:
%FILTER "SHOWJOB","SCHED" AND "JOBNAME,USER.ACCT" >$NULL
%IF MPEXPRINTLINESFOUND = 1 THEN
% ECHO JOB IS SCHEDULED
%ELSE
% IF MPEXPRINTLINESFOUND = 0 THEN
% ECHO JOB IS NOT SCHEDULED
% ELSE
% ECHO JOB IS MULTIPLY SCHEDULED
% ENDIF
%ENDIF
Jeff Kell wrote:
>
> Is there a simple (i.e., not doing a showjob and parsing output) way to
> determine if a scheduled job exists?
>
> We have a :JOBCHECK command file which checks to insure that all of our
> daemon and other type background jobs are running by issuing a
> :tell jobname,user.acct Are you there? and then checking the CIERROR
> for the unique message saying that the only qualifying target is a job,
> so the job does exist. If you get the error saying no such job exists,
> you can take action to restart it.
>
> However, I have found no equivalent for scheduled jobs. Surely I'm
> overlooking something obvious...
>
> Jeff Kell <[log in to unmask]>