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
 

 

Tape dataset details

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Pritisuresh

New User


Joined: 13 Mar 2008
Posts: 1
Location: Chennai

PostPosted: Thu Mar 13, 2008 4:02 pm    Post subject: Tape dataset details
Reply with quote

I want to get the last referenced date and creation date.

thanks and Regards,
priti
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 13, 2008 4:22 pm    Post subject:
Reply with quote

Ask your storage people for a TMS report
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 13, 2008 5:33 pm    Post subject:
Reply with quote

I did have the code for this, so here goes but only gives creation date not last referenced.
Code:

/* REXX ** LIST DATASETS WITH CREATE DATE                            */
"EXECIO * DISKR CATIN ( STEM CAT. FINIS"
DO KCNT = 1 TO CAT.0
  KEY = SUBSTR(CAT.KCNT,1,44)
  MODRSNRC = SUBSTR(' ',1,4)
  CSIFILTK = SUBSTR(KEY,1,44)
  CSICATNM = SUBSTR(' ',1,44)
  CSIRESNM = SUBSTR(' ',1,44)
  CSIDTYPS = SUBSTR(' ',1,16)
  CSICLDI  = SUBSTR('Y',1,1)
  CSIRESUM = SUBSTR(' ',1,1)
  CSIS1CAT = SUBSTR(' ',1,1)
  CSIRESRV = SUBSTR(' ',1,1)
  CSINUMEN = '0002'X
  CSIFLD1  = 'DSCRDT2 '
  CSIFLD2  = 'VOLSER  '
  CSIOPTS  = CSICLDI !! CSIRESUM !! CSIS1CAT !! CSIRESRV
  CSIFIELD = CSIFILTK !! CSICATNM !! CSIRESNM !! CSIDTYPS !! CSIOPTS
  CSIFIELD = CSIFIELD !! CSINUMEN !! CSIFLD1 !! CSIFLD2
  WORKLEN = 4096
  DWORK = '00001000'X !! COPIES('00'X,WORKLEN-4)
  RESUME = 'Y'
  CATNAMET = SUBSTR(' ',1,44)
  DNAMET = SUBSTR(' ',1,44)
  DO WHILE RESUME = 'Y'
    ADDRESS LINKPGM 'IGGCSI00  MODRSNRC  CSIFIELD  DWORK'
    RESUME = SUBSTR(CSIFIELD,150,1)
    USEDLEN = C2D(SUBSTR(DWORK,9,4))
    POS1=15
    DO WHILE POS1 < USEDLEN
      IF SUBSTR(DWORK,POS1+1,1) = '0'
       THEN DO
         CATNAME=SUBSTR(DWORK,POS1+2,44)
         IF CATNAME <> CATNAMET THEN
           DO
            CATNAMET = CATNAME
           END
         POS1 = POS1 + 50
      END
      DNAME = SUBSTR(DWORK,POS1+2,44)
      IF SUBSTR(DWORK,POS1+1,1) = 'C' THEN DTYPE = 'CLUSTER '
      ELSE IF SUBSTR(DWORK,POS1+1,1) = 'D' THEN DTYPE = 'DATA    '
      ELSE IF SUBSTR(DWORK,POS1+1,1) = 'I' THEN DTYPE = 'INDEX   '
      ELSE IF SUBSTR(DWORK,POS1+1,1) = 'A' THEN DTYPE = 'NONVSAM '
      ELSE IF SUBSTR(DWORK,POS1+1,1) = 'H' THEN DTYPE = 'GDS     '
      ELSE IF SUBSTR(DWORK,POS1+1,1) = 'B' THEN DTYPE = 'GDG     '
      ELSE IF SUBSTR(DWORK,POS1+1,1) = 'R' THEN DTYPE = 'PATH    '
      ELSE IF SUBSTR(DWORK,POS1+1,1) = 'G' THEN DTYPE = 'AIX     '
      ELSE IF SUBSTR(DWORK,POS1+1,1) = 'X' THEN DTYPE = 'ALIAS   '
      ELSE IF SUBSTR(DWORK,POS1+1,1) = 'U' THEN DTYPE = 'UCAT    '
      ELSE DTYPE = '        '
      POS1 = POS1 + 46
      CREDAT = C2X(SUBSTR(DWORK,POS1+8,4))
      IF SUBSTR(CREDAT,7,2) = 0
        THEN ADDCENT = 1900000
        ELSE ADDCENT = 2000000
      CREDAY = INSERT('/',SUBSTR(CREDAT,1,5)+ADDCENT,4)
      IF DNAMET <> DNAME THEN
      DO
        LISTVOL1 = VOLSER.1
        SAY  COPIES(' ',8) DTYPE DNAME CREDAY
        DNAMET=DNAME
      END
      POS1 = POS1 + C2D(SUBSTR(DWORK,POS1,2))
    END
  END
END
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am


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