Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to check for active job?

104 views
Skip to first unread message

Brian B. Christensen

unread,
Jun 19, 2002, 8:40:48 AM6/19/02
to
Hi,

I need some help for a small program that will check if a job is
active.

I was trying the following:

-------------------------------------------------
DSPJOB JOB(NUMBER/USER/JOB)
MONMSG(CPF1070) EXEC(not found).

job is found

not found: ENDPGM
-------------------------------------------------


But if the job has old spooledfiles and the jobstatus is OUTQ, CPF1070
is not catching this. It will act like the job is active.

How do i do, if i want to check if the job is found and active or not?


Regards
Brian

Brian B. Christensen

unread,
Jun 19, 2002, 8:50:23 AM6/19/02
to
On Wed, 19 Jun 2002 14:40:48 +0200, Brian B. Christensen
<bb...@hotmailen.com> wrote:

>How do i do, if i want to check if the job is found and active or not?


I was finding out already. I will do a DSPLOGLOG. This is failing if
the job is not ACTIVE at all.

/Brian

Henk Rotman

unread,
Jun 19, 2002, 9:01:31 AM6/19/02
to
Why don't you use WRKUSRJOB? You can check all your (and others) jobs;
wether they are active, in jobq or outq.
The only thing you need is a command rule.

Henk

Brian B. Christensen <bb...@hotmailen.com> schreef in berichtnieuws
ggu0hus0amg3f43ae...@4ax.com...

Brian B. Christensen

unread,
Jun 19, 2002, 9:07:10 AM6/19/02
to
On Wed, 19 Jun 2002 15:01:31 +0200, "Henk Rotman" <kne...@hotmail.com>
wrote:

>Why don't you use WRKUSRJOB? You can check all your (and others) jobs;
>wether they are active, in jobq or outq.
>The only thing you need is a command rule.

Because I'm reading the job number, job name and user from a file. And
i only want to check these jobs.

Regards
Brian

Henk Rotman

unread,
Jun 19, 2002, 9:33:12 AM6/19/02
to
I 've tried this on the command rule:
DSPJOB JOB(NUMBER/USER/JOB) OPTION(*STSA)

If the job is in OUTQ I get CPF1070, if active not, can't check what i see
when the job is in jobq.

Henk


Brian B. Christensen <bb...@hotmailen.com> schreef in berichtnieuws

6d01hu42a7b8aeofl...@4ax.com...

Rodney Johnson

unread,
Jun 19, 2002, 9:28:21 AM6/19/02
to
Brian, Use API QUSRJOBI to extract the job's status. If job is gone you
will get an error message you can check for. If not, you can check the
job status. API documentation is under programming in the InfoCenter.

URL for InfoCenter:
http://as400bks.rochester.ibm.com/pubs/html/as400/infocenter.htm

"Brian B. Christensen" wrote:

--
Rodney A Johnson
Technical Team Lead for AS/400 Spool
Dept GJC
IBM Rochester, Minnesota

The contents of this message express only the sender's opinion.
This message does not necessarily reflect the policy or views of
my employer, IBM. All responsibility for the statements
made in this Usenet posting resides solely and completely with the
sender.

Brian B. Christensen

unread,
Jun 19, 2002, 9:51:53 AM6/19/02
to
On Wed, 19 Jun 2002 08:28:21 -0500, Rodney Johnson
<rjoh...@rchland.ibm.com> wrote:

>Brian, Use API QUSRJOBI to extract the job's status. If job is gone you
>will get an error message you can check for. If not, you can check the
>job status. API documentation is under programming in the InfoCenter.

Thanks. This is exactly what i need.

Regards Brian

0 new messages