Miguel,

Remove the:  '| SPECS /thishost/ 1 ',
(that just adds a record with ‘thishost’ before all the other records).

Then select any one of these:
1)
•       After the FANINANY:
        ‘| INSERT  /’thishost’/ BEFORE’ ,
        ‘| INSERT /’crdate’/ AFTER’ ,
Or 2)
•       After the FANINANY:
      ‘| SPECS /’thishost’/ 1’ ,
               ‘1-* Next’,
              ‘/’crdate’/ Next’ ,
Or 3)
•       Change the SPECS stages to:
    ‘| SPECS /’thishost’/ 1’ ,
              ‘21-28 9 41-48 19 29-32 29',
            ‘/’crdate’/ Next’ ,
   And:
    ‘| SPECS /’thishost’/ 1’ ,
              ‘21-28 9 33-40 19 29-32 29',
            ‘/’crdate’/ Next’ ,

Three choices -- the last is most efficient, but the others broaden your 
exposure to Pipes.
If you need a space after ‘thishost’, change ‘Next’ to ‘Nextword’, if you need 
a space before ‘crdate’, again change its ‘Next’ to ‘Nextword’.

Mike Walter
Aon Corporation
The opinions expressed herein are mine alone, not necessarily those of my 
employer.

-----Original Message-----
From: CMSTSO Pipelines Discussion List [mailto:CMS-PIPELINES@VM.MARIST.EDU] On 
Behalf Of Miguel Soltero Diaz
Sent: Monday, July 28, 2014 11:21
To: CMS-PIPELINES@VM.MARIST.EDU
Subject: Re: Continuation from last post.

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  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