/* REXX */ /* */ /* AUTHOR: Mark Zelden */ /* */ /* Last update: 05/15/2002 */ /*****************************************************************/ /* XBROWSE - BROWSE a data set from anywhere. */ /* */ /* Best used when set up in the ISPF command table with an */ /* abbreviation of "XB". */ /* VERB T ACTION */ /* XBROWSE 2 SELECT CMD(%XBROWSE &ZPARM) NEWAPPL(ISR) */ /* */ /* Fully qualified data set names are now optional, regardless */ /* of the TSO PROFILE PREFIX setting. PREFIX.DATA.SET.NAME will */ /* be tried first, then DATA.SET.NAME for data sets that are */ /* not fully qualified. */ /* */ /*****************************************************************/ /* COMMAND SYNTAX: */ /* */ /* XB DATA.SET.NAME (VOLSER is optional) */ /* */ /* XB 'MY.PDS(ABC*)' */ /* XB PDS.NOTCAT USER01 */ /* */ /* If not set up as an ISPF command, then you can still */ /* invoke the exec by typing: TSO %XBROWSE DATA.SET.NAME */ /*****************************************************************/ Parse UPPER ARG DSN VOL If DSN= '' then do /* no DSN specified */ say 'Please enter positional parameter dsn -' /* prompt for dsn */ parse upper pull DSN /* get dsn response */ End Address ISPEXEC "CONTROL ERRORS RETURN" "BROWSE DATASET("DSN") VOLUME("VOL")" /* try userid.DSN first */ If RC <> 0 then do /* not found - try again */ DSN = Strip(Translate(DSN,"","'")) /* remove quotes if used */ "BROWSE DATASET('"DSN"') VOLUME("VOL")" /* try DSN specified */ End If RC <> 0 then "SETMSG MSG("ZERRMSG")" /* not found - issue msg */