IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Is it possible using rexx to call listvtoc command


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ann

New User


Joined: 10 Aug 2005
Posts: 3

PostPosted: Mon Jul 24, 2006 7:59 pm
Reply with quote

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.
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Mon Jul 24, 2006 8:58 pm
Reply with quote

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.
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts REXX to get all Dataset names from a ... CLIST & REXX 5
No new posts Instream REXX? JCL & VSAM 13
No new posts USAGE parameter of RACDCERT CONNECT c... All Other Mainframe Topics 2
No new posts CEMT using Rexx? Help please CLIST & REXX 3
No new posts get submitted JCL from SDSF with REXX... CLIST & REXX 2
Search our Forums:


Back to Top