Re: Realy simple pipe insert ?

2007-03-08 Thread Huegel, Thomas
Thank-you Kris,
I downloaded this course and have been going through it.
It appears to be an excellent course.
As they say 'give a man a fish and you feed him for a day, teach him to fish
and you feed him for a lifetime'.
 

-Original Message-
From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED]
Behalf Of Kris Buelens
Sent: Tuesday, March 06, 2007 1:16 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: Realy simple pipe insert ?


If you have some time to learn by reading: our PIPES telecourse on
  http://www.vm.ibm.com/download/packages/descript.cgi?TCVM2
http://www.vm.ibm.com/download/packages/descript.cgi?TCVM2 
It has been refreshed last week. 

-- 
Kris Buelens,
IBM Belgium, VM customer support 


  _  

 ella for Spam Control  has removed 10529 VSE-List messages and set
aside 8746 VM-List for me
You can use it too - and it's FREE!   www.ellaforspam.com
http://www.ellaforspam.com


Re: Realy simple pipe insert ?

2007-03-08 Thread Stephen Buckles
Give a man a fish and you feed him for a day.  Teach him to fish and he 
will spend all day on a boat drinking beer.




Huegel, Thomas [EMAIL PROTECTED] 
Sent by: The IBM z/VM Operating System IBMVM@listserv.uark.edu
03/08/2007 02:20 PM
Please respond to
The IBM z/VM Operating System IBMVM@listserv.uark.edu


To
IBMVM@listserv.uark.edu
cc

Subject
Re: Realy simple pipe insert ?






Thank-you Kris,
I downloaded this course and have been going through it.
It appears to be an excellent course.
As they say 'give a man a fish and you feed him for a day, teach him to 
fish and you feed him for a lifetime'.
 
-Original Message-
From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] 
Behalf Of Kris Buelens
Sent: Tuesday, March 06, 2007 1:16 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: Realy simple pipe insert ?

If you have some time to learn by reading: our PIPES telecourse on
  http://www.vm.ibm.com/download/packages/descript.cgi?TCVM2
It has been refreshed last week. 

-- 
Kris Buelens,
IBM Belgium, VM customer support 


 ella for Spam Control  has removed 10529 VSE-List messages and set 
aside 8746 VM-List for me
You can use it too - and it's FREE!  www.ellaforspam.com



-
This e-mail and any attachments are intended only for the
individual or company to which it is addressed and may contain
information which is privileged, confidential and prohibited from
disclosure or unauthorized use under applicable law.  If you are
not the intended recipient of this e-mail, you are hereby notified
that any use, dissemination, or copying of this e-mail or the
information contained in this e-mail is strictly prohibited by the
sender.  If you have received this transmission in error, please
return the material received to the sender and delete all copies
from your system.

Re: Realy simple pipe insert ?

2007-03-07 Thread Huegel, Thomas
This is so cool I am getting you guys to write my pipe and I am getting paid
for it.
NOW .. Let's suppose that sometimes there is a PRUNE following that APPLE. I
don't want to mix PRUNE's with APPLES and ORANGES so how can I get rid of
that nasty PRUNE? But ONLY if it is immediatly following APPLE.

-Original Message-
From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED]
Behalf Of Marty Zimelis
Sent: Tuesday, March 06, 2007 1:09 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: Realy simple pipe insert ?


Modify the SPECS stage to
 
'SPECS /ORANGES/ 1 write 1-* 1 |',
 
emiting the string ORANGES before copying the existing record, rather than
after it.
 
Marty



  _  

From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On
Behalf Of Huegel, Thomas
Sent: Tuesday, March 06, 2007 1:07 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: Realy simple pipe insert ?



This works pretty good. 
There shouldn't be multiple APPLES, but if there is it is OK to add 1
ORANGES for each APPLES. 
But how do I get the ORANGES to get inserted BEFORE apples? 
'PIPE  TEST FILE A',  
'|XXX:  IF LOCATE /APPLES/ ',  
'|SPECS 1-* 1  WRITE /ORANGES/ 1', 
'|XXX:  ', 
'| NEW FILE A'
  

-Original Message- 
From: The IBM z/VM Operating System [ mailto:IBMVM@LISTSERV.UARK.EDU
mailto:IBMVM@LISTSERV.UARK.EDU ]On 
Behalf Of Hughes, Jim - OIT 
Sent: Tuesday, March 06, 2007 11:55 AM 
To: IBMVM@LISTSERV.UARK.EDU 
Subject: Re: Realy simple pipe insert ? 


Hi Don, 

I never pay attention to details.  Please read my signature tagline. 

 
Jim Hughes 
603-271-5586 
There's no sense in being precise when you don't even know what you're 
talking about. 
John von Neumann 

