Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Is it possible using rexx to call listvtoc command

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Is it possible using rexx to call listvtoc command
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    Post subject: Re: Is it possible using rexx to call listvtoc command
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fail to change physical VSAM filename... jacobdng CICS 6 Fri Jan 20, 2017 12:36 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us