> Scott Ford wrote
>Date:    Fri, 7 Nov 2008 00:54:01 -0500
>
>Subject: Re: how to write sysrexx
>
>Tommy,

>Here is one I wrote and its output....
<SNIP>
/* Rexx    */
</SNIP>
>
>I tried this also but it only return one message line, It has to do with 
the
>way the messages are returned ...I think. Hope this helps you out ..

I experienced this behavior as well and I opened an ETR with IBM.  IBM 
says axrcmd is working as designed but I 
found that I had to loop through responses multiple times which is 
documented in the Assembler Services Reference.
 While there is documentation in the Assembler Services Reference, it is 
somewhat vague and not at all intuitive. 
In order to capture all command output, I setup a loop which ran until 
there was no more data returned 
from axrcmd.  Note that you make the initial call without the stem 
variable and then subsequent calls include the
stem variable but not the command.  This tells axrcmd to get responses 
from the previously entered command. 

 cmd1 = "$DU,LNES" 
 call issue_console_cmd cmd1
.
.

issue_console_cmd: 
arg command 
my_rc = AXRCMD(command) 
DO UNTIL my_rc > 0 
  my_rc = AXRCMD(,'getmsg.',10) 
  call Process_What_Returned 
END 
return 

Process_What_Returned: 
  Do i = 1 to getmsg.0 
    If getmsg.i = "" Then getmsg.i = " " 
    counter=counter+1 
    My_Lines.counter=getmsg.i 
  End 
Return                                                              

Hope this helps 
Jim Holloway   MetLife
The information contained in this message may be CONFIDENTIAL and is for the 
intended addressee only.  Any unauthorized use, dissemination of the 
information, or copying of this message is prohibited.  If you are not the 
intended addressee, please notify the sender immediately and delete this 
message.

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

Reply via email to