View previous topic :: View next topic
|
Author |
Message |
antonrino.b
New User
Joined: 10 Jan 2006 Posts: 76 Location: Germany
|
|
|
|
Any ISPF Service which I can use to get the creation date of a GDG File? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
At DSLIST use S for info. |
|
Back to top |
|
|
antonrino.b
New User
Joined: 10 Jan 2006 Posts: 76 Location: Germany
|
|
|
|
I need to get the creation date through REXX. Is there any ISPF service to get that? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Well, mentioning that in the subject and/or posting on the rexx list might have helped.
You might pm superk and ask him/her to help...... |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Nevermind, I see that you have your answer .....
Quote: |
Yes, DSINFO. Thereafter it's in zdscdate |
|
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
The ISPF Service that I believe would be of use is the LMDLIST Service.
If STATS(YES) is specified, the following variables are returned to the variable pool:
ZDLVOL
Volume serial.
ZDLDEV
Device type.
ZDLDSORG
Data set organization.
ZDLRECFM
Record format.
ZDLLRECL
Logical record length.
ZDLBLKSZ
Block size.
ZDLSIZE
Data set size in tracks.
ZDLSIZEX
Data set size in tracks, long format (12 bytes).
ZDLUSED
Percentage of used tracks or pages (PDSE).
ZDLEXT
Number of extents used.
ZDLEXTX
Number of extents used, long format (5 bytes).
ZDLCDATE
Creation date.
ZDLEDATE
Expiration date.
ZDLRDATE
Date last referenced.
ZDLMIGR
Whether the data set is migrated (YES or NO) based on the value of the VOLUME_OF_MIGRATED_DATA_SETS keyword in the ISPF configuration table. If the volume name of the data set matches the value of VOLUME_OF_MIGRATED_DATA_SETS, ZDLMIGR is set to YES, otherwise it is set to NO.
ZDLDSNTP
Dsname type (PDS, LIBRARY, or ' ').
ZDLSPACU
Space units.
ZUDMVOL
Whether the data set is multivolume (Y) or not (N). |
|
Back to top |
|
|
antonrino.b
New User
Joined: 10 Jan 2006 Posts: 76 Location: Germany
|
|
|
|
Thanks Superk. LMDLIST works fine. |
|
Back to top |
|
|
prafull
New User
Joined: 08 Dec 2006 Posts: 48
|
|
|
|
Hi
one doubt if these commands work for TAPE files too...?
Means if yes then, how can I implement it?
Please help out... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
Back to top |
|
|
prafull
New User
Joined: 08 Dec 2006 Posts: 48
|
|
|
|
I had already tried out for TAPE datasets,
It doesn't work.
So I wanted to know if any other option avaliable. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Try this, it's something I've posted before somewhere ...........
Batch REXX, you need a CATIN DD statement with the HLQ.** that you want to find out about.
Code: |
/* REXX ** CREATION DATE OF GDG DATASET */
SIGNAL ON SYNTAX NAME ERR
"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 = 'H '
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)
POS1 = POS1 + 46
CREDAT = C2X(SUBSTR(DWORK,POS1+8,4))
IF CREDAT = 'FFFFFFFF' ! CREDAT = '00000000' THEN ITERATE
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
SAY DNAME CREDAY
DNAMET=DNAME
END
POS1 = POS1 + C2D(SUBSTR(DWORK,POS1,2))
END
END
END
EXIT
/** STANDARD REXX ERROR ROUTINE */
ERR:
SIGNAL OFF SYNTAX
DELSTACK
SAY "ERROR ROUTINE OUTPUT STARTING"
SAY " "
SAY RIGHT(SIGL,6) ">>>" SOURCELINE(SIGL)
SAY " "
TRACE I
INTERPRET SOURCELINE(SIGL)
|
|
|
Back to top |
|
|
Apeksha
New User
Joined: 21 May 2008 Posts: 37 Location: Mumbai
|
|
|
|
Hi
I am trying to run this code but seems not working correctly... can you please help out? I am new to REXX
I didnt understand how this DWORK is getting calculated and what should be the expected value?
Thanks,
Apeksha. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
does not work is a bit generic to deserve any consideration for help
certainly the script did not wash your dishes or mop the floor
so does not work applies to such tasks
the advice is hire a maid
dwork is built as a storage area to be passed to IGGCSI
Code: |
WORKLEN = 4096
DWORK = '00001000'X !! COPIES('00'X,WORKLEN-4) |
dwork is built as a storage areaof length 4096
initialized to 4 hex bites concatenated to 4092 bytes of hex zeroes
check the IGGCSI docs |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
And it worked before I posted it |
|
Back to top |
|
|
|