I do that type of work using REXX. I trap the output of a LISTCAT command. 
There are excerpts from my own code.

   @DSN=STRIP(ARG(1)) 
 
   @X=OUTTRAP('@LINE.') 
     "LISTC ENT('"@DSN"') ALL"
   @X=OUTTRAP('OFF') 

I then process the trapped output for the fields that I want to test.

IF @LINE.0 > 0 THEN 
  SELECT 
    WHEN LEFT(@LINE.1,8)='GDG BASE' THEN @RECOUT = GDGBASE() 
    WHEN LEFT(@LINE.1,7)='NONVSAM' THEN @RECOUT = NONVSAM(@LINE.) 
    WHEN LEFT(@LINE.1,21)='INVALID DATA SET NAME' THEN @RECOUT = BADDSN()
    WHEN POS('NOT FOUND',@LINE.1) > 0 THEN @RECOUT = NOTFOUND() 
    OTHERWISE SAY @LINE.1; @RECOUT = "" 
    SAY SUBSTR(@LINE.1,38,9) 
  END 

and then I output the fields that I want to collect

 NONVSAM: 
   CALL DUMP 
   @CREATION = SUBSTR(@LINE.4,53,8) 
   @VOLSER = STRIP(SUBSTR(@LINE.7,26,6),L,'-')
   @RECOUT = 'NONVSAM '@CREATION' '@VOLSER 
   @RECOUT = INSERT(@DSN,@RECOUT,28,44) 
 RETURN @RECOUT 

Thank you and have a Terrific day!

Jonathan Goossen, DTM
ACT Mainframe Storage Group
Personal: 651-361-4541
Department Support Line: 651-361-5555
For help with communication and leadership skills checkout Woodwinds 
Toastmasters.



IBM Mainframe Discussion List <[email protected]> wrote on 
07/02/2012 12:05:04 PM:

> From: af dc <[email protected]>
> To: [email protected]
> Date: 07/02/2012 12:05 PM
> Subject: List Creation information for tape dsn
> Sent by: IBM Mainframe Discussion List <[email protected]>
> 
> Hello,
> can anyone give me an help about gathering creation date from catalogued
> tape dsns, like this:
> 
> NONVSAM ------- EXPAA.DY00000.GAAAA.OUT
>      IN-CAT --- CATALOG.XXXXXX.EXPXXXX
>      HISTORY
>        DATASET-OWNER-----(NULL)     CREATION--------19950617
>        RELEASE----------------2     EXPIRATION------0000.000
>      VOLUMES
>        VOLSER------------A00000     DEVTYPE------X'78048081'
>        VOLSER------------002000     DEVTYPE------X'78048081'
>      ASSOCIATIONS--------(NULL)
>      ATTRIBUTES
> 
> I need to have nonvsam, volser and creation fields for several tape 
dsns.
> These records are not recorded in TMS only on ICF catalog.
> How can I do that ?? DCOLLECT ???
> 
> Many thx, A.Cecilio.
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN


This e-mail message and all attachments transmitted with it may
contain legally privileged and/or confidential information intended
solely for the use of the addressee(s). If the reader of this
message is not the intended recipient, you are hereby notified that
any reading, dissemination, distribution, copying, forwarding or
other use of this message or its attachments is strictly
prohibited. If you have received this message in error, please
notify the sender immediately and delete this message and all
copies and backups thereof. Thank you.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to