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 

get the name of the dataset in browse

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


Joined: 02 Dec 2002
Posts: 155
Topics: 25
Location: N.Ireland

PostPosted: Thu May 22, 2008 6:17 am    Post subject: get the name of the dataset in browse Reply with quote

All,
I am trying to create a rexx/clist which will print the dataset I am browsing. Is there a way to capture the name of the dataset I am browsing ?

Thanks
Sreejith
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu May 22, 2008 6:50 am    Post subject: Reply with quote

with an edit macro? no.

but, you could pass the name of the dataset to a rexx script, executed by 'tso myrexx dsn' and then force a print.

but, why go to this trouble when printing a dataset is so easily done from almost any 3.n screen?
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Sreejith
Intermediate


Joined: 02 Dec 2002
Posts: 155
Topics: 25
Location: N.Ireland

PostPosted: Thu May 22, 2008 7:20 am    Post subject: Reply with quote

Thanks Dick. We have an application here which will show a form in browse and user want to print this. The application deletes the file when we quit browse. So I was going to give them a rexx/clist which will print (not a straight forward print, need to add some extra bits here and there) it. I don't have access to the source code of the application.
For the time being I have to tell them to note the dataset name and enter it manually.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu May 22, 2008 11:42 pm    Post subject: Reply with quote

you can use the same technique as vcursor (ZCREENI, forget about ZSCREENC). You may want to put your command in the ispf command table so users don't have to explicitly type it in as a TSO command. Just have sufficient error checking to be sure they are in browse.
_________________
New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html.
Back to top
View user's profile Send private message Visit poster's website
Sreejith
Intermediate


Joined: 02 Dec 2002
Posts: 155
Topics: 25
Location: N.Ireland

PostPosted: Fri May 23, 2008 5:09 am    Post subject: Reply with quote

semigeezer,
Thanks for the reply. I will give it a try.

Thanks
sreejith
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
expat
Intermediate


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

PostPosted: Sat May 24, 2008 5:55 am    Post subject: Reply with quote

Have you tried something like ......
Code:

/* REXX *** EXECUTE CURRENT DATASET BEING EDITED, EITHER PDS OR FLAT */
ISREDIT    MACRO
SYSUID   = SYSVAR(SYSUID)
ADDRESS TSO
"ISREDIT (DSN) = DATASET"
"ISREDIT (MEM) = MEMBER "
IF MEM = " " THEN DO
   "EXEC '"DSN"'"
END
ELSE DO
   "EXEC '"DSN"("MEM")'"
END
EXIT

_________________
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
Sreejith
Intermediate


Joined: 02 Dec 2002
Posts: 155
Topics: 25
Location: N.Ireland

PostPosted: Mon May 26, 2008 4:12 am    Post subject: Reply with quote

expat,
Yes. I did try that. but it only works in EDIT or VIEW mode and I am looking for something which will work in BROWSE mode.

Thanks
Sreejith
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
jim haire
Beginner


Joined: 30 Dec 2002
Posts: 140
Topics: 40

PostPosted: Wed Jun 25, 2008 3:42 pm    Post subject: Reply with quote

Did you find something that would work for you? This logic will work if you type
"TSO command" on the command line.

It finds the word "BROWSE" on the screen and returns the next word on the screen, which should be the dataset being browsed.

Code:

ADDRESS ISPEXEC
"VGET (ZSCREENI) SHARED"

NUMBER_WORDS_ON_SCREEN = WORDS(ZSCREENI)

DROP WRD.
DO I = 1 TO NUMBER_WORDS_ON_SCREEN
    WRD.I  = WORD(ZSCREENI,I)
    IF WRD.I = "BROWSE" THEN
        DO
          I = I + 1
          DATASET_NAME = WORD(ZSCREENI,I)
          I = NUMBER_WORDS_ON_SCREEN
        END
END

SAY DATASET_NAME
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Jun 25, 2008 4:33 pm    Post subject: Reply with quote

Rather than depend on screen scraping, you might want to just use a customized browse panel that stores the variable value somewhere, either in the profile pool (under a different name) or in a temporary data set (via a Rexx panel exit)

Screen scraping can easily fail. The above example would fail with PANELID on, for example.
_________________
New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html.
Back to top
View user's profile Send private message Visit poster's website
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