I’m working on updating X34 to support Unix directory paths in addition to datasets.
X34 foo.bar |
lists all datasets for high-level qualifiers FOO.BAR | |
X34 SYS%.**.H |
any 3.4 mask will work | |
X34 /path |
lists Unix directory /path | NEW |
X34 ~/path |
referencing from home directory works, too | NEW |
X34 |
uses the dataset or Unix path name at the cursor position if any, otherwise lists all datasets for the current userid/prefix |
UPDATED |
X34 .FOO |
lists datasets from the REFLIST FOO, if it exists, otherwise lists datasets for high-level qualifier userid/prefix.FOO |
|
X34 ./FOO |
lists Unix files from the REFLIST FOO | NEW |
X34 . |
bring up the personal data list list, alias of REFOPEND | |
X34 .REFLIST |
data set list based upon the last 30 referenced datasets | |
X34 ./REFLIST |
Unix path list based upon the last 30 referenced unix files | NEW |
This is what I have so far:
/*% NOCOMMENT Rexx Procedure X34 */ /* USAGE: X34 {shortcut} ** If the shortcut is a '.' ** bring up the list of Personal Data Set Lists (REFOPEND) ** If the shortcut is missing, use a dataset name or unix path ** 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 dataset name qualifier/mask. Use ./xxx for unix directories ** defined to list xxx ** If the shortcut begins with a '/', pass to Data Set List (UDLIST) ** Otherwise, pass through to the DSLIST command as a DSName Prefix ** (quoted) or unix path ** Use the REFOPEND command to set up Personal Data Set Lists */ Parse Arg shortcut . /* case matters for unix */ Address ISPEXEC If (shortcut = ".") Then Do "SELECT PGM(ISRDSLST) PARM(PL2) SUSPEND" return RC End dslist_type = "DSL" scrname = "X34" shortcutpfx=Left(shortcut,1) 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 Pos('/',shortcut) = 0 Then dslist_type = 'DSL' Else dslist_type = "UDL" If shortcut = '' Then Do /* Still none, use default */ scrname = Sysvar('SYSPREF') shortcut = "'"Sysvar('SYSPREF')"'" End Else Do If shortcutpfx <> "'" Then If shortcutpfx <> '.' Then Do If Pos('/',shortcut) = 0 Then Do shortcut = "'"shortcut"'" /* DSN level, not DSLIST name */ scrname = Translate(shortcut, ' ', "~'./%*") End End Else Do If Left(shortcut,2) = "./" Then shortcut = Translate(Substr(shortcut" ",3)) Else shortcut = Translate(Substr(shortcut" ",2)) If (shortcut <> "") Then scrname = Translate(shortcut, ' ', "~'./%*") End End Parse Var scrname scrname . "SELECT PGM(ISRDSLST) PARM("dslist_type shortcut") SUSPEND SCRNAME("scrname")", "NEWAPPL(ISR)" Return RC