View previous topic :: View next topic
|
Author |
Message |
SVEKAR
New User
Joined: 23 Aug 2005 Posts: 4
|
|
|
|
Hi,
I have a REXX program which does extracts data from the the dataset which is open in BROWSE/VIEW/EDIT mode.
In VIEW/EDIT mode it works fine. I am facing problems in browse mode. The ISREDIT works for datasets in EDIT Mode.
I am not able to retrieve the member name in the browse mode using ISPEXEC VGET.
ISPEXEC VGET (ZDLDSN) gives me the PDS name but not the member.
Please help me in geting the member name.
Thanks |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Like the name says, ISPF supports only "edit/view" macros !! :-) |
|
Back to top |
|
|
SVEKAR
New User
Joined: 23 Aug 2005 Posts: 4
|
|
|
|
yes that is right. ISREDIT works for EDIT/VIEW mode. But how do I get the member name from ISPEXEC |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
from EDIT/VIEW mode, your rexx program runs as a macro. As such, you can get all the information about the file being edited (including unsaved changes).
In BROWSE mode, your rexx program runs as a TSO command. There is no connection of any sort between the browsed file and the executing rexx. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I, for one, would like to know how an exec could've invoked BROWSE on a PDS member without knowing both the name of the PDS and the name of the member beforehand? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You can parse the content of ZSCREENI for any ISPF screen.
O. |
|
Back to top |
|
|
SVEKAR
New User
Joined: 23 Aug 2005 Posts: 4
|
|
|
|
ofer71 :
yes i can parse the content of ZSCREENI, but i thought if we can get the member name using VGET then it will be an easy process right?
superk :
I will be doing a browse and then executing the rexx. i want the rexx program to find out the dataset which is browsed. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Here is something to try: Open a member in BROWSE mode. Then open another session and go into 7.3 screen. In this screen, try to find the member name in the variables list.
O. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
I will be doing a browse and then executing the rexx. i want the rexx program to find out the dataset which is browsed. |
I' ve developed applications and tools using ISPF for a long time,
this is the first time I see such an odd requirement;
Could You elucubrate, in oreder to see if there is another solution ??
Otherwise the solution might be to develop completely Your browsing dialog
"LMMLIST" and so on, and before "BROWSE" just "VPUT" all You need
and a subsequent "VGET" will provide You with the data You just saved |
|
Back to top |
|
|
Josh Keller
New User
Joined: 08 Oct 2007 Posts: 36 Location: Columbia, SC
|
|
|
|
This can be done, but I don't think VGET will get the variables you need. The only way I got this to work was to create my own command in the command table.
I have a rexx (call it BREDIT) that I set up as a command and it will pull the DSN and member name of the current browse session and open the member in an edit session
BREDIT looks like this:
Code: |
"ISPEXEC CONTROL ERRORS RETURN"
ARG ZDSN ZMEM
IF LENGTH(ZMEM) > 0 THEN DO
"ISPEXEC EDIT DATASET('"ZDSN"("ZMEM")')"
EXIT 1
END
"ISPEXEC EDIT DATASET('"ZDSN"')"
EXIT 1 |
ZDSN is the DSN or PDS name
ZMEM is the MEMBER name if its a PDS
My command table entry looks like this:
Code: |
ADDVER.3 = 'EE'
ADDTRU.3 = '1'
ADDACT.3 = 'SELECT CMD(%BREDIT &ZDSN &ZMEM)'
ADDDES.3 = 'EDIT IN A BROWSE SESSION' |
When I enter "EE" on my command line, it executes my BREDIT rexx and passes ZDSN and ZMEM as args.
Hopes this helps. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
but I don't think VGET will get the variables you need. |
Since You are writing the full dialog, there is no reason not to make
available by any mean all the info You need for subsequent processing |
|
Back to top |
|
|
|