=-Original Message- 
=From: The IBM z/VM Operating System [ mailto:IBMVM@LISTSERV.UARK.EDU
mailto:IBMVM@LISTSERV.UARK.EDU ] 
On 
=Behalf Of Don Russell 
=Sent: Tuesday, March 06, 2007 12:48 PM 
=To: IBMVM@LISTSERV.UARK.EDU 
=Subject: Re: Realy simple pipe insert ? 
= 
=The original request said they wanted to insert *a* record into the 
=stream... Your suggestion will insert a record for each record read 
from 
=the file that contains APPLES. resulting in a file of lines containing 
=APPLES,separated by lines of ORANGES. 
= 
='PIPE  test file a |', 
='locate /APPLES/|', 
='strliteral /ORANGES/|', 
=' new file a' 
= 
=Will result in a new file a with one record more than the count of 
='APPLES' records found. 
=The first record of the new file will be ORANGES... if you want it to 
be 
=the last, use APPEND STRLITERAL... 
= 
=Don Russell 
= 


__ 
 ella for Spam Control  has removed VSE-List messages and set aside
VM-List for me 
You can use it too - and it's FREE!  http://www.ellaforspam.com
http://www.ellaforspam.com  


  _  

 ella for Spam Control  has removed 10487 VSE-List messages and set
aside 8620 VM-List for me
You can use it too - and it's FREE!   www.ellaforspam.com
http://www.ellaforspam.com


Re: Realy simple pipe insert ?

2007-03-07 Thread Hughes, Jim - OIT
Have you no pride??

 

Before we get carried away down a rat hole, what you expect to happen if
there were 5 prunes following apple?

 

Also, how about posing all your questions at once??  

 

Is someone paying you to ask these questions  Or are they paying you
for the answers?

___
Jim Hughes
603-271-5586
There's no sense in being precise when you don't even know what you're
talking about.
John von Neumann 



From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On
Behalf Of Huegel, Thomas
Sent: Wednesday, March 07, 2007 9:17 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: Realy simple pipe insert ?

 

This is so cool I am getting you guys to write my pipe and I am getting
paid for it.

NOW .. Let's suppose that sometimes there is a PRUNE following that
APPLE. I don't want to mix PRUNE's with APPLES and ORANGES so how can I
get rid of that nasty PRUNE? But ONLY if it is immediatly following
APPLE.

