MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Switching stacks

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
mehta_ac
Beginner


Joined: 15 Nov 2006
Posts: 3
Topics: 3

PostPosted: Thu May 17, 2007 1:55 am    Post subject: Switching stacks Reply with quote

Hi,

Normally we create new stack and delete them as and when required. But is it possible to refer data lying in one of the other existing stack (created with in the same program)? I mean switching from one stack to another. If yes, please show an example to do it.

Thanks,
Anand
Back to top
View user's profile Send private message Yahoo Messenger
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Thu May 17, 2007 2:50 am    Post subject: Reply with quote

I believe (probably wrong!) that you can have multiple stacks but only the latest created is available, older ones become available as you delete newer ones. If that is the case, and you need to acces your data in parallel with the new stack then your best(?) bet would be to write your data to a stem variable and use it from there. But I am ready for enlightenment!
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Thu May 17, 2007 5:05 am    Post subject: Reply with quote

I agree with Nic, but there again we may both be wrong.
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu May 17, 2007 7:36 am    Post subject: Reply with quote

mehta_ac,

Hmm I think it is possible. Create a stack in the main exec and if you want another stack call a subroutine to issue NEWSTACK command. NEWSTACK creates a private data stack that is completely isolated from the original data stack. The elements on the original data stack cannot be accessed by an exec or the routines that it calls until a DELSTACK command is issued. When there are no more elements in the new data stack, information is taken from the terminal.

When an exec wants to delete the new stack and remove all elements placed on the new stack, it can issue the TSO/E REXX DELSTACK command. The DELSTACK command removes the most recently created data stack. If no stack was previously created with the NEWSTACK command, DELSTACK removes all the elements from the original stack.

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
DaveyC
Moderator


Joined: 02 Dec 2002
Posts: 151
Topics: 3
Location: Perth, Western Australia

PostPosted: Thu May 17, 2007 8:04 am    Post subject: Reply with quote

You can't switch stacks because they don't have a handle. As you know you can nest
them, but switching is not an option.
_________________
Dave Crayford
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group