Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Can we create REXX ouput in an Excel ... upendrasri CLIST & REXX 3 Wed Jan 17, 2018 8:19 pm
No new posts Need to obtain VTOC information via R... djeffbland CLIST & REXX 10 Thu Jan 11, 2018 4:13 am
No new posts REXX contest sergeyken CLIST & REXX 2 Tue Jan 09, 2018 1:55 am
No new posts Looping REXX - unable to interrupt RAVISANKAR07 CLIST & REXX 3 Wed Dec 06, 2017 1:08 pm
No new posts The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us