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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts Need help in triggering a PL1 module ... Varungv99 IMS DB/DC 0 Fri Apr 07, 2017 10:01 am
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am


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