Interesting choice of the use of "{" and "}" to denote an "environment
variable" [if your font is hard to read or distinguish, these are "curly
braces" -- the "shifted" version of "[" and "]" -- as opposed to mere
"parenthesis" ("(" and ")") ]
Interesting because this is the "standard" replacement character used by
VESOFT's Streamx product. (since I've never used Maestro or any other third
party product, do they also use curly-braces?) In any event, VESOFT's
strategy, when seeing these characters, is to replace them with the
EVALUATED RESULT of the contents of the braces -- your example below shows
the result based on the presumption that the contents of the braces would
indeed be an "environment variable", but is perl limited to such an
"evaluation"? [I expect not, which is partly why I'm asking -- I suspect
Perl could be used to "evalute" {1+2} in this same context, correct? If so,
I might not need to pursue purchasing a streamx license after all...]
> -----Original Message-----
> From: Mark Bixby [mailto:[log in to unmask]]
>
> "Alan R. Grill" wrote:
> >
> > Is there a way to pass VARS and/or Parameters to a Job Stream.
>
> OK, I hope you all knew this was coming ;-) -- here's how you
> could do this
> with Perl to replace all hits of {VARNAME} with the contents
> of VARNAME and
> then stream the job:
>
> :print ESTREAM
> parm streamfile
> xeq perl.pub.perl "-p -e 's/{([^}]*)}/$ENV{$1}/' !streamfile"
> >$newpass
> stream $oldpass
>
>
> :print TJOB
> !job test,mark.bixby;outclass=,2
> !tellop streamed by the user at {HPREMIPADDR}
> !eoj
>
>
> :ESTREAM TJOB
> #J34
>
>
> :print !hplastspid.out.hpspool
>
>
> :JOB TEST,MARK.BIXBY,PUB.
> Priority = DS; Inpri = 8; Time = UNLIMITED seconds.
> Job number = #j34.
> WED, OCT 25, 2000, 4:16 PM.
> HP3000 Release: C.60.00 User Version: C.60.00
> MPE/iX HP31900 C.16.01 Copyright Hewlett-Packard 1987.
> All rights reserved.
> STREAMED BY MARK.BIXBY (#S25) ON LDEV# 4
> STREAM DATE: WED, OCT 25, 2000, 4:16 PM
> :tellop streamed by the user at 192.168.0.2
> :eoj
> CPU sec. = 1. elapsed min. = 1. WED, OCT 25, 2000, 4:16 PM.
>
> - Mark B.
>
|