-Original Message-
From: The IBM z/VM Operating System
[mailto:[EMAIL PROTECTED] Behalf Of Marty Zimelis
Sent: Tuesday, March 06, 2007 1:09 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: Realy simple pipe insert ?

Modify the SPECS stage to

 

'SPECS /ORANGES/ 1 write 1-* 1 |',

 

emiting the string ORANGES before copying the existing record,
rather than after it.

 

Marty

 





From: The IBM z/VM Operating System
[mailto:[EMAIL PROTECTED] On Behalf Of Huegel, Thomas
Sent: Tuesday, March 06, 2007 1:07 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: Realy simple pipe insert ?

This works pretty good. 
There shouldn't be multiple APPLES, but if there is it
is OK to add 1 ORANGES for each APPLES. 
But how do I get the ORANGES to get inserted BEFORE
apples? 
'PIPE  TEST FILE A',  
'|XXX:  IF LOCATE /APPLES/ ',  
'|SPECS 1-* 1  WRITE /ORANGES/ 1', 
'|XXX:  ', 
'| NEW FILE A'
  

-Original Message- 
From: The IBM z/VM Operating System
[mailto:[EMAIL PROTECTED] 
Behalf Of Hughes, Jim - OIT 
Sent: Tuesday, March 06, 2007 11:55 AM 
To: IBMVM@LISTSERV.UARK.EDU 
Subject: Re: Realy simple pipe insert ? 

 

Hi Don, 

I never pay attention to details.  Please read my
signature tagline. 

 
Jim Hughes 
603-271-5586 
There's no sense in being precise when you don't even
know what you're 
talking about. 
John von Neumann 

=-Original Message- 
=From: The IBM z/VM Operating System
[mailto:[EMAIL PROTECTED] 
On 
=Behalf Of Don Russell 
=Sent: Tuesday, March 06, 2007 12:48 PM 
=To: IBMVM@LISTSERV.UARK.EDU 
=Subject: Re: Realy simple pipe insert ? 
= 
=The original request said they wanted to insert *a*
record into the 
=stream... Your suggestion will insert a record for
each record read 
from 
=the file that contains APPLES. resulting in a file of
lines containing 
=APPLES,separated by lines of ORANGES. 
= 
='PIPE  test file a |', 
='locate /APPLES/|', 
='strliteral /ORANGES/|', 
=' new file a' 
= 
=Will result in a new file a with one record more
than the count of 
='APPLES' records found. 
=The first record of the new file will be ORANGES... if
you want it to 
be 
=the last, use APPEND STRLITERAL... 
= 
=Don Russell 
= 

 


__ 
 ella for Spam Control  has removed VSE-List
messages and set aside VM-List for me 
You can use it too - and it's FREE!
http://www.ellaforspam.com 







 ella for Spam Control  has removed 10487 VSE-List messages and set
aside 8620 VM-List for me
You can use it too - and it's FREE!  www.ellaforspam.com

 



Re: Realy simple pipe insert ?

2007-03-07 Thread Rob van der Heij

Frequently plumbing is easier to operate on a record rather than a set
of records. Most of us will resort to some kind of sipping pipeline
that operates on such a single set (rather than a stream of sets).

If you need something that will look at two adjacent records, it
sometimes helps to do this:
 | dup | drop | join , , |
Now it's easy to remove the record that has apple prune since that
represents an apple followed by a prune. After you removed that, you
use a spec w1 will get you the single item per record again.

Alternative would be this:
 | o: if between /apple/ 2 | pick w1  /prune/ | o: |

Clearly if you know there will be only one apple or one prune, things
get way easier...

Rob


Re: Realy simple pipe insert ? .. Thanks Rob

2007-03-07 Thread Huegel, Thomas
Thanks Rob,

Nice explaination too.

I'll go away now.

-Original Message-
From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED]
Behalf Of Rob van der Heij
Sent: Wednesday, March 07, 2007 9:05 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: Realy simple pipe insert ?


Frequently plumbing is easier to operate on a record rather than a set
of records. Most of us will resort to some kind of sipping pipeline
that operates on such a single set (rather than a stream of sets).

If you need something that will look at two adjacent records, it
sometimes helps to do this:
  | dup | drop | join , , |
Now it's easy to remove the record that has apple prune since that
represents an apple followed by a prune. After you removed that, you
use a spec w1 will get you the single item per record again.

Alternative would be this:
  | o: if between /apple/ 2 | pick w1  /prune/ | o: |

Clearly if you know there will be only one apple or one prune, things
get way easier...

Rob


__
 ella for Spam Control  has removed VSE-List messages and set aside
VM-List for me
You can use it too - and it's FREE!  http://www.ellaforspam.com


Realy simple pipe insert ?

2007-03-06 Thread Huegel, Thomas
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

  _  

 ella for Spam Control  has removed 10443 VSE-List messages and set
aside 8563 VM-List for me
You can use it too - and it's FREE!   www.ellaforspam.com
http://www.ellaforspam.com


Re: Realy simple pipe insert ?

2007-03-06 Thread Hughes, Jim - OIT
PIPE  test file a   |,

locate /APPLES/  |,

   specs 1-* 1  write /ORANGES/ 1 |,

   new file a

 


Jim Hughes
603-271-5586
There's no sense in being precise when you don't even know what you're
talking about.
John von Neumann 



From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On
Behalf Of Huegel, Thomas
Sent: Tuesday, March 06, 2007 12:27 PM
To: IBMVM@LISTSERV.UARK.EDU
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







 ella for Spam Control  has removed 10443 VSE-List messages and set
aside 8563 VM-List for me
You can use it too - and it's FREE!  www.ellaforspam.com

 



Re: Realy simple pipe insert ?

2007-03-06 Thread Huegel, Thomas
Jim,
Not quite.
I need to write the entire input file back out to 'new file a' and insert
ORANGES before APPLES.
 
Thanks

-Original Message-
From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED]
Behalf Of Hughes, Jim - OIT
Sent: Tuesday, March 06, 2007 11:32 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: Realy simple pipe insert ?



PIPE  test file a   |,

locate /APPLES/  |,

   specs 1-* 1  write /ORANGES/ 1 |,

   new file a

 


Jim Hughes
603-271-5586
There's no sense in being precise when you don't even know what you're
talking about.
John von Neumann 


  _  


From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On
Behalf Of Huegel, Thomas
Sent: Tuesday, March 06, 2007 12:27 PM
To: IBMVM@LISTSERV.UARK.EDU
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






  _  


 ella for Spam Control  has removed 10443 VSE-List messages and set
aside 8563 VM-List for me
You can use it too - and it's FREE!   www.ellaforspam.com
http://www.ellaforspam.com 

 



Re: Realy simple pipe insert ?

2007-03-06 Thread Marty Zimelis
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: IBMVM@LISTSERV.UARK.EDU
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

  _  

 ella for Spam Control  has removed 10443 VSE-List messages and set
aside 8563 VM-List for me
You can use it too - and it's FREE!  www.ellaforspam.com



Re: Realy simple pipe insert ?

2007-03-06 Thread Huegel, Thomas
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: IBMVM@LISTSERV.UARK.EDU
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: IBMVM@LISTSERV.UARK.EDU
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

  _  




Re: Realy simple pipe insert ?

2007-03-06 Thread Hughes, Jim - OIT
Picky, picky, picky...

 

pipe  test file a  |,

  xxx:  if locate /APPLES/  |,

 specs /ORANGES/ 1 write 1-* 1 |,

xxx:|,

   new file a

 

 


Jim Hughes
603-271-5586
There's no sense in being precise when you don't even know what you're
talking about.
John von Neumann 



From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On
Behalf Of Huegel, Thomas
Sent: Tuesday, March 06, 2007 12:41 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: Realy simple pipe insert ?

 

Jim,

Not quite.

I need to write the entire input file back out to 'new file a' and
insert ORANGES before APPLES.

 

Thanks

-Original Message-
From: The IBM z/VM Operating System
[mailto:[EMAIL PROTECTED] Behalf Of Hughes, Jim - OIT
Sent: Tuesday, March 06, 2007 11:32 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: Realy simple pipe insert ?

PIPE  test file a   |,

locate /APPLES/  |,

   specs 1-* 1  write /ORANGES/ 1 |,

   new file a

 


Jim Hughes
603-271-5586
There's no sense in being precise when you don't even know what
you're talking about.
John von Neumann 





From: The IBM z/VM Operating System
[mailto:[EMAIL PROTECTED] On Behalf Of Huegel, Thomas
Sent: Tuesday, March 06, 2007 12:27 PM
To: IBMVM@LISTSERV.UARK.EDU
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

 




 ella for Spam Control  has removed 10443 VSE-List messages and set
aside 8563 VM-List for me
You can use it too - and it's FREE!  www.ellaforspam.com

 



Re: Realy simple pipe insert ?

2007-03-06 Thread Don Russell
The original request said they wanted to insert *a* record into the 
stream... Your suggestion will insert a record for each record read from 
the file that contains APPLES. resulting in a file of lines containing 
APPLES,separated by lines of ORANGES.


'PIPE  test file a |',
'locate /APPLES/|',
'strliteral /ORANGES/|',
' new file a'

Will result in a new file a with one record more than the count of 
'APPLES' records found.
The first record of the new file will be ORANGES... if you want it to be 
the last, use APPEND STRLITERAL...


Don Russell


Hughes, Jim - OIT wrote:


“PIPE  test file a |”,

“ locate /APPLES/ |”,

“ specs 1-* 1 write /ORANGES/ 1 |”,

“  new file a”


Jim Hughes
603-271-5586
There's no sense in being precise when you don't even know what 
you're talking about.

John von Neumann



*From:* The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] 
*On Behalf Of *Huegel, Thomas

*Sent:* Tuesday, March 06, 2007 12:27 PM
*To:* IBMVM@LISTSERV.UARK.EDU
*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






* ella for Spam Control * has removed *10443* VSE-List messages 
and set aside *8563* VM-List for me
You can use it too - and it's FREE! www.ellaforspam.com 
http://www.ellaforspam.com




Re: Realy simple pipe insert ?

2007-03-06 Thread Hughes, Jim - OIT
Hi Don,

I never pay attention to details.  Please read my signature tagline.

 
Jim Hughes
603-271-5586
There's no sense in being precise when you don't even know what you're
talking about.
John von Neumann

=-Original Message-
=From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED]
On
=Behalf Of Don Russell
=Sent: Tuesday, March 06, 2007 12:48 PM
=To: IBMVM@LISTSERV.UARK.EDU
=Subject: Re: Realy simple pipe insert ?
=
=The original request said they wanted to insert *a* record into the
=stream... Your suggestion will insert a record for each record read
from
=the file that contains APPLES. resulting in a file of lines containing
=APPLES,separated by lines of ORANGES.
=
='PIPE  test file a |',
='locate /APPLES/|',
='strliteral /ORANGES/|',
=' new file a'
=
=Will result in a new file a with one record more than the count of
='APPLES' records found.
=The first record of the new file will be ORANGES... if you want it to
be
=the last, use APPEND STRLITERAL...
=
=Don Russell
=


Re: Realy simple pipe insert ?

2007-03-06 Thread Llewellyn, Mark
Assuming there aren't any compound versions of APPLES in the input file
(like SNAPPLES):
 
'PIPE  INPUT FILE A | change /APPLES/ORANGES APPLES/ |  NEW FILE A'
 
Mark Llewellyn
VISA USA



From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On
Behalf Of Huegel, Thomas
Sent: Tuesday, March 06, 2007 9:44 AM
To: IBMVM@LISTSERV.UARK.EDU
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: IBMVM@LISTSERV.UARK.EDU
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: IBMVM@LISTSERV.UARK.EDU
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






Re: Realy simple pipe insert ?

2007-03-06 Thread Marty Zimelis
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: IBMVM@LISTSERV.UARK.EDU
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: IBMVM@LISTSERV.UARK.EDU
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: IBMVM@LISTSERV.UARK.EDU
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

  _  




Re: Realy simple pipe insert ?

2007-03-06 Thread Huegel, Thomas
This works pretty good.
There shouldn't be multiple APPLES, but if there is it is OK to add 1
ORANGES for each APPLES.
But how do I get the ORANGES to get inserted BEFORE apples?
'PIPE  TEST FILE A',  
'|XXX:  IF LOCATE /APPLES/ ',  
'|SPECS 1-* 1  WRITE /ORANGES/ 1', 
'|XXX:  ', 
'| NEW FILE A'
  

-Original Message-
From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED]
Behalf Of Hughes, Jim - OIT
Sent: Tuesday, March 06, 2007 11:55 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: Realy simple pipe insert ?


Hi Don,

I never pay attention to details.  Please read my signature tagline.

 
Jim Hughes
603-271-5586
There's no sense in being precise when you don't even know what you're
talking about.
John von Neumann

=-Original Message-
=From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED]
On
=Behalf Of Don Russell
=Sent: Tuesday, March 06, 2007 12:48 PM
=To: IBMVM@LISTSERV.UARK.EDU
=Subject: Re: Realy simple pipe insert ?
=
=The original request said they wanted to insert *a* record into the
=stream... Your suggestion will insert a record for each record read
from
=the file that contains APPLES. resulting in a file of lines containing
=APPLES,separated by lines of ORANGES.
=
='PIPE  test file a |',
='locate /APPLES/|',
='strliteral /ORANGES/|',
=' new file a'
=
=Will result in a new file a with one record more than the count of
='APPLES' records found.
=The first record of the new file will be ORANGES... if you want it to
be
=the last, use APPEND STRLITERAL...
=
=Don Russell
=


