Operating System - OpenVMS
1829108 Members
15175 Online
109986 Solutions
New Discussion

Command procedure to get entry number of PENDING jobs

 
SOLVED
Go to solution
ChaimBu
Frequent Advisor

Command procedure to get entry number of PENDING jobs

Could someone please either point me to an example or give me an example of a command proceudre which will print out the entry number for any job which is in a PENDING status. I have been attempting at writing one, but the F$GETQUI lexical function is somewhat complicated, and I cannot seem to get what I want.

Thanks in advance,

Chaim
5 REPLIES 5
Karl Rohwedder
Honored Contributor
Solution

Re: Command procedure to get entry number of PENDING jobs

The attached example is a slight modification of an example in HELP LEX F$GETQUI.

regards Kalle
Ian Miller.
Honored Contributor

Re: Command procedure to get entry number of PENDING jobs

and there are several examples of the use of F$GETQUI at
dcl.openvms.org
____________________
Purely Personal Opinion
David B Sneddon
Honored Contributor

Re: Command procedure to get entry number of PENDING jobs

Depending on you exact requirements...

SHOW QUEUE/ALL/BY_JOB_STATUS=PENDING

Dave
Robert_Boyd
Respected Contributor

Re: Command procedure to get entry number of PENDING jobs

Chaim,

Please take a look at

http://dcl.openvms.org/stories.php?story=05/04/04/4429625

This command procedure can be used to locate jobs in any particular state.

For example

$ @findjob * sys*batch* * pending_entry pending_jobs

Robert
Master you were right about 1 thing -- the negotiations were SHORT!
Manny DeAssis
Frequent Advisor

Re: Command procedure to get entry number of PENDING jobs

If you want a command procedure, I agree with Robert, go to http://dcl.openvms.org

Otherwise if you just want something quick and dirty to spit out the number of pending jobs under the current queue manager you can try these:

The third line of the this example will generate 'xxx lines read...' That number will represent the amount of jobs pending:

$ show queue /all /by_job=pend /out=jobs.tmp
$ sear jobs.tmp "pend" /output=jobs.tmp2
$ edit/tpu/nodisp jobs.tmp2

This next example will display the pending count next to 'Records matched':

$ pipe show queue /all /by_job=pen | sear sys$pipe "pen" /noout /stat | sear sys$pipe "records matched"

Hope this helps.