HP3000-L Archives

May 2001, Week 5

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:
Mark Bixby <[log in to unmask]>
Reply To:
Mark Bixby <[log in to unmask]>
Date:
Wed, 30 May 2001 15:26:31 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (96 lines)
I am truly impressed by the inventiveness of the HP3000-L crowd on this
thread.  :-)

Let me illustrate my Perl solution with a real example.  Note there are no
problems with parent jobs no longer running or filename collisions.

The Perl code which creates a temporary copy and then streams a job after
replacing all occurences of {CI expression} with the evaluated results of that
expression (the finfo call is needed to convert MPE-style filenames into
HFS-style filenames required by Perl):

:print estream
parm streamfile
xeq perl.pub.perl &
  "-p -e 's/{([^}]*)}/substr(`callci echo !\[$1\]`,0,-3)/eg' &
  ![finfo('!streamfile','posixfullfname')]" &
  >$newpass
stream $oldpass

The first job which needs to propagate its HPSTREAMEDBY into the second job:

:print job1
!job job1,mgr.bixby;outclass=,2
!showvar HPSTREAMEDBY
!estream job2
!eoj

The second job that needs to refer to the original HPSTREAMEDBY value:

:print job2
!job job2,mgr.bixby;outclass=,2
!setvar wasstreamedby '{HPSTREAMEDBY}'
!showvar @streamedby
!eoj

And the results...

:stream job1
 #J88
:listspf

SPOOLID    JOBNUM   FILEDES  PRI COPIES DEV      STATE  RSPFN OWNER

#O652      J88      $STDLIST   2      1 LP       READY        MGR.BIXBY
#O653      J89      $STDLIST   2      1 LP       READY        MGR.BIXBY

...snip...

:print o652.out.hpspool;page=0


 :JOB JOB1,MGR.BIXBY,PUB.
 Priority = DS; Inpri = 8; Time = UNLIMITED seconds.
 Job number = #j88.
 WED, MAY 30, 2001,  3:13 PM.
 HP3000  Release: C.65.00   User Version: C.65.00
 MPE/iX  HP31900 C.25.06  Copyright Hewlett-Packard 1987.
 All rights reserved.
 STREAMED BY MGR.BIXBY (#S311) ON LDEV# 5
    STREAM DATE:   WED, MAY 30, 2001,  3:13 PM

 :showvar HPSTREAMEDBY
 HPSTREAMEDBY = MGR.BIXBY (#S311)
 :estream job2
  #J89
 :eoj
 CPU sec. = 1.  elapsed min. = 1.  WED, MAY 30, 2001,  3:13 PM.

:print o653.out.hpspool;page=0


 :JOB JOB2,MGR.BIXBY,PUB.
 Priority = DS; Inpri = 8; Time = UNLIMITED seconds.
 Job number = #j89.
 WED, MAY 30, 2001,  3:13 PM.
 HP3000  Release: C.65.00   User Version: C.65.00
 MPE/iX  HP31900 C.25.06  Copyright Hewlett-Packard 1987.
 All rights reserved.
 STREAMED BY JOB1,MGR.BIXBY (#J88) ON LDEV# 10
    STREAM DATE:   WED, MAY 30, 2001,  3:13 PM

 :setvar wasstreamedby 'MGR.BIXBY (#S311)'
 :showvar @streamedby
 HPSTREAMEDBY = JOB1,MGR.BIXBY (#J88)
 WASSTREAMEDBY = MGR.BIXBY (#S311)
 :eoj
 CPU sec. = 1.  elapsed min. = 1.  WED, MAY 30, 2001,  3:13 PM.

No muss, no fuss, and free too!  :-)
--
[log in to unmask]
Remainder of .sig suppressed to conserve scarce California electrons...

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2