Using SPEC to construct a pipeline that is then issued with PIPCMD is still
a sipping pipeline and performance will not be improved (but you do get rid
of the REXX file).
I've always considered the omission of a CHANGE() function in REXX to be a
mistake, so Jim got me to bite the bullet and add a SUBSTITUTE() function to
the 407 emulator.
Armed with that function, you can give the lines of substitution a unique
prefix, perhaps two periods, and merge them with the JCL files (use getfiles
to read them). Then do something like this (untested):
|spec a: 1.2 . if a==".."
then set ( #0:=word(record(), 2); #1:= ...) nowrite
else
print substitute(substitute(substitute(record, "$var1", #0), "$var2",
#1), "$var3", #3) 1
endif
It should even be possible to support a variable number of substitutions up
to some limit (which you must specify by the COUNTERS option) the loop using
do ... done to load the counters and perform the substitutions. (And do be
sure to terminate the loop, but if you forget, "pipmod stop active" should.)
It is in the NXPIPE now at the homepage.
Enjoy,
j.