View previous topic :: View next topic |
Author |
Message |
Rob Lahey Beginner
Joined: 13 Jul 2003 Posts: 9 Topics: 4
|
Posted: Sun Jul 13, 2003 12:42 pm Post subject: Vput variables aren't found by subsequent Vget |
|
|
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 |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Sun Jul 13, 2003 3:39 pm Post subject: |
|
|
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 |
|
|
Mike Beginner
Joined: 03 Dec 2002 Posts: 114 Topics: 0 Location: Sydney, Australia
|
Posted: Sun Jul 13, 2003 5:10 pm Post subject: |
|
|
Sorry folks deleted. _________________ Regards,
Mike. |
|
Back to top |
|
|
Rob Lahey Beginner
Joined: 13 Jul 2003 Posts: 9 Topics: 4
|
Posted: Tue Jul 15, 2003 2:54 am Post subject: |
|
|
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 |
|
|
Rob Lahey Beginner
Joined: 13 Jul 2003 Posts: 9 Topics: 4
|
Posted: Tue Jul 15, 2003 9:36 am Post subject: |
|
|
Merv:
It works great, thanks for the help !
Robert |
|
Back to top |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Tue Jul 15, 2003 4:37 pm Post subject: |
|
|
Glad to be of help.
_________________ The day you stop learning the dinosaur becomes extinct |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Tue Aug 17, 2004 10:10 am Post subject: |
|
|
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 |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Tue Aug 17, 2004 5:31 pm Post subject: |
|
|
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 |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Tue Aug 17, 2004 11:53 pm Post subject: |
|
|
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 |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Wed Aug 18, 2004 9:21 am Post subject: |
|
|
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 |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Aug 19, 2004 10:01 pm Post subject: |
|
|
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 |
|
|
|
|