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" <[email protected]>
02/28/2007 10:53 AM
Please respond to
"The IBM z/VM Operating System" <[email protected]>



To
[email protected]
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.


Reply via email to