Re: NETSTAT and PIPES

2009-07-16 Thread Les Koehler

Rob,
Since we used the internal CODEPRTX to produce pretty xref 
listings that flagged Set But Not Used and Used But Not Set 
and SUPERC for code reviews, we didn't use Signal On 
Novalue. In general, however, it is a good practice.


Les

Rob van der Heij wrote:

On Wed, Jul 15, 2009 at 8:36 PM, Les Koehlervmr...@tampabay.rr.com wrote:

Back before I retired, we always taught and followed these rules for Rexx:


0. signal on novalue  (even when you don't bother to have a novalue: label)
   half of my hard rexx problems would have caught way earlier with that

Rob




Re: NETSTAT and PIPES

2009-07-15 Thread Les Koehler
Back before I retired, we always taught and followed these 
rules for Rexx:

1-Start every regular exec with Address Command
2-Upper case and quote every command to the underlying system
3-Fully spell out every command
4-If you're going to execute another exec, then code it: 
'EXEC WHATEVER'
5-Let Rexx do the work. Coding: 'trailing blank 
'||'something else' is telling Rexx to do what it would 
normally do with: 'no trailing blank' 'something else'. Why 
waste your time and create another opportunity for error? 
(Yes, I know that someone in the Chicago Ed Center was 
teaching the embedded blank technique at one time. 
Hopefully they've learned better by now!)
6-Don't use asterisks to draw comment boxes. They slow down 
the interpreter.


I once saved a project from missing its release date by 
telling the responsible programmer (for the Nth time) to 
apply rules 1 to 3 to his code, after a panicked phone call 
at home at 2 am. At 5 am he called me back to let me know 
all was well and they still had window time to install the 
new code. The install went cleanly and IGS was saved 
considerable embaressment.


 Yes, Rexx will let you do many things 'quick and dirty' 
but if you want to do it right and make it bullet proof 
then you have to pay attention to the details.


Les

Gentry, Stephen wrote:

-- Running this:

* * * Top of File * * *   
/*  */
'vmfclear'
  
address command 'PIPE COMMAND NETSTAT TELNET | stem telnet.'  
  
 'Pipe stem telnet. |  netstat query a' 
exit  



-- Results in this:

* * * Top of File * * *

DTCNET103E Invalid parameter: EXEC

VM TCP/IP Netstat Level 540   TCP/IP Server Name: TCPIP

 


Active IPv4 Telnet server connections:

 


Conn Status Foreign Host B out  B in  Logical device status

 --  -    -

1273 Establshd  10.53.1.31  124040   906  L0003 LOGON  AS ACAA05

1172 Establshd  10.53.1.15   28857   733  L0004 LOGON  AS XAOPER
.
.
.

/results in this

Replacing stem telnet. With browse  does not display the DTCNET103E
message. The browse is useful but I intend to do further processing with
the stem

Steve

-Original Message-
From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On
Behalf Of Rob van der Heij
Sent: Tuesday, July 14, 2009 3:19 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: NETSTAT and PIPES

On Tue, Jul 14, 2009 at 3:52 AM, Feller, Paulpfel...@aegonusa.com
wrote:

Is this what you are trying to do?



'pipe command NETSTAT TELNET | stem sve1.'

'pipe stem sve1. |  sve TEXT A'

'browse sve TEXT A'


If so, then it is probably more practical to do - straight from the
command line
  pipe command NETSTAT TELNET | browse




Re: NETSTAT and PIPES

2009-07-15 Thread Rob van der Heij
On Wed, Jul 15, 2009 at 8:36 PM, Les Koehlervmr...@tampabay.rr.com wrote:
 Back before I retired, we always taught and followed these rules for Rexx:

0. signal on novalue  (even when you don't bother to have a novalue: label)
   half of my hard rexx problems would have caught way earlier with that

Rob


Re: NETSTAT and PIPES

2009-07-14 Thread Rob van der Heij
On Tue, Jul 14, 2009 at 3:52 AM, Feller, Paulpfel...@aegonusa.com wrote:
 Is this what you are trying to do?



 'pipe command NETSTAT TELNET | stem sve1.'

 'pipe stem sve1. |  sve TEXT A'

 'browse sve TEXT A'

If so, then it is probably more practical to do - straight from the command line
  pipe command NETSTAT TELNET | browse



Re: NETSTAT and PIPES

2009-07-14 Thread Gentry, Stephen
Yes, that is what I'm trying to do and it works.  That is to say the
pipe doesn't abend or fail.  What happens is I get different results
when I run it from an  EXEC (with the PIPE command in it) vs. when I run
it from the command line.

Steve

 



From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On
Behalf Of Feller, Paul
Sent: Monday, July 13, 2009 9:53 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: NETSTAT and PIPES

 

Is this what you are trying to do?

 

'pipe command NETSTAT TELNET | stem sve1.' 

'pipe stem sve1. |  sve TEXT A'   

'browse sve TEXT A'

 

This works for me.

 

Paul Feller
AIT Mainframe Technical Support

From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On
Behalf Of Gentry, Stephen
Sent: Sunday, July 12, 2009 8:48 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: NETSTAT and PIPES

 

(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

 



Re: NETSTAT and PIPES

2009-07-14 Thread Alan Altmark
On Tuesday, 07/14/2009 at 08:53 EDT, Gentry, Stephen 
stephen.gen...@lafayettelife.com wrote:
 Yes, that is what I?m trying to do and it works.  That is to say the 
pipe doesn?t
 abend or fail.  What happens is I get different results when I run it 
from 
 an  EXEC (with the PIPE command in it) vs. when I run it from the 
command line.

Your screen shots were not redistributed or stored by the listserver, so 
I'm not really clear on what the problem is.  Try plain-text copy/paste.

Except for the functions specifically supported by NETSTAT EXEC, my test 
case gets the same result using PIPE CMS NETSTAT or PIPE COMMAND NETSTAT, 
whether I run it an exec (address CMS or address command) or from the 
command line.  The exec runs when I use PIPE CMS NETSTAT and does not run 
when I use PIPE COMMAND NETSTAT.

Alan Altmark
z/VM Development
IBM Endicott


Re: NETSTAT and PIPES

2009-07-14 Thread Gentry, Stephen
-- Running this:

* * * Top of File * * *   
/*  */
'vmfclear'
  
address command 'PIPE COMMAND NETSTAT TELNET | stem telnet.'  
  
 'Pipe stem telnet. |  netstat query a' 
exit  


-- Results in this:

* * * Top of File * * *

DTCNET103E Invalid parameter: EXEC

VM TCP/IP Netstat Level 540   TCP/IP Server Name: TCPIP

 

Active IPv4 Telnet server connections:

 

Conn Status Foreign Host B out  B in  Logical device status

 --  -    -

1273 Establshd  10.53.1.31  124040   906  L0003 LOGON  AS ACAA05

1172 Establshd  10.53.1.15   28857   733  L0004 LOGON  AS XAOPER
.
.
.

/results in this

Replacing stem telnet. With browse  does not display the DTCNET103E
message. The browse is useful but I intend to do further processing with
the stem

Steve

-Original Message-
From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On
Behalf Of Rob van der Heij
Sent: Tuesday, July 14, 2009 3:19 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: NETSTAT and PIPES

On Tue, Jul 14, 2009 at 3:52 AM, Feller, Paulpfel...@aegonusa.com
wrote:
 Is this what you are trying to do?



 'pipe command NETSTAT TELNET | stem sve1.'

 'pipe stem sve1. |  sve TEXT A'

 'browse sve TEXT A'

If so, then it is probably more practical to do - straight from the
command line
  pipe command NETSTAT TELNET | browse


Re: NETSTAT and PIPES

2009-07-14 Thread Gentry, Stephen
I'll have to re-visit this at a later time.  I (we) converted to 5.4
this past weekend and I'm doing a post install mop up.
Thanks to all who replied.
Steve

-Original Message-
From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On
Behalf Of Alan Altmark
Sent: Tuesday, July 14, 2009 9:21 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: NETSTAT and PIPES

On Tuesday, 07/14/2009 at 08:53 EDT, Gentry, Stephen 
stephen.gen...@lafayettelife.com wrote:
 Yes, that is what I?m trying to do and it works.  That is to say the 
pipe doesn?t
 abend or fail.  What happens is I get different results when I run it 
from 
 an  EXEC (with the PIPE command in it) vs. when I run it from the 
command line.

Your screen shots were not redistributed or stored by the listserver, so

I'm not really clear on what the problem is.  Try plain-text copy/paste.

Except for the functions specifically supported by NETSTAT EXEC, my test

case gets the same result using PIPE CMS NETSTAT or PIPE COMMAND
NETSTAT, 
whether I run it an exec (address CMS or address command) or from the 
command line.  The exec runs when I use PIPE CMS NETSTAT and does not
run 
when I use PIPE COMMAND NETSTAT.

Alan Altmark
z/VM Development
IBM Endicott


Re: NETSTAT and PIPES

2009-07-14 Thread Feller, Paul
 I get the same results from the command line and from the exec.

Paul Feller
AIT Mainframe Technical Support

From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On Behalf 
Of Gentry, Stephen
Sent: Tuesday, July 14, 2009 7:11 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: NETSTAT and PIPES

Yes, that is what I'm trying to do and it works.  That is to say the pipe 
doesn't abend or fail.  What happens is I get different results when I run it 
from an  EXEC (with the PIPE command in it) vs. when I run it from the command 
line.
Steve


From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On Behalf 
Of Feller, Paul
Sent: Monday, July 13, 2009 9:53 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: NETSTAT and PIPES

Is this what you are trying to do?

'pipe command NETSTAT TELNET | stem sve1.'
'pipe stem sve1. |  sve TEXT A'
'browse sve TEXT A'

This works for me.

Paul Feller
AIT Mainframe Technical Support
From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On Behalf 
Of Gentry, Stephen
Sent: Sunday, July 12, 2009 8:48 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: NETSTAT and PIPES

(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



Re: NETSTAT and PIPES

2009-07-13 Thread Kris Buelens
Coding PIPE CMS xxx is exactly the same as coding address CMS ' ...
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 stephen.gen...@lafayettelife.com

 (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


Re: NETSTAT and PIPES

2009-07-13 Thread Alan Altmark
On Monday, 07/13/2009 at 12:23 EDT, Gentry, Stephen 
stephen.gen...@lafayettelife.com wrote:
 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.

PIPE CMS NETSTAT will invoke the NETSTAT EXEC (which invokes the NETSTAT 
MODULE), just as if you had typed it at the console.  By what means did 
you conclude that PIPE CMS NETSTAT did *not* invoke the exec?

Alan Altmark
z/VM Development
IBM Endicott


Re: NETSTAT and PIPES

2009-07-13 Thread Gentry, Stephen
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:ib...@listserv.uark.edu] On
Behalf Of Kris Buelens
Sent: Monday, July 13, 2009 2:24 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: NETSTAT and PIPES

 

Coding PIPE CMS xxx is exactly the same as coding address CMS '
...

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 stephen.gen...@lafayettelife.com

 

 (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



Re: NETSTAT and PIPES

2009-07-13 Thread Alan Altmark
On Monday, 07/13/2009 at 02:16 EDT, Gentry, Stephen 
stephen.gen...@lafayettelife.com wrote:
 Running it using your suggestions causes the following:

 [IMAGE]

The listserver doesn't redistribute attachments.  A plain-text copy/paste 
is sufficient.

Alan Altmark
z/VM Development
IBM Endicott


Re: NETSTAT and PIPES

2009-07-13 Thread Feller, Paul
Is this what you are trying to do?

'pipe command NETSTAT TELNET | stem sve1.'
'pipe stem sve1. |  sve TEXT A'
'browse sve TEXT A'

This works for me.

Paul Feller
AIT Mainframe Technical Support

From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On Behalf 
Of Gentry, Stephen
Sent: Sunday, July 12, 2009 8:48 PM
To: IBMVM@LISTSERV.UARK.EDU
Subject: NETSTAT and PIPES

(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