__
 ella for Spam Control  has removed VSE-List messages and set aside
VM-List for me
You can use it too - and it's FREE!  http://www.ellaforspam.com


Re: Realy simple pipe insert ?

2007-03-06 Thread McKown, John
You've all fallen for it! It is a well known fact that you cannot mix
APPLES and ORANGES. Won't work. Even PIPES can't do it! 
 
 

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

This message (including any attachments) contains confidential
information intended for a specific individual and purpose, and its
content is protected by law.  If you are not the intended recipient, you
should delete this message and are hereby notified that any disclosure,
copying, or distribution of this transmission, or taking any action
based on it, is strictly prohibited.
  

-Original Message-
From: The IBM z/VM Operating System
[mailto:[EMAIL PROTECTED] On Behalf Of Llewellyn, Mark
Sent: Tuesday, March 06, 2007 12:03 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: Realy simple pipe insert ?


Assuming there aren't any compound versions of APPLES in the
input file (like SNAPPLES):
 
'PIPE  INPUT FILE A | change /APPLES/ORANGES APPLES/ |  NEW
FILE A'
 
Mark Llewellyn
VISA USA



From: The IBM z/VM Operating System
[mailto:[EMAIL PROTECTED] On Behalf Of Huegel, Thomas
Sent: Tuesday, March 06, 2007 9:44 AM
To: IBMVM@LISTSERV.UARK.EDU
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: IBMVM@LISTSERV.UARK.EDU
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: IBMVM@LISTSERV.UARK.EDU
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






Re: Realy simple pipe insert ?

2007-03-06 Thread Llewellyn, Mark
PIPE literal D'oh! | console



From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On
Behalf Of McKown, John
Sent: Tuesday, March 06, 2007 10:09 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: Realy simple pipe insert ?


You've all fallen for it! It is a well known fact that you cannot mix
APPLES and ORANGES. Won't work. Even PIPES can't do it! 
 
 

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

This message (including any attachments) contains confidential
information intended for a specific individual and purpose, and its
content is protected by law.  If you are not the intended recipient, you
should delete this message and are hereby notified that any disclosure,
copying, or distribution of this transmission, or taking any action
based on it, is strictly prohibited.
  

-Original Message-
From: The IBM z/VM Operating System
[mailto:[EMAIL PROTECTED] On Behalf Of Llewellyn, Mark
Sent: Tuesday, March 06, 2007 12:03 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: Realy simple pipe insert ?


Assuming there aren't any compound versions of APPLES in the
input file (like SNAPPLES):
 
'PIPE  INPUT FILE A | change /APPLES/ORANGES APPLES/ |  NEW
FILE A'
 
Mark Llewellyn
VISA USA



From: The IBM z/VM Operating System
[mailto:[EMAIL PROTECTED] On Behalf Of Huegel, Thomas
Sent: Tuesday, March 06, 2007 9:44 AM
To: IBMVM@LISTSERV.UARK.EDU
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: IBMVM@LISTSERV.UARK.EDU
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: IBMVM@LISTSERV.UARK.EDU
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






Re: Realy simple pipe insert ?

2007-03-06 Thread David Boyes
 You've all fallen for it! It is a well known fact that you cannot mix 
 APPLES and ORANGES. Won't work. 

Add a tablespoon of cinnamon, two tablespoons of light brown sugar per apple
and orange, and a jigger of really good brandy, and heat on low. Add
teaspoons of honey slowly until you get a smooth pouring consistency. Watch
carefully so the syrup and fruit don't burn. Serve over French vanilla ice
cream. 

 Even PIPES can't do it!

It's only a matter of application. 

It must be Friday somewhere8-)

-- db


Re: Realy simple pipe insert ?

2007-03-06 Thread Marty Zimelis
Modify the SPECS stage to
 
'SPECS /ORANGES/ 1 write 1-* 1 |',
 
emiting the string ORANGES before copying the existing record, rather than
after it.
 
Marty



  _  

From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On
Behalf Of Huegel, Thomas
Sent: Tuesday, March 06, 2007 1:07 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: Realy simple pipe insert ?



This works pretty good. 
There shouldn't be multiple APPLES, but if there is it is OK to add 1
ORANGES for each APPLES. 
But how do I get the ORANGES to get inserted BEFORE apples? 
'PIPE  TEST FILE A',  
'|XXX:  IF LOCATE /APPLES/ ',  
'|SPECS 1-* 1  WRITE /ORANGES/ 1', 
'|XXX:  ', 
'| NEW FILE A'
  

-Original Message- 
From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] 
Behalf Of Hughes, Jim - OIT 
Sent: Tuesday, March 06, 2007 11:55 AM 
To: IBMVM@LISTSERV.UARK.EDU 
Subject: Re: Realy simple pipe insert ? 


Hi Don, 

I never pay attention to details.  Please read my signature tagline. 

 
Jim Hughes 
603-271-5586 
There's no sense in being precise when you don't even know what you're 
talking about. 
John von Neumann 

=-Original Message- 
=From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] 
On 
=Behalf Of Don Russell 
=Sent: Tuesday, March 06, 2007 12:48 PM 
=To: IBMVM@LISTSERV.UARK.EDU 
=Subject: Re: Realy simple pipe insert ? 
= 
=The original request said they wanted to insert *a* record into the 
=stream... Your suggestion will insert a record for each record read 
from 
=the file that contains APPLES. resulting in a file of lines containing 
=APPLES,separated by lines of ORANGES. 
= 
='PIPE  test file a |', 
='locate /APPLES/|', 
='strliteral /ORANGES/|', 
=' new file a' 
= 
=Will result in a new file a with one record more than the count of 
='APPLES' records found. 
=The first record of the new file will be ORANGES... if you want it to 
be 
=the last, use APPEND STRLITERAL... 
= 
=Don Russell 
= 


__ 
 ella for Spam Control  has removed VSE-List messages and set aside
VM-List for me 
You can use it too - and it's FREE!  http://www.ellaforspam.com 



Re: Realy simple pipe insert ?

2007-03-06 Thread Shimon Lebowitz
  You've all fallen for it! It is a well known fact that you cannot mix 
  APPLES and ORANGES. Won't work. 
 
 Add a tablespoon of cinnamon, two tablespoons of light brown sugar per apple 
 and
 orange, and a jigger of really good brandy, and heat on low. Add teaspoons of
 honey slowly until you get a smooth pouring consistency. Watch carefully so 
 the
 syrup and fruit don't burn. Serve over French vanilla ice cream. 
 

Sitting here this morning going over last night's emails, 
I read this one to my wife (after a short reminder that 'PIPES'
is something that can manipulate files...).

My six year old daughter looked at me after listening to the
recipe and asked what's brandy?. I told her it's a kind of
liquor. (She knows I have a scotch for L'Chaim! on occasion).
She made a face, and said we have a better way to mix 
apples and oranges. And with a great big smile she said
FRUIT SALAD!.

That was my OT post for the day. :-)

Shimon


Simple PIPE ?

2007-02-28 Thread Huegel, Thomas
I think this should be really simple, but the brain doesn't seem to be
working this morning.
I have this little pipe, and the last stage is '|VAR NEWNAME'.
How can a be sure NEWNAME is being set to '' (null) if nothing makes it that
far through the pipe?

'PIPE FILERAND TOM222 PLI A  1-10',
'| FIND --CATAL= ',
'| TAKE FIRST 1',  
'| SPECS 9.9 1',   
'| STRIP', 
'| VAR NEWNAME' 

Thanks.


__
 ella for Spam Control  has removed VSE-List messages and set aside
VM-List for me
You can use it too - and it's FREE!  http://www.ellaforspam.com


Re: Simple PIPE ?

2007-02-28 Thread Rob van der Heij

On 2/28/07, Huegel, Thomas [EMAIL PROTECTED] wrote:

How can a be sure NEWNAME is being set to '' (null) if nothing makes it that
far through the pipe?


The classic probably is   ...  | append literal | var newname

But more exciting is to look at what you're going to do with it after
than and see whether that will also fit in the pipeline... ;-)

