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

Reply via email to