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: 10234
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: 1753
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 Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am


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