Rob


Re: Simple PIPE ?

2007-02-28 Thread Hughes, Jim - OIT
This works for me.

Newname = ''

'PIPE FILERAND TOM222 PLI A  1-10', 
'| FIND --CATAL= ',
'| TAKE FIRST 1',  
'| SPECS 9.9 1',   
'| STRIP', 
'| VAR NEWNAME tracking' 

 


Jim Hughes
603-271-5586
There's no sense in being precise when you don't even know what you're
talking about.
John von Neumann 



From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On
Behalf Of Huegel, Thomas
Sent: Wednesday, February 28, 2007 10:17 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Simple PIPE ?

 

I think this should be really simple, but the brain doesn't seem to be
working this morning. 
I have this little pipe, and the last stage is '|VAR NEWNAME'. 
How can a be sure NEWNAME is being set to '' (null) if nothing makes it
that far through the pipe? 

'PIPE FILERAND TOM222 PLI A  1-10', 
'| FIND --CATAL= ',
'| TAKE FIRST 1',  
'| SPECS 9.9 1',   
'| STRIP', 
'| VAR NEWNAME' 

Thanks.

 

__ 
 ella for Spam Control  has removed VSE-List messages and set aside
VM-List for me 
You can use it too - and it's FREE!  http://www.ellaforspam.com 



