Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Can we use the data stack for more than one REXX program?
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Wed Feb 13, 2013 3:38 pm    Post subject: Reply to: Can we use the data stack for more than one REXX p
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: 1746
Location: Bloomington, IL

PostPosted: Wed Feb 13, 2013 3:57 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us