Page 1 of 1

Rexx to identify the current DS is browsed - How?

PostPosted: Fri Jul 29, 2011 1:51 pm
by crazystorm
Hi,

I need to implement a function with REXX. One basic simple requirement is (1) view or browse a dataset (2) put the name of REXX program you developed in the command line and Enter. (3) the REXX will be executed to identify the PS dataset you are currently viewing or browsing.

Now my question is how to implement the function mentioned in step(3). Which command or function programmed in REXX could retrieve the attributes of the current dataset (i.e. at leat the dataset name ... etc.)? E.g. I programmed a REXX program named MYREXX, then :

--------------------------------------------------------------------------------------------------------------------
VIEW USER123.DSN.PGM(COLPGM01) - 01.14 Columns 00001 00072
****** ***************************** Top of Data ******************************
000100 LINE111
000200 LINE222
000300 LINE333
****** **************************** Bottom of Data ****************************


Command ===> _MYREXX_________________________________________ Scroll ===> CSR
--------------------------------------------------------------------------------------------------------------------

Now I want MYREXX to be executed and print out the dataset name 'USER123.DSN.PGM(COLPGM01)'

Re: Rexx to identify the current DS is browsed - How?

PostPosted: Fri Jul 29, 2011 4:20 pm
by NicC
ISPF Edit and Edit Macro manual. And you will have to do it in View or edit as browse does not allow macros.

Re: Rexx to identify the current DS is browsed - How?

PostPosted: Mon Aug 01, 2011 11:29 pm
by Pedro
1. Add a command to your command table, so that you can simply type the command name.

2. in your rexx program, use the ZSCREENI variable to examine the currently displayed screen image.