IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Can we use the data stack for more than one REXX program?


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
maki_psg

New User


Joined: 28 Jan 2010
Posts: 47
Location: India

PostPosted: Wed Feb 13, 2013 3:26 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Feb 13, 2013 3:38 pm
Reply with quote

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 icon_cool.gif
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Feb 13, 2013 3:57 pm
Reply with quote

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
View user's profile Send private message
maki_psg

New User


Joined: 28 Jan 2010
Posts: 47
Location: India

PostPosted: Wed Feb 13, 2013 4:24 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Using API Gateway from CICS program CICS 0
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
Search our Forums:

Back to Top