HP3000-L Archives

January 1996, Week 4

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:
Jeff Vance <[log in to unmask]>
Reply To:
Jeff Vance <[log in to unmask]>
Date:
Wed, 24 Jan 1996 18:08:15 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (52 lines)
Hi Leonard,
 
 
Thanks for the explanation of your need to be able to find out the
spoolfile number of a given job.
 
 
Here is a command file that should be able to do that:
 
PARM jobnum=!hplastjob, rtnvar=spid, entry=main
# (This command file assumes Express 3 release, if you are not on Express 3
# then change all '#' to 'comment' and change '!hplastjob' to ''.)
#
# This command file returns the spoolfile id (Onnnnnnn) in the CI variable
# named in the "rtnvar" parm.  To reference this file you may need to
# append ".OUT.HPSPOOL" to the value in "rtn_parm".  Example:
#   :jobspid #J123 spid
#   :print !spid.out.hpspool
#
if '!entry' = 'main' then
   # main entry, redirect output of :listspf
   errclear
   setvar !rntvar ''
   # could syntax check jobnum parm here...
   listspf O@;seleq=[JOBNUM=!jobnum AND FILEDES=$stdlist] >./jobspid_tmp
   if hpcierr <> 0 then
      # listspf couldn't find job
      echo !jobnum not found.
      escape
   else
      xeq !hpfile !jobnum, !rtnvar, entry=parse_listspf <./jobspid_tmp
      deletevar _job2spid_@
      return
   endif
 
elseif '!entry' = 'parse_listspf' then
   # listspf input has been redirected to TEMP file ./jobspid_tmp
   # throw away 1st 3 lines.
   input _jobspid_rec
   input _jobspid_rec
   input _jobspid_rec
   setvar !rtnvar rtrim(str(input(),2,8))
   return
endif
 
 
I've put this script on jazz under Sources and Binaries / Scripts
 
Jeff Vance, MPE/iX Lab
 
--

ATOM RSS1 RSS2