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 

Vput variables aren't found by subsequent Vget

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


Joined: 13 Jul 2003
Posts: 9
Topics: 4

PostPosted: Sun Jul 13, 2003 12:42 pm    Post subject: Vput variables aren't found by subsequent Vget Reply with quote

Gents:

I'm invoking an ISPF primary menu using 'ISPEXEC SELECT PANEL' and want to pass 2 variables to its CMD(%go run it) rexx execs. I put the variables in the SHARED pool but they can't be found when I run the VGET. I think maybe the shared pools aren't built yet, or the newappl / newpool is resetting the pools ?

I run in this order:

1: Invoke ISPF main menu:

ISPEXEC 'SELECT PANEL(PRIMEMNU) NEWAPPL(ABC) NEWPOOL'


2: Menu looks like this:

% 1 -+Insert Customer
% 2 -+Change Customer
% 3 -+Delete Customer
% X -+Exit
+
&TITLE = '--------- Primary Menu ----------------'
)PROC
&ZSEL = TRANS(TRUNC(&ZCMD,'.')
1,' CMD (% INSDB201 ) NOCHECK'
2,' CMD (% CHGDB201) NOCHECK'
3,' CMD (% DELDB201 ) NOCHECK'
X,Exit

3: CMD execs look like this:

QUEUE 'RUN PROGRAM(INSDB201) PLAN(YOURPLAN)'
QUEUE 'END'
ADDRESS TSO "DSN SYSTEM(YOURDB2)"

etc.

My goal is to supply the DB2NAME & DB2PLAN just once in step 1, overriding each CMD exec's YOURPLAN & YOURDB2 since there are a lot of these CMD execs in my panel, like this:

1: DB2NAME = 'DB2D'
DB2PLAN = 'ABCPLAN'
ISPEXEC 'VPUT (DB2NAME) SHARED'
ISPEXEC 'VPUT (DB2PLAN) SHARED'
ISPEXEC 'SELECT PANEL(PRIMEMNU) NEWAPPL(ABC) NEWPOOL'

2: And change the CMD execs to look like this:

ISPEXEC 'VGET (DB2NAME) SHARED'
ISPEXEC 'VGET (DB2PLAN) SHARED'
SAY DB2NAME DB2PLAN (This statement displays blank lines as though
the variables are not found in the pool)
QUEUE 'RUN PROGRAM(INSDB201) PLAN(DB2PLAN)'
QUEUE 'END'
ADDRESS TSO "DSN SYSTEM(DB2NAME)"

The last 3 lines are not syntactially accurate, but you get the idea. I've also tried putting the Vgets in the )panel def of the primary menu. No luck.


Any help appreciated..
Robert.
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Sun Jul 13, 2003 3:39 pm    Post subject: Reply with quote

Robert,

You're right about NEWAPPL/NEWPOOL resetting the shared pool. Instead of
Code:

ISPEXEC 'SELECT PANEL(PRIMEMNU) NEWAPPL(ABC) NEWPOOL'

could you perhaps use:
Code:

ISPEXEC 'SELECT CMD(%SETUP) NEWAPPL(ABC) NEWPOOL'

and let the SETUP command issue:
Code:

DB2NAME = 'DB2D'
DB2PLAN = 'ABCPLAN'
ISPEXEC 'VPUT (DB2NAME DB2PLAN) SHARED'
ISPEXEC 'SELECT PANEL(PRIMEMNU)'

_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
Mike
Beginner


Joined: 03 Dec 2002
Posts: 114
Topics: 0
Location: Sydney, Australia

PostPosted: Sun Jul 13, 2003 5:10 pm    Post subject: Reply with quote

Sorry folks deleted.
_________________
Regards,
Mike.
Back to top
View user's profile Send private message
Rob Lahey
Beginner


Joined: 13 Jul 2003
Posts: 9
Topics: 4

PostPosted: Tue Jul 15, 2003 2:54 am    Post subject: Reply with quote

Merv:

That looks like a great solution. I will try it when I get back in the office tomorrow, and I'll let you know how it worked.

Muchas gracias...
Back to top
View user's profile Send private message
Rob Lahey
Beginner


Joined: 13 Jul 2003
Posts: 9
Topics: 4

PostPosted: Tue Jul 15, 2003 9:36 am    Post subject: Reply with quote

Merv:

It works great, thanks for the help !

Robert
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Tue Jul 15, 2003 4:37 pm    Post subject: Reply with quote

Glad to be of help.


Very Happy
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Tue Aug 17, 2004 10:10 am    Post subject: Reply with quote

There is something strange happening in my system.

I have a REXX program which displays 25 datasets (which I often use) in a panel. Earlier I used a file to store the dataset names, Now I tried to store them using VPUT.

I stored the datasets using VPUT using the PROFILE Option (Later I tried using ASIS & SHARED Options too). Next time when I invoke my rexx, it has to read the stored dataset names and display on the screen. It works fine when I invoke my routine from ISPF Panels 0 - 7. But when I invoke my routine from SDSF / SAR / ENDEVOR / XPEDITOR etc....the VGET commands give me a return code of '0' but the dataset names are all empty !!!

I use VGET PROFILE (Later I also tried using ASIS & SHARED Options).

How can I solve this ? How does my program work when I invoke it from 3.4 panel / edit / view screens. Why doesn't it work on other panels ?

Could anyone solve this mystery.

Thanks,
Phantom
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Tue Aug 17, 2004 5:31 pm    Post subject: Reply with quote

Phantom,

I don't know what SAR is, but the others will all open up using a new variable pool (so I expect SAR will, also).

This means you have a different profile pool for each of these applications. Stuff stored in your profile from option 2 will not be in your profile for SDSF.

You can gain quite a lot from just browsing your ISPF.ISPPROF library. There will be many members in there with suffixes PROF or SPROF. The first three characters of the member names will tell you the application name.
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Tue Aug 17, 2004 11:53 pm    Post subject: Reply with quote

Thanks a lot Mervyn.

This being the case, is there any way to overcome this problem. Can I access the variables which are in my original profile pool ?

Thanks,
Phantom
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Wed Aug 18, 2004 9:21 am    Post subject: Reply with quote

It's possible to access a profile table. It's just an ISPF table consisting of a single row of extension variables (no keys, no named variables). You can see the structure and contents of the table with Dialog Test. ISPF.ISPPROF should be in your ISPTLIB concatenation.

Good luck.
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Aug 19, 2004 10:01 pm    Post subject: Reply with quote

I modified my code as shown below and now it works absolutely fine.

Code:

"ISPEXEC VGET ZAPPLID PROFILE SHARED"
IF ZAPPLID <> 'ISR' THEN
 DO
     "ISPEXEC SELECT CMD(%EZ) NEWAPPL(ISR)"
      EXIT 0
 END
......
......
"ISPEXEC VGET (EZDSNUMS) SHARED PROFILE"
......
......
"ISPEXEC VPUT (EZDSNUMS) PROFILE"
......


Earlier I didn't have this check on APPLID. so my variables were stored in different pools and I couldn't access them.

Thanks for the clarifications Mervyn.

Regards,
Phantom
Back to top
View user's profile Send private message
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