View previous topic :: View next topic |
Author |
Message |
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Tue Aug 02, 2005 5:02 am Post subject: Return multiple parameters in REXX |
|
|
How can I return multiple parameters or a stem to the calling program?
Thanks,
Diba. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue Aug 02, 2005 5:54 am Post subject: |
|
|
Dibakar,
If you know the no: of entires then you can use PULL. Just Queue them up and use PULLS for the no: entries times.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Tue Aug 02, 2005 6:12 am Post subject: |
|
|
In the same lines as Kolusu said:
Even if you are unsure of the number of entries, you can PUSH all the entries and store a count in another variable say PUSH_CNT and finally issue a PUSH on the PUSH_CNT variable. In the callling program the first PULL will be the count.
Code: |
Main-program
PULL P-CNT
DO I = 1 TO P-CNT
PULL PARM_VAR
.....
END
|
Hope this helps,
Thanks,
Phantom |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Tue Aug 02, 2005 8:02 am Post subject: |
|
|
or use queued(), assuming you cleared the stack beforehand |
|
Back to top |
|
|
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Wed Aug 03, 2005 3:12 am Post subject: |
|
|
Thanks everybody, this will serve my purpose. |
|
Back to top |
|
|
|
|