View previous topic :: View next topic
|
Author |
Message |
maki_psg
New User
Joined: 28 Jan 2010 Posts: 47 Location: India
|
|
|
|
Hi,
I have coded the below REXX program to know how the datastack has been filled and retrieved using REXX.
Code: |
PRGM0001
/* REXX */
PUSH 'JAMES CAMERON'
PUSH 'JURASSIC PARK'
PULL NAME
EXIT
|
Here, I have intentionally did not use another PULL statement to extract all the rows from the current stack.
I tried to code another program (PRGM0002) and thought that PULL statement will pick the left out row from stack, however, it did not retrieve the information from stack and prompted the user to enter the data.
Code: |
PRGM0002
/* REXX */
PULL MOVIENAME
EXIT
|
Isn't it possible to use the old stack data in more than 1 rexx exec? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
the data stack is <local> to each REXX script execution
and unlike told on the IBMMAIN and REXX lists
IT DOES NOT USE THE SPOOL |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
When a Rexx script ends, TSO will drain the stack of whatever data is left in it. Although you did not mention it, I'd be willing to bet that you got a IKJ56621I INVALID COMMAND message after PRGM0001 ended, as the line "JURASSIC PARK" was passed to TSO, which did not know what to make of it. |
|
Back to top |
|
|
maki_psg
New User
Joined: 28 Jan 2010 Posts: 47 Location: India
|
|
|
|
Akatsukami wrote: |
When a Rexx script ends, TSO will drain the stack of whatever data is left in it. Although you did not mention it, I'd be willing to bet that you got a IKJ56621I INVALID COMMAND message after PRGM0001 ended, as the line "JURASSIC PARK" was passed to TSO, which did not know what to make of it. |
Hi Enrico/Akatsukami,
Thanks for your update.
You are rite. I did get an error since I did not use the stack data completely.
I understood that it is not possible to use the stack data between the rexx programs. |
|
Back to top |
|
|
|