[Fwd: REXX and VTAM command responses]

2010-04-07 Thread Bruce Schaefer
Thanks for the responses. I neglected to mention that I am using a 30 
second time on the getmsg. However, it still comes back with just the 
initial 'accepted' msg.  I understand this time to be a maximum wait 
time and not a hard wait time.


As for system rexx, I'm not sure how that would change this behavior.

Bruce

Hello list,
I have a rexx that issues console commands and writes the responses to a 
dd after using getmsg to retrieve the response. Everything is good for 
MVS commands and JES2 commands if L=Z is included.  Is there a similar 
option for VTAM commands? For D NET,options, I am only getting: 
IST097I DISPLAY ACCEPTED
I've tried adding the CART parameter to my emcs console and the getmsg 
with same results.

Thanks,
Bruce Schaefer

--
/*
//* Bruce Schaefer
//* mailto:bruce.s...@gmail.com
// 


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: REXX and VTAM command responses

2010-04-07 Thread Martin Kline
I have a rexx that issues console commands and writes the responses to a
dd after using getmsg to retrieve the response. Everything is good for 
MVS commands and JES2 commands if L=Z is included.  Is there a similar 
option for VTAM commands? For D NET,options, I am only getting: 
IST097I DISPLAY ACCEPTED
I've tried adding the CART parameter to my emcs console and the getmsg 
with same results.

I believe you are actually getting all of the messages in one getmsg request. 
for example the folloowing statement,
msgrc = getmsg('MSG.','SOL',,,3)
can return multiple messages in MSG.1, MSG.2, etc. with the count of 
messages stored in MSG.0.

Check the stem variable you supply to see if you are getting all of the 
messages at once.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: [Fwd: REXX and VTAM command responses]

2010-04-07 Thread Michael Schmutzok
I had this problem with multi-line output from JES2 commands (e.g. $DSPOOL). I 
was only getting the first line of the output. I opened an incident with IBM 
and eventually we came up with the solution. I had to recursively re-issue the 
AXRCMD command, minus the actual command itself. I went ahead and tried this 
with a D NET command to see if this solution would work the same way. 
Following is the system REXX code I used for the test. Following that, is the 
results clipped out of the system log. I used the AXRWTO to just redisplay the 
command output instead of parsing it out into variables.
 

 
System Rexx Code (QUERYTST):
 
/* REXX */
NUMERIC DIGITS 4
mycmd1  = 'D NET,ID=TRLDC,E'
result1 =  AXRCMD(mycmd1,netvar.,10);
If result1 = 0 Then
  Do While result1 = 0
If netvar.0  1 Then
  Do linenum = 1 to netvar.0
CALL AXRWTO 'System Rexx output line #'linenum  netvar.linenum
  End
result1 = AXRCMD(,netvar.,4)==recursive to get all lines
  End
Else
  CALL AXRWTO 'D NET command failed. RC=' result1
Exit 00
 

Output from System Rexx EXEC (QUERYTST)
 
@QUERYTST
D NET,ID=TRLDC,E
IST097I DISPLAY ACCEPTED
IST075I NAME = TRLDC, TYPE = TRL MAJOR NODE 911
IST1314I TRLE = TRLDCASTATUS = ACTIV   CONTROL = MPC
IST314I END
System Rexx output line #1  IST075I NAME = TRLDC, TYPE = TRL MAJOR NODE
System Rexx output line #2  IST1314I TRLE = TRLDCASTATUS = ACTIV
   CONTROL = MPC
System Rexx output line #3  IST314I END
 

 
As you can see, I was able to capture all lines from the D NET command and 
then redisplay them.
 
I hope this helps.
 
Mike Schmutzok
 

 On 4/7/2010 at 7:58 AM, in message 4bbc7350.6010...@gmail.com, Bruce 
 Schaefer bruce.s...@gmail.com wrote:

Thanks for the responses. I neglected to mention that I am using a 30 
second time on the getmsg. However, it still comes back with just the 
initial 'accepted' msg.  I understand this time to be a maximum wait 
time and not a hard wait time.

As for system rexx, I'm not sure how that would change this behavior.

Bruce

Hello list,
I have a rexx that issues console commands and writes the responses to a 
dd after using getmsg to retrieve the response. Everything is good for 
MVS commands and JES2 commands if L=Z is included.  Is there a similar 
option for VTAM commands? For D NET,options, I am only getting: 
IST097I DISPLAY ACCEPTED
I've tried adding the CART parameter to my emcs console and the getmsg 
with same results.
Thanks,
Bruce Schaefer

