SPECS is indeed your friend here:
   '|SPECS /'thisHost'/ 1  21-28 9 41-48 19 29-32 29 ',
             '$'CrDate'$ NW',
Note the quotes: what is outside the quotes will be analyzed by REXX, so
your variable is used indeed in the PIPE when it gets executed.

If you wouldn't need a SPECS for other purposes, you could use INSERT
   '| INSERT /'ThisHost '/ Before',
   '|INSERT $' CrDate'/' after',

Note= you can see we use a delimiter (/ and $ above), it should obviously
not occur in what you want to insert, similar for PIPE's stage separator
and end-character.  If what you insert can be anything, a trick is to
convert it to HEX in REXX and tell PIPE you insert a HEX string:
   '|SPECS X'c2x(ThisHost' ') '1  21-28 9 41-48 19 29-32 29 ',


Kris Buelens,
     --- freelance z/VM consultant, Belgium ---
-----------------------------------------------------------------------


2014-07-28 18:21 GMT+02:00 Miguel Soltero Diaz <[email protected]>:

> Hi guys,
> I hit the send bottom too soon...
>
> Basically I need to add the result of a CMS command at the beginning of
> each record, and current date at the end of the record (or viceversa).
> I want to execute the commands only ones, place them in a variable and
> insert those variables in the pipe, before and after the SPECS ...
>
> crdate = date(standard)
> say 'date is ' crdate
> thishost = strip(VMINQ(vmhost))
> say 'host is ' thishost
>
> 'pipe (endchar ?)',
>   '< AUDIT EXTRCT1',
>   '| a1: locate (29-32) /0690/ ',
>   '| SPECS /thishost/ 1 ',
>   '| specs  21-28 9 41-48 19 29-32 29 ',
>   '| b: faninany',
>   '|  > AUDIT SUBset3 A',
>   '? a1:',
>   '| a2: locate (29-32) /1090/ ',
>   '| SPECS 21-28 9 33-40 19 29-32 29',
>   '| b: '
>
> would like to insert THISHOST to the beginning of each record and CRDATE
> at the end of the same...
> How can I do this?
>
> Thank you...
>
> Miguel
>

Reply via email to