OPENMPE Archives

January 2003

OPENMPE@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"VANCE,JEFF (HP-Cupertino,ex1)" <[log in to unmask]>
Reply To:
VANCE,JEFF (HP-Cupertino,ex1)
Date:
Wed, 8 Jan 2003 13:05:45 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (44 lines)
Hi Jon,

> It seems that JINFO only works
> against jobs that are either executing or waiting.

Or scheduled or :breakjob'd.

> If I do "CALC
> JINFO('#J1234','EXISTS') it comes back TRUE for executing and
> waiting jobs
> but if #J1234 is in the 'READY' state it comes back false.

If you don't see the job/session via :showjob then JINFO will
not see it either.

> while jinfo('!hplastjob','StdlistSPstate') <> "READY"
              ^^^ minor note: the quotes and ! can be omitted
>   echo processing...
>   pause 5
> endwhile
>
>         I'm trying to wait for the job to finish but if the
> job is already finished
> by the time it gets to the loop it fails with an error (Job
> does not exist.
> (CIERR 3042)) even though the 'JINFO' documentation states
> that READY is one
> of the possible responses for this option.  Anybody have any thoughts?

There may be a window where STDLIST output is ready and the job still
exists (probably small if the condition exists at all). More likely,
the documentation should be changed to remove that state, even though
READY is a valid spoolfile state.

As has been mentioned the PAUSE job=#Jnnn command is a good way to wait
for a job to terminate.  If the job is already done the PAUSE command
returns immediately. You can also place a maximum number of seconds to
wait for the job to complete and PAUSE will return once the job finishes
or that max seconds expires, which ever occurs first.  I believe that
PAUSE will be more efficient than JINFO in a WHILE loop.

HTH,
 Jeff Vance, "CSY"

ATOM RSS1 RSS2