Rexx to identify the current DS is browsed - How?



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

Rexx to identify the current DS is browsed - How?

Postby crazystorm » Fri Jul 29, 2011 1:51 pm

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)'
User avatar
crazystorm
 
Posts: 12
Joined: Wed Feb 16, 2011 2:50 pm
Has thanked: 1 time
Been thanked: 0 time

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

Postby NicC » Fri Jul 29, 2011 4:20 pm

ISPF Edit and Edit Macro manual. And you will have to do it in View or edit as browse does not allow macros.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

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

Postby Pedro » Mon Aug 01, 2011 11:29 pm

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.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times


Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post