Page 1 of 1

How to get the MVS command response information.

PostPosted: Thu Nov 04, 2010 2:08 pm
by nickwyw
I want in the REXX, get the volume serial number, used unit address, as follow codes.
I have two question,
first one, in the log I found the command rc = -3, I don't know how to conform the reason.
second, how to set the command response message to a variable, I have tried the OUTTRAP instrcution but it just can get the TSO command message.

49 *-*  address mvs 'D U,,,'unitadd
   >L>    "D U,,,"                 
   >V>    "9001"                   
   >O>    "D U,,,9001"             
   +++ RC(-3) +++                   


Code:
du_command:                               
unitadd = 9001                 
address mvs 'D U,,,'unitadd                                   
if rc \= 0 then do                       
   subrc = rc                             
   say "bad Display unit cmd, rc = "subrc
   subrc = 16                             
   signal end_du_command                 
   end                                   
else do                                   
   say 'the message is '                                 
   end                                   
end_du_command:                           
return subrc                             



Could you give me some advise, Thanks .

Re: How to get the MVS command response information.

PostPosted: Thu Nov 04, 2010 2:18 pm
by enrico-sorichetti
see
http://publibz.boulder.ibm.com/cgi-bin/ ... s/IKJ4BK80
for the whole TSO REXX shebang

and
z/OS V1R2.0-V1R9.0 TSO/E REXX User's Guide
http://publibz.boulder.ibm.com/cgi-bin/ ... 0706113306
z/OS V1R8.0-V1R9.0 TSO/E REXX Reference
http://publibz.boulder.ibm.com/cgi-bin/ ... 0626210253

for the details of the Address <some environment> facilities

anyway for console commands the proper environment is Address CONSOLE

but that is prone to open up a can of worms for authorizations needed

Re: How to get the MVS command response information.

PostPosted: Fri Nov 05, 2010 9:36 am
by Pedro
If you can whip up some assembler code, it might be easier to use the UCBLOOK macro. You can find more information: Programming Authorized Assembler Services Guide

Re: How to get the MVS command response information.

PostPosted: Thu May 02, 2013 11:52 pm
by steve-myers
Pedro is correct, though I would use the UCBSCAN COPY macro.