View previous topic :: View next topic |
Author |
Message |
Sreejith Intermediate
Joined: 02 Dec 2002 Posts: 155 Topics: 25 Location: N.Ireland
|
Posted: Thu May 22, 2008 6:17 am Post subject: get the name of the dataset in browse |
|
|
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 |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu May 22, 2008 6:50 am Post subject: |
|
|
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 |
|
|
Sreejith Intermediate
Joined: 02 Dec 2002 Posts: 155 Topics: 25 Location: N.Ireland
|
Posted: Thu May 22, 2008 7:20 am Post subject: |
|
|
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 |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Thu May 22, 2008 11:42 pm Post subject: |
|
|
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 |
|
|
Sreejith Intermediate
Joined: 02 Dec 2002 Posts: 155 Topics: 25 Location: N.Ireland
|
Posted: Fri May 23, 2008 5:09 am Post subject: |
|
|
semigeezer,
Thanks for the reply. I will give it a try.
Thanks
sreejith |
|
Back to top |
|
|
expat Intermediate
Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Sat May 24, 2008 5:55 am Post subject: |
|
|
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 |
|
|
Sreejith Intermediate
Joined: 02 Dec 2002 Posts: 155 Topics: 25 Location: N.Ireland
|
Posted: Mon May 26, 2008 4:12 am Post subject: |
|
|
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 |
|
|
jim haire Beginner
Joined: 30 Dec 2002 Posts: 140 Topics: 40
|
Posted: Wed Jun 25, 2008 3:42 pm Post subject: |
|
|
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 |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Jun 25, 2008 4:33 pm Post subject: |
|
|
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 |
|
|
|
|