ISPF Option 3.4 is great. REFLISTs are also pretty good, but they are little used and a bit inconvenient. This project sets up an ISPF command table entry to invoke a Rexx exec that will give a Dataset List (i.e. option 3.4-like) panel based upon a REFLIST or high-level qualifier or userid/second-level qualifier. This is a bit of an extension to the DSLIST
command. So,
X34 foo.bar |
lists all datasets for high-level qualifiers FOO.BAR |
X34 SYS%.**.H |
any 3.4 mask will work |
X34 |
uses the dataset name at the cursor position if any, otherwise lists all datasets for the current userid/prefix |
X34 .FOO |
lists datasets from the REFLIST FOO, if it exists, otherwise lists datasets for high-level qualifier userid/prefix.FOO |
X34 . |
bring up the personal data list list, alias of REFOPEND |
X34 .REFLIST |
data set list based upon the last 30 referenced datasets |
Procedure
Define an ISPF Command Table entry for X34. This is not strictly necessary as you could use X34 as a TSO command. I won’t go into all the details of how to set up a personal command table or how to update an existing table because this varies so much depending on how ISPF is set up in your shop.
Use the REFOPEND
command to set up Personal Data Set Lists, if you want. This is not required, but helpful. Once on the Personal Data Set Lists screen, use the NEW
command to create a new list. Apparently, now (as of z/OS 1.13) this works for Unix System Services files, but I haven’t investigated that yet. But I will so look for a later post on this subject.
Source
Here is the X34 Rexx exec at the moment. The part where it is searching the cursor position for a dataset name needs a little work, I think. Put this Rexx exec somewhere where you ISPF session can find it.
/*% NOCOMMENT Rexx Procedure X34 */ /* USAGE: X34 {shortcut} ** If the shortcut is a '.', bring up the list of Personal Data Set Lists ** If the shortcut is missing, use a dataset name at the cursor position ** or use 'Sysvar('SYSPREF')' ** If the shortcut begins with a '.', pass to Data Set List ** after removing the period, unquoted so a DLS name or subsequent ** level datasent name qualifier/mask ** Otherwise, pass through to the DSLIST command as a DSName Prefix ** (quoted) ** Use the REFOPEND command to set up Personal Data Set Lists */ shortcut = Arg(1) scrname = "X34" Address ISPEXEC If shortcut = "." Then Do "SELECT PGM(ISRDSLST) PARM(PL2) SUSPEND" return RC End If shortcut = "" Then Do /* none specifed, check cursor postiion */ "VGET (ZSCREENC ZSCREENI)" If Substr(zscreeni,zscreenc+1,1) <> " " Then Do zscreeni = Strip(Translate(zscreeni,' ', "=()+,'")) b = Lastpos(' ',zscreeni,zscreenc+1) Parse Value Substr(zscreeni,b) With shortcut . If shortcut <> "" Then shortcut = shortcut End End If shortcut = '' Then Do /* Still none, use default */ shortcut = "'"Sysvar('SYSPREF')"'" scrname = Userid() End Else Do If Left(shortcut,1) <> "'" Then If Left(shortcut,1) <> '.' Then shortcut = "'"shortcut"'" /* DSN level, not DSLIST name */ Else Do shortcut = Substr(shortcut" ",2) If shortcut <> "" Then scrname = shortcut End End "SELECT PGM(ISRDSLST) PARM(DSL" shortcut") SUSPEND SCRNAME("scrname")", "NEWAPPL(ISR)" Return RC
See the update to this to support HFS files.