Running it using your suggestions causes the following:
The exec looks like this: To answer Alan's question from an earlier email. The NETSTAT module is on our "X" drive. I link to TCPMAINT's 592 disk as "Z". BTW, the netstat module on X was copied from TCPMAINT. With the disks in this order, I get the result above. When I move 592 higher up in the search order, I still get what I got above. When I DETACH 592 from my machine and issue the command manually (from the command line), I get the result above. "X" is still attached and it has the MODULE only. This is what makes me think that the PIPE is running the module instead of the exec, even with tcpmaint 592 attached and first in the search order. BTW, notice the tcpip level in the first example, 5.2. This is even more confusing because we are running on VM 5.4 Further, I just tried running the EXEC again. Tcpmaint 592 is higher in the search string. I get the following result: So far about the only thing it's been consistent at is being inconsistent. -----Original Message----- From: The IBM z/VM Operating System [mailto:[email protected]] On Behalf Of Kris Buelens Sent: Monday, July 13, 2009 2:24 AM To: [email protected] Subject: Re: NETSTAT and PIPES Coding "PIPE CMS xxx" is exactly the same as coding "address CMS 'xxxx ..." That is, CMS performs the full command resolution, and an EXEC will get selected instead of a MODULE. Therefore it is recommended to use address COMMAND and PIPE COMMAND. Even more: you should not abbreviate a CMS command, this to avoid user defined synonyms, so do *not* code PIPE COMMAND L * EXEC A ... but PIPE COMMAND LISTFILE * EXEC A ... Then and only then you are sure that an unexpected EXEC or synonyms makes you exec do something else than expected. Lesson 1, chapter 3 in this self study "TeleCourse" explains it in great detail http://www.vm.ibm.com/download/packages/descript.cgi?TCVM1 So, I am pretty sure your PIPE CMS invokes the TELNET EXEC, not the MDOULE. For your TELNET case: /* your exec */ address command /* Be sure to execute what we need */ 'PIPE COMMAND EXEC TELNET .... 2009/7/13 Gentry, Stephen <[email protected]> > > (I tried to post this to the cms pipes list but it was rejected) > > > > I have a simple EXEC that pipes the output of the NETSTAT command to a stem. > > If I issue NETSTAT in a normal CMS session, I get the results back that I expect. > > When run it in an EXEC containing a PIPE, I get errors from the NETSTAT command. > > Code: PIPE CMS NETSTAT TELNET | stem myStem. > > There two files with the name NETSTAT, one is a MODULE the other an EXEC. When I run > > It from a CMS session, the EXEC gets invoked but when I run it from and EXEC I wrote > > containing the PIPE command above it seems to invoke the MODULE. > > Is that the way PIPES work? I thought the CMS param set the environment. > > Any thoughts? > > Thanks, > > Steve > > -- Kris Buelens, IBM Belgium, VM customer support