Re: Simple PIPE ?

2007-02-28 Thread Mike Walter
While I certainly agree with Sir Rob about the right thing to do see 
whether that will also fit in the pipeline, here's another technique that 
I've been know to use:

newname='' /* Set to null before running Pipe */
... whatever ...,
'| VAR newname TRACKING'

For more help, issue PIPE HELP VAR (or if not running the CMS Pipelines 
Runtime Library: HELP PIPE VAR)

Mike Walter 
Hewitt Associates 
Any opinions expressed herein are mine alone and do not necessarily 
represent the opinions or policies of Hewitt Associates.




Rob van der Heij [EMAIL PROTECTED] 

Sent by: The IBM z/VM Operating System IBMVM@LISTSERV.UARK.EDU
02/28/2007 10:22 AM
Please respond to
The IBM z/VM Operating System IBMVM@LISTSERV.UARK.EDU



To
IBMVM@LISTSERV.UARK.EDU
cc

Subject
Re: Simple PIPE ?






On 2/28/07, Huegel, Thomas [EMAIL PROTECTED] wrote:
 How can a be sure NEWNAME is being set to '' (null) if nothing makes it 
that
 far through the pipe?

The classic probably is   ...  | append literal | var newname

But more exciting is to look at what you're going to do with it after
than and see whether that will also fit in the pipeline... ;-)

