Jim Hughes' second offering clearly does what you want.  If you prefer not
to use the IF convenience, his translates to
 
   'PIPE (end ?)',
      '< test file a |',
     'xxx: locate /APPLES/ |',
      'spec /ORANGES/ 1 write 1-* 1 |',
     'i: faninany |',
      '> new file a',
    '?',
     'xxx: | i:'
 
                    Marty
____________________ 
Martin Zimelis 
Principal 
maz/Consultancy 


  _____  

From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On
Behalf Of Huegel, Thomas
Sent: Tuesday, March 06, 2007 12:44 PM
To: [email protected]
Subject: Re: Realy simple pipe insert ?


Marty,
 
Yes I want to pass the entire file to 'new file a' and insert ORANGES before
APPLES.
 
Thanks

-----Original Message-----
From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED]
Behalf Of Marty Zimelis
Sent: Tuesday, March 06, 2007 11:41 AM
To: [email protected]
Subject: Re: Realy simple pipe insert ?


I'm guessing you didn't give us the full request.  I assume that records
without the string APPLES pass unchanged.  Records with the string APPLES:
do you want to replace the string or the entire record with ORANGES?  Or do
you want to insert a new record (ORANGES)?  If an insert, before or after
the record with APPLES?
 
                    Marty
____________________ 
Martin Zimelis 
Principal 
maz/Consultancy 


  _____  

From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On
Behalf Of Huegel, Thomas
Sent: Tuesday, March 06, 2007 12:27 PM
To: [email protected]
Subject: Realy simple pipe insert ?


I want to do a simple insert of a record into the stream.
 
pipe < test file a | locate /APPLES/ ....| here I want to insert a literal
ORANGES | > new file a

  _____  


Reply via email to