Dear Listers,

How can I make this:

RS=ALERTSN(SEV,TYPENAME,ELEMENT,DESC,STATUS,STSDESC,
  SUBSRC,SOURCE,LOCATION,SYSTYPE,PLTFTYPE,IMPACT,HOST,
  MONENV,RESOURCE,EXTRINFO,ACTIVE,CLOSING,FTPERR,
  APPLTYPE,APPLNAME,UNIQUE)

actually work?

What happens is that the values of STSDESC and SUBSRC get concatenated and then 
the rest of the argument list is shifted up one place. Same with HOST and 
MONENV. FTPERR, APPLTYPE, PPLNAME and UNIQUE don't get a value assigned in the 
called function, because by then, the arguments have been shifted too much and 
there are none left to give them any value.

I know that are a lot of arguments, but I cannot for the life of me find a book 
that states there is a limitation to the number of arguments in a function 
call. The problem is definitely with the continuation of the statement over 
several lines. I have searched both User Guide and Reference Manual and both 
seem to indicate one has to put a comma at the end of the line that is to be 
continued. But when I do that:

RS=ALERTSN(SEV,TYPENAME,ELEMENT,DESC,STATUS,STSDESC,,
  SUBSRC,SOURCE,LOCATION,SYSTYPE,PLTFTYPE,IMPACT,HOST,,
  MONENV,RESOURCE,EXTRINFO,ACTIVE,CLOSING,FTPERR,,
  APPLTYPE,APPLNAME,UNIQUE)

I get:

    55 +++ 
RS=ALERTSN(SEV,TYPENAME,ELEMENT,DESC,STATUS,STSDESC,,SUBSRC,SOURCE,LOCATION,SYSTYPE,PLTFTYPE,IMPACT,HOST,,MONENV,RESOURC
E,EXTRINFO,ACTIVE,CLOSING,FTPERR,,APPLTYPE,APPLNAME,UNIQUE)
IRX0040I Error running ALERTSNB, line 55: Incorrect call to routine

Then I thought to get clever and I built one long string containing the entire 
call in one line and executed that by using INTERPRET:

LongInstr='RS=(ALERTSN SEV,TYPENAME,ELEMENT,DESC,STATUS,STSDESC,'!!,
'SUBSRC,SOURCE,LOCATION,SYSTYPE,PLTFTYPE,IMPACT,HOST,'!!,
'MONENV,RESOURCE,EXTRINFO,ACTIVE,CLOSING,FTPERR,'!!,
'APPLTYPE,APPLNAME,UNIQUE')
interpret LongInstr

No such luck :-(

    59 +++  
RS=ALERTSN(SEV,TYPENAME,ELEMENT,DESC,STATUS,STSDESC,SUBSRC,SOURCE,LOCATION,SYSTYPE,PLTFTYPE,IMPACT,HOST,MONENV,RESOURCE
,EXTRINFO,ACTIVE,CLOSING,FTPERR,APPLTYPE,APPLNAME,UNIQUE)
    59 +++ interpret LongInstr
IRX0040I Error running ALERTSNB, line 59: Incorrect call to routine

It's Friday afternoon and I have a headache...

To all you Rexx experts, please, how does one go about passing many arguments 
to a function?

Thanks and very best regards,

Jantje.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to