HP3000-L Archives

January 2000, Week 3

HP3000-L@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:
Tue, 18 Jan 2000 15:38:18 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (36 lines)
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!

ATOM RSS1 RSS2