Rob




 
The information contained in this e-mail and any accompanying documents may 
contain information that is confidential or otherwise protected from 
disclosure. If you are not the intended recipient of this message, or if this 
message has been addressed to you in error, please immediately alert the sender 
by reply e-mail and then delete this message, including any attachments. Any 
dissemination, distribution or other use of the contents of this message by 
anyone other than the intended recipient 
is strictly prohibited.


Re: Simple PIPE ?

2007-02-28 Thread Rich Greenberg
On: Wed, Feb 28, 2007 at 09:16:38AM -0600,Huegel, Thomas Wrote:

} I think this should be really simple, but the brain doesn't seem to be
} working this morning.
} I have this little pipe, and the last stage is '|VAR NEWNAME'.
} How can a be sure NEWNAME is being set to '' (null) if nothing makes it that
} far through the pipe?
} 
} 'PIPE FILERAND TOM222 PLI A  1-10',
} '| FIND --CATAL= ',
} '| TAKE FIRST 1',  
} '| SPECS 9.9 1',   
} '| STRIP', 
} '| VAR NEWNAME' 

The easiest way is to change the VAR stage to a STEM stage, like:

  '| STEM NEWNAME.'

At the end of the pipe, NEWNAME.0 will contain the number of items that
reached the STEM, and NEWNAME.1, NEWNAME.2 etc will contain the item(s).

