Thanks by the answers, but specifically this is what I want
1.- first I obtain the list of guests active. pipe cp q n| split /,/ | specs w1 1 | locate /CMP/ | > GUESTS LISTS A Note: "CMP" is my pattern for guests in production mode in this partition. For example: CMPWAPE1, CMPWSPE1, CMPDBPE1 My lists is CMPWAPE1 CMPWSPE1 CMPDBPE1 2.- I am going to send this command to each guests linux of this list cp send CMPWAPE1 start-stop.sh 3.- When this script finalize I need to erase this guets of the file "GUESTS LISTS A" AND count the elements, to know if file is empty. 4.- if file is empty then I finish to the process and sent a message "All the guets were process" 5.- If file isn't empty take the next guest name in file and return to step 2. I do not know I can realise this loop with a pipe ? Thanks to all by your help ATTE VIctor Hugo 2010/8/7 Hughes, Jim <jim.hug...@doit.nh.gov> > Nice catch. My brain didn't get engaged while the fingers were typing..... > > _____________________ > Jim Hughes > x5586 > "It is fun to do the impossible." Quote from Walt Disney > > ________________________________ > > From: The IBM z/VM Operating System on behalf of Rob van der Heij > Sent: Sat 8/7/2010 8:48 AM > To: IBMVM@LISTSERV.UARK.EDU > Subject: Re: pipe question? > > > > On Sat, Aug 7, 2010 at 12:43 PM, Hughes, Jim <jim.hug...@doit.nh.gov> > wrote: > > "pipe (endchar ?) ", > > ? < guests list a ", > > "| bld: take 1 ", > > "| > guests list a ", > > "? bld: ", > > your process follows > > You meant to "drop" rather than "take" to leave all but the first > record in the file. But it's an elegant style to divert the record to > process towards the end of the pipeline (so you don't forget to keep > the remainder). And real plumbing would be to handle them all, not > just one of them (but that's beyond the question). > > | Rob > -- Victor Hugo Ochoa Avila z/OS & z/VM systems programmer Mexico, City.