/* REXX */ /* */ /* AUTHOR: Mark Zelden */ /* */ /* Last update: 05/15/2002 */ /*****************************************************************/ /* XVIEW - VIEW a data set from anywhere. */ /* */ /* Best used when set up in the ISPF command table with an */ /* abbreviation of "XV". */ /* VERB T ACTION */ /* XVIEW 2 SELECT CMD(%XVIEW &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: */ /* */ /* XV DATA.SET.NAME (VOLSER is optional) */ /* */ /* XV 'MY.PDS(ABC*)' */ /* XV PDS.NOTCAT USER01 */ /* */ /* If not set up as an ISPF command, then you can still */ /* invoke the exec by typing: TSO %XVIEW 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" "VGET ZPCFMCN PROFILE" If ZPCFMCN = '/' then CONF = 'YES' else CONF = 'NO' "VIEW DATASET("DSN") VOLUME("VOL")" , /* try userid.DSN first */ "CONFIRM("CONF")" If RC <> 0 then do /* not found - try again */ DSN = Strip(Translate(DSN,"","'")) /* remove quotes if used */ "VIEW DATASET('"DSN"') VOLUME("VOL")" , /* try DSN specified */ "CONFIRM("CONF")" End If RC <> 0 then "SETMSG MSG("ZERRMSG")" /* not found - issue msg */