-- 
Rich Greenberg  N Ft Myers, FL, USA richgr atsign panix.com  + 1 239 543 1353
Eastern time.  N6LRT  I speak for myself  my dogs only.VM'er since CP-67
Canines:Val, Red, Shasta  Casey (RIP), Red  Zero, Siberians  Owner:Chinook-L
Retired at the beach Asst Owner:Sibernet-L


Re: Simple PIPE ?

2007-02-28 Thread Rob van der Heij

On 2/28/07, Macioce, Larry [EMAIL PROTECTED] wrote:


I don't know pipes well, but I would set newname  to null first everytime
then what happens happens


Sure? I would expect CMS Pipelines to drop the variable when no record
flows there.

Rob


Re: Simple PIPE ?

2007-02-28 Thread Rob van der Heij

On 2/28/07, Mike Walter [EMAIL PROTECTED] wrote:


'| VAR newname TRACKING'


Cheating !  ;-)

Since the var stage will also pass the records along, I sometimes do
it like this:
  ...
 | var response
 | take | count lines | var worktodo

if worktodo then ...

Rob


Re: Simple PIPE ?

2007-02-28 Thread Huegel, Thomas
Thanks, this will work for me too.
'tracking' somehow it seems the meaning must have lost something in
translation.

-Original Message-
From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED]
Behalf Of Hughes, Jim - OIT
Sent: Wednesday, February 28, 2007 10:28 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: Simple PIPE ?



This works for me.

Newname = ''

'PIPE FILERAND TOM222 PLI A  1-10', 
'| FIND --CATAL= ',
'| TAKE FIRST 1',  
'| SPECS 9.9 1',   
'| STRIP', 
'| VAR NEWNAME tracking' 

 


Jim Hughes
603-271-5586
There's no sense in being precise when you don't even know what you're
talking about.
John von Neumann 


  _  


From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On
Behalf Of Huegel, Thomas
Sent: Wednesday, February 28, 2007 10:17 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Simple PIPE ?

 

I think this should be really simple, but the brain doesn't seem to be
working this morning. 
I have this little pipe, and the last stage is '|VAR NEWNAME'. 
How can a be sure NEWNAME is being set to '' (null) if nothing makes it that
far through the pipe? 

'PIPE FILERAND TOM222 PLI A  1-10', 
'| FIND --CATAL= ',
'| TAKE FIRST 1',  
'| SPECS 9.9 1',   
'| STRIP', 
'| VAR NEWNAME' 

Thanks.

 

__ 
 ella for Spam Control  has removed VSE-List messages and set aside
VM-List for me 
You can use it too - and it's FREE!  http://www.ellaforspam.com
http://www.ellaforspam.com  


  _  

 ella for Spam Control  has removed 10245 VSE-List messages and set
aside 8305 VM-List for me
You can use it too - and it's FREE!   www.ellaforspam.com
http://www.ellaforspam.com


Re: Simple PIPE ?

2007-02-28 Thread Mike Walter
Yes, cheating.  Sometimes cheating is OK.  ;-)
Another alternative (to be considered only after determining if the 
process could be better handled in the pipe itself):

...pipe stuff...
'| VAR newname'
If symbol('NEWNAME')='VAR' /* 'NEWNAME' must be in quotes and IIRC 
capitalized */
   then go ahead and use the variable as set by the pipe
   else the variable was not set, take appropriate action

I confess to using TRACKING or symbol('VARNAME_WHATEVER') depending on how 
clear my mind is at the moment.
Symbol() is probably a more clean technique, but Rich's STEM solution 
works well to (esp. with a 'TAKE 1' stage before it).

Mike Walter 
Hewitt Associates 
Any opinions expressed herein are mine alone and do not necessarily 
represent the opinions or policies of Hewitt Associates.




Rob van der Heij [EMAIL PROTECTED] 

Sent by: The IBM z/VM Operating System IBMVM@LISTSERV.UARK.EDU
02/28/2007 10:53 AM
Please respond to
The IBM z/VM Operating System IBMVM@LISTSERV.UARK.EDU



To
IBMVM@LISTSERV.UARK.EDU
cc

Subject
Re: Simple PIPE ?






On 2/28/07, Mike Walter [EMAIL PROTECTED] wrote:

 '| VAR newname TRACKING'

Cheating !  ;-)

Since the var stage will also pass the records along, I sometimes do
it like this:
   ...
  | var response
  | take | count lines | var worktodo

if worktodo then ...

Rob



 
The information contained in this e-mail and any accompanying documents may 
contain information that is confidential or otherwise protected from 
disclosure. If you are not the intended recipient of this message, or if this 
message has been addressed to you in error, please immediately alert the sender 
by reply e-mail and then delete this message, including any attachments. Any 
dissemination, distribution or other use of the contents of this message by 
anyone other than the intended recipient 
is strictly prohibited.