Subject: | |
From: | |
Reply To: | VANCE,JEFF (HP-Cupertino,ex1) |
Date: | Tue, 18 Jan 2000 15:38:18 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
David's example appears to work fine, although there may be more than
one job output by the SHOWJOB command. If you are on 6.0 you can use
the new JINFO and JOBCNT CI functions. E.g.
setvar jcnt JOBCNT("job,user.acct",job_list)+1
while setvar(jcnt,jcnt-1) > 0 do
setvar jobid word(job_list,,jcnt)
setvar pin JINFO(jobid,"CIPIN",cierror)
if cierror = 0 then
continue
altproc !pin;pri=CS;tree
endif
endwhile
This will do an ALTPROC on all job/sessions that match your
"jobname,user.accout" specification. There are ways to make
this example more compact, and to handle the case of more jobs
matching than can fit in a CI variable ("job_list", in my
example above), but I hope it serves its example purpose.
> Setvar cierror 0
> Showjob job,user.account>tmp1
> If cierror = 0
> Print tmp1;start=4;end=4>tmp2
> Input j<tmp2
> Setvar jobnum lft(j,8)
> Altproc job=!jobnum;pri=cs
> Else
> Echo cant find job.
> Endif
regards,
Jeff Vance, CSY
p.s. and please note I have not tested the example script above!
|
|
|