-- 
/*
//* Bruce Schaefer
//* mailto:bruce.s...@gmail.com
// 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: REXX and VTAM command responses

2010-04-07 Thread Chris Mason
Bruce

Martin's response, the reference to *multiline* messages, jogged my memory 
and a correction to my previous post is needed.

In the case of VTAM DISPLAY commands, there is a synchronous IST097I 
DISPLAY ACCEPTED response followed my a *single* asynchronous message 
which is in *multiline* form. In the case of DISPLAY NET,ID= the first message 
identifier is IST075I NAME = whatever-was-specified , TYPE = something - as 
a synchronous message - followed by a sequence of the messages you 
probably want to analyse all within the asynchronous multiline message. The 
sequence ends with the IST314I END line.

That last point is what required the correction.

All the above is good as long as there is not some sort of error in what is 
specified in the original command.

Assuming you can set up some sequence of commands in TSO which allows a 
command to be issued and all potentially resulting output to be picked up so 
that you can analyse the text within the output, I recommend the following 
which I vaguely recall being my approach when processing messages from 
VTAM commands - or any commands with asynchronous output - in NetView.

You need to set up a clist which issues any specified command and then note 
down the messages returned both when it works and when you deliberately 
enter incorrect variables. You need to work out which of the message 
sequences is a single line message and which multiline messages and, of 
course, whether synchronous or asynchronous. You should then code your 
intended clist to deal with all of the circumstances which might arise.

And I find I have simply been advising programming motherhood!

Chris Mason

On Mon, 5 Apr 2010 21:58:15 -0500, Chris Mason 
chrisma...@belgacom.net wrote:

Bruce

Alan is correct in that the xxx ACCEPTED response is actually a response to
the VTAM command and the output you really want to see is generated
asynchronously.

Ideally you would be operating in a NetView environment. These days - for
very many years now - you could be using the NetView pipes function. This
came along after I used to work intensively with REXX in NetView with a
variety of commands including both MVS and VTAM. Consequently I relied
heavily and exclusively on the NetView facilities for picking up these
asynchronous responses centred on wait functions - potentially fully reliable
but tortuous to code and analyse. Generally, you specify the message
identifiers for which to wait - with a longish timeout in order to cope with a
sick system - and process each message as it arrives looping back in order to
wait for the next one until the last message is known to have arrived, 
IST314I
END in the case of a VTAM DISPLAY command.

I'm afraid I can't advise on working in a presumed TSO environment. I just
hate having to stick a wet electronic finger in the air and estimate the delay
before which I just possibly might expect the response to appear which I
guess is what this fifth positional parameter of GETMSG is all about - ugh!!!

Chris Mason

On Mon, 5 Apr 2010 18:34:18 -0400, Bruce Schaefer
bruce.s...@gmail.com wrote:

Hello list,
I have a rexx that issues console commands and writes the responses to a
dd after using getmsg to retrieve the response. Everything is good for
MVS commands and JES2 commands if L=Z is included.  Is there a similar
option for VTAM commands? For D NET,options, I am only getting:
IST097I DISPLAY ACCEPTED
I've tried adding the CART parameter to my emcs console and the getmsg
with same results.
Thanks,
Bruce Schaefer

--
/*
//* Bruce Schaefer
//* mailto:bruce.s...@gmail.com

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


[Fwd: [Fwd: REXX and VTAM command responses]]

2010-04-07 Thread Bruce Schaefer
Thanks to all, and especially to taltyman.  Based on his sample, I added 
a second getmsg for NET commands and I now get the desired results.


--
/*
//* Bruce Schaefer
//* mailto:bruce.s...@gmail.com
// 


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: REXX and VTAM command responses

2010-04-06 Thread Staller, Allan
SYSTEM REXX? Requires z/OS 1.9 and above. See the discusson about
AXRCMD...
Or a Chris responded, NETVIEW.

HTH,

Hello list,
I have a rexx that issues console commands and writes the responses to a

dd after using getmsg to retrieve the response. Everything is good for 
MVS commands and JES2 commands if L=Z is included.  Is there a similar 
option for VTAM commands? For D NET,options, I am only getting: 
IST097I DISPLAY ACCEPTED
I've tried adding the CART parameter to my emcs console and the getmsg 
with same results.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



REXX and VTAM command responses

2010-04-05 Thread Bruce Schaefer

Hello list,
I have a rexx that issues console commands and writes the responses to a 
dd after using getmsg to retrieve the response. Everything is good for 
MVS commands and JES2 commands if L=Z is included.  Is there a similar 
option for VTAM commands? For D NET,options, I am only getting: 
IST097I DISPLAY ACCEPTED
I've tried adding the CART parameter to my emcs console and the getmsg 
with same results.

Thanks,
Bruce Schaefer

--
/*
//* Bruce Schaefer
//* mailto:bruce.s...@gmail.com
// 


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: REXX and VTAM command responses

2010-04-05 Thread Starr, Alan
Hi Bruce,

I believe that your problem is related to the fact that VTAM acknowledges your 
command request before it is actually processed (i.e. displayed output is 
available).

I suggest, therefore, that you add a time value to your GETMSG (it's the 
fifth positional parameter). When not specified, the default is 0 seconds (i.e. 
GETMSG responds as soon as it receives the first DISPLAY ACCEPTED message).

Hope that helps!

Alan



 

-Original Message-
From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of 
Bruce Schaefer
Sent: Monday, April 05, 2010 15:34
To: IBM-MAIN@bama.ua.edu
Subject: REXX and VTAM command responses

Hello list,
I have a rexx that issues console commands and writes the responses to a dd 
after using getmsg to retrieve the response. Everything is good for MVS 
commands and JES2 commands if L=Z is included.  Is there a similar option for 
VTAM commands? For D NET,options, I am only getting: 
IST097I DISPLAY ACCEPTED
I've tried adding the CART parameter to my emcs console and the getmsg with 
same results.
Thanks,
Bruce Schaefer

-- 
/*
//* Bruce Schaefer
//* mailto:bruce.s...@gmail.com
// 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: REXX and VTAM command responses

2010-04-05 Thread Chris Mason
Bruce

Alan is correct in that the xxx ACCEPTED response is actually a response to 
the VTAM command and the output you really want to see is generated 
asynchronously.

Ideally you would be operating in a NetView environment. These days - for 
very many years now - you could be using the NetView pipes function. This 
came along after I used to work intensively with REXX in NetView with a 
variety of commands including both MVS and VTAM. Consequently I relied 
heavily and exclusively on the NetView facilities for picking up these 
asynchronous responses centred on wait functions - potentially fully reliable 
but tortuous to code and analyse. Generally, you specify the message 
identifiers for which to wait - with a longish timeout in order to cope with a 
sick system - and process each message as it arrives looping back in order to 
wait for the next one until the last message is known to have arrived, IST314I 
END in the case of a VTAM DISPLAY command.

I'm afraid I can't advise on working in a presumed TSO environment. I just 
hate having to stick a wet electronic finger in the air and estimate the delay 
before which I just possibly might expect the response to appear which I 
guess is what this fifth positional parameter of GETMSG is all about - ugh!!!

Chris Mason

On Mon, 5 Apr 2010 18:34:18 -0400, Bruce Schaefer 
bruce.s...@gmail.com wrote:

Hello list,
I have a rexx that issues console commands and writes the responses to a
dd after using getmsg to retrieve the response. Everything is good for
MVS commands and JES2 commands if L=Z is included.  Is there a similar
option for VTAM commands? For D NET,options, I am only getting:
IST097I DISPLAY ACCEPTED
I've tried adding the CART parameter to my emcs console and the getmsg
with same results.
Thanks,
Bruce Schaefer

--
/*
//* Bruce Schaefer
//* mailto:bruce.s...@gmail.com

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: REXX and VTAM command responses

2010-04-05 Thread Scott Ford
Alan is correct, you will have wait for the message to come bac
Bruce,

Alan is correct, you will have wait for the message to come back to the Rexx 
clist. Also make sure that all messages are being displayed and are no 
supressed with by MPF or like a Netview Message automation table. I worked a 
ton of Netview/rexx and these were the two gotchas we had to watch out for in 
different environments.
 
Scott J Ford
Senior Systems engineer
www.identityforge.com 





From: Bruce Schaefer bruce.s...@gmail.com
To: IBM-MAIN@bama.ua.edu
Sent: Mon, April 5, 2010 6:34:18 PM
Subject: REXX and VTAM command responses

Hello list,
I have a rexx that issues console commands and writes the responses to a dd 
after using getmsg to retrieve the response. Everything is good for MVS 
commands and JES2 commands if L=Z is included.  Is there a similar option for 
VTAM commands? For D NET,options, I am only getting: IST097I DISPLAY ACCEPTED
I've tried adding the CART parameter to my emcs console and the getmsg with 
same results.
Thanks,
Bruce Schaefer

-- /*
//* Bruce Schaefer
//* mailto:bruce.s...@gmail.com
// 
--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



 
--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html