I need to execute “LISTVTOC” in a REXX script. However, so far, I have not been able to do it. I tried quite a few different ways, but none seem to work.
Could someone help me here?
Here is the code that I have created so far:
NEWSTACK
command = " LISTVTOC FORMAT,VOL=3390=MTM004,DSNAME="dsn""
ADDRESS TSO "ALLOC FI(SYSPRINT) NEW REU",
"RECFM(F B A) TRACKS SPACE(10 5)"
ADDRESS TSO "ALLOC FI(SYSIN) REUSE UNIT(SYSDA) DSORG(PS) SPACE(1 1) TRACKS"
QUEUE command
"EXECIO 1 DISKW SYSIN (FINIS"
"CALL 'SYS1.LINKLIB(IEHLIST)'"
DELSTACK
ADDRESS TSO "FREE F(SYSIN)"
NEWSTACK
"EXECIO * DISKR SYSPRINT (FINIS"
I have tried to use a tip from a fellow at [1]; but, that does not seem to do the trick. I know that the "LISTVTOC" does not have a great output, but the script is just for an exercise. Does anyone see any way to make that work?
[1] http://ibmmainframes.com/about12597.html