HP3000-L Archives

June 1995, Week 2

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:
Thu, 8 Jun 1995 14:10:38 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (64 lines)
On Jun 8, 11:23am, James Bennett wrote:
> Subject: Getting Job Number from Stream Command
> On MPE/iX, I need to get the job number issued by the STREAM
> command.  Currently my only working theory is to run a separate
> process (CI or whatever), with the STREAM command in the INFO
> parm and redirect STDLIST to a file for later examination.
> While doable, this seems like too much effort (and overhead)
> for each job.
>
> I looked for a HP CI variable but nothing jumped out at me.
 
On Express 3 of MPE/ix 5.0 there is a new CI variable named HPLASTJOB
which contains the job id of the last job you streamed.  Eg:
  :stream jfoo
  :showvar hplastjob
  HPLASTJOB = "#J123"
 
>
> Any other (non-PM) ideas or clues?
 
Here is a UDC that I used to use to capture the stream job id:
 
 
STREAM
ANYPARM parms=%null%
comment Sets HPLASTJOB to the job number returned by :stream, which is in the
comment second to last line of :stream output. This is the first line if no
comment warnings occur.
setvar _stream_parms '!parms'
if _stream_parms = '%null%' then
   setvar _stream_parms ''
   if hpinteractive then
      echo You will not see the ">" prompt, but enter commands as usual...
   endif
endif
file strlist;msg
errclear
continue
stream !_stream_parms >*strlist
if hpcierr <> 0 then
   echo !hpcierrmsg
endif
if hpcierr <= 0 then
   if finfo('strlist','eof') > 2 then
      comment Find second to last record.
      print strlist;start=-2;end=-2 >strlist1
      file strlist=strlist1
   endif
   input _stream_rec <*strlist
   setvar _stream_rec ltrim(rtrim(_stream_rec))
   if lft(_stream_rec,2) = '#J' then
      setvar hplastjob _stream_rec
      showvar hplastjob
   endif
endif
reset strlist
purge strlist,temp
deletevar _stream_@
*
 
Jeff Vance, MPE Lab
 
--

ATOM RSS1 RSS2