Tommy,

Here is one I wrote and its output....

/* rexx    */
rc = AXRCMD('D U,,,0A80,10','OUTVAR.',100)
if rc = 0 then do;
  say 'AXRCMD worked'
end;
say 'Queued lines: 'OUTVAR.0
do i=1 to OUTVAR.0
   parse var OUTVAR.i wd1 wd2 wd3 wd4 wd5 wd6
   if substr(wd1,1,3) = 'IEE' then iterate
   if substr(wd1,1,4) = 'UNIT' then iterate
   SAY 'UNIT='WD1' VOL=SER='WD4
end;


0090  AXR0500I AXREXX OUTPUT DISPLAY 848
0090  EXECNAME=SYSRDI REQTOKEN=0000400000000000C34234A549DE8800
0090  AXRCMD worked
0090  Queued lines: 12
0090  UNIT=0A80 VOL=SER=Z9RES1
0090  UNIT=0A81 VOL=SER=Z9RES2
0090  UNIT=0A82 VOL=SER=Z9SYS1
0090  UNIT=0A83 VOL=SER=Z9RES3
0090  UNIT=0A84 VOL=SER=Z9USS1
0090  UNIT=0A85 VOL=SER=Z9PRD1
0090  UNIT=0A86 VOL=SER=Z9DIS1
0090  UNIT=0A87 VOL=SER=Z9DIS2
0090  UNIT=0A88 VOL=SER=Z9DIS3
0090  UNIT=0A89 VOL=SER=Z9DIS4

The sysrexx you included should have the first line as
   CMDRESULT = AXRCMD('$DI,'OUTPUTVAR.',100)

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 ..

Scott Ford
Senior Systems Engineer

 
[p] 678.266.3399 x304    [m] 609-346-0399  identityforge.com



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately or let us know at

[EMAIL PROTECTED] or [EMAIL PROTECTED], and then delete the
original.  Any other use of the email by you is prohibited.

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Tommy Tsui
Sent: Thursday, November 06, 2008 11:05 PM
To: [email protected]
Subject: Re: how to write sysrexx

Hi,
I try to count the current init status but failed with the AXRCMD.....?
anything wrong?

CMDRESULT=AXRCMD('/DI','OUTPUTVAR.',100);
 SAY OUTPUTVAR.0
 c = 0
 do c = 1 to  OUTPUTVAR.0
    status  = substr(word(OUTPUTVAR.c,3),8,6)
    say  status
    active=0
    drained=0
    inactive=0
    if status = 'ACTIVE' then
         active = active + 1
    else if status = 'DRAINE' then
         drained = drained + 1
    else if status = 'INACTI' then
         inactive = inactive + 1
 end;

On Fri, Nov 7, 2008 at 10:53 AM, Tommy Tsui <[EMAIL PROTECTED]> wrote:

>
> Thanks, after I delcare active=0, it works fine
>
>
> On Fri, Nov 7, 2008 at 10:46 AM, Scott Fagen
<[EMAIL PROTECTED]>wrote:
>
>> On Fri, 7 Nov 2008 10:32:56 +0800, Tommy Tsui <[EMAIL PROTECTED]>
>> wrote:
>>
>> >hi all
>> >
>> >Is there any book teach how to write a correct SYSREXX, how comes a bad
>> >arithmetic conversion with "active = active + 1".....any problem here???
>> >
>> > RESPONSE=XXTSPD2
>> >  AXR0500I AXREXX OUTPUT DISPLAY 530
>> >  EXECNAME=INITINFO REQTOKEN=0000400000000000C34272CC59FE94C9
>> >
>> >  ACTIVE
>> >       6 +++   active = active + 1
>> >  IRX0041I Error running INITINFO, line 6: Bad arithmetic conversion
>>
>> Maybe the variable 'active' isn't set to a number?
>>
>> Scott Fagen
>> Enterprise Systems Management
>>
>> ----------------------------------------------------------------------
>> 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
>>
>>
>

----------------------------------------------------------------------
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

----------------------------------------------------------------------
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