Tom, Here is a pipe that I have extracted from an EXEC that we have been using for several years that does the type of thing you appear to be attempting. Let me know if you have any questions.
Regards, Richard Schuh ________________________________ From: The IBM z/VM Operating System [mailto:IBMVM@LISTSERV.UARK.EDU] On Behalf Of Tom Huegel Sent: Tuesday, February 08, 2011 6:39 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: A little pipe question. Thanks David, I thought that was the flow, but I didn't get it to work.. Maybe I was just tired. Between shoveling snow and watching the Super Bowl I'm ready for a vacation. On Tue, Feb 8, 2011 at 5:53 AM, Dave Jones <d...@vsoft-software.com<mailto:d...@vsoft-software.com>> wrote: Tom, if the "xcmd" stage has a secondary output stream defined, Pipelines will write the return code from the cp/cms command there. Does that help? DJ On 02/07/2011 02:09 PM, Tom Huegel wrote: > I am trying to replace a WAKEUP (IUCVMSG routine with a PIPE STARMSG. > I have the following snippet that seems to work fine except for capturing > the return code from the cp/cms command (XCMD). > > Is there a simple fix to this? - Thanks > > /* > */ > > trace > o > cp set msg > iucv > arg > xcmd > 'pipe (endchar > ?)', > '| starmsg > ', > > xcmd, > '| specs 9-16 1 17-* strip nw x15 > nw', > '| stem linecount.', /* save results > */ > '?', /* start of second pipeline > */ > 'literal +01', /* Delay time > */ > '| delay', /* Delay > */ > '| pipestop' /* Stop > */ > say > rc > > cp set msg > on > 'pipe stem linecount. | > console' > exit > -- Dave Jones V/Soft Software www.vsoft-software.com<http://www.vsoft-software.com/> Houston, TX 281.578.7544
/* */ 'PIPE (end \)', '\ f: faninany', '| take 1', '| pipestop', '\ starmsg *msg cp smsg' rscsid pfx sys cmd, '| b: beat 5 /Timeout/', '| eof: nlocate anyc /garbage/', '| f2: faninany', '| not chop 16', '| stem' stem '1', '| take 1', '| spec /smsg rscs' pfx sys 'garbage/ 1', '| cp', '\ b:', '| take 1', '| f:', '\ eof:', '| take 1', '| f:', '\ immcmd q', '| take 1', '| f:'