ann
New User
Joined: 10 Aug 2005 Posts: 3
|
|
|
|
hello all,
the OUTRAP can trap the tso command(like: listcat, listdsi..) output and then you can do some information extraction. But how about the listvtoc? Only thing I can do is submit it and output to a file, finally retrieve the output list? Do you know other method? Thanks for sharing. |
|
cpuhawg
Active User
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
REXX can be used to allocate DD statements and call the program. Once the program is "Called" and executed, the output will be directed to the DD statement you define.
Here is an example of a LISTCAT JCL. DD statements SYSPRINT and SYSIN are used.
Code: |
//ALIAS EXEC PGM=IDCAMS
//SYSPRINT DD DSN=HLQ.SYSPRINT.OUTPUT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(5,1),RLSE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200,DSORG=PS)
//SYSIN DD *
LISTCAT ENTRIES(HLQ) ALL
|
Here is an example of using REXX to execute the IDCAMS program to obtain LISTCAT output.
Code: |
NEWSTACK
ENTRY1 = "HLQ"
SYSINR = " LISTCAT ENTRIES("||ENTRY1||") ALL"
ADDRESS TSO "ALLOC FI(SYSPRINT) NEW CATALOG",
"LRECL(133) BLKSIZE(3990) RECFM(F B A) TRACKS SPACE(10 5)",
"UNIT(SYSDA) RETPD(001)"
ADDRESS TSO "ALLOC FI(SYSIN) REUSE UNIT(SYSDA) DSORG(PS) SPACE(1 1)",
"TRACKS LRECL(80) BLKSIZE(0) RECFM(F B)"
QUEUE SYSINR
"EXECIO 1 DISKW SYSIN (FINIS"
"CALL 'SYS1.LINKLIB(IDCAMS)'"
DELSTACK
ADDRESS TSO "FREE F(SYSIN)"
NEWSTACK
"EXECIO * DISKR SYSPRINT (FINIS"
|
In this example, HLQ is inserted in the SYSINR variable. SYSPRINT and SYSIN are allocated. SYSINR is QUEUED, then written into SYSIN. The IDCAMS program is called and will execute using the LISTCAT statement and the output is written to SYSPRINT. Finally, SYSPRINT is READ into the next stack waiting subsequent REXX commands.
This same process should work for LISTVTOC if you know the DD statments and know where the LISTVTOC program resides so you can code your CALL statement. |
|