With REXX, can I get the last modification of a DSN ( basically
a flat file format only which could be a GDG or normal flat file)?
Also can one identify if a dsn is open for read or update???
Thanks.
Wags ;)
David R. Wagner
Senior Programmer Analyst
FedEx Services
1.719.484.2097 Tel
1.719.484.2419 Fax
1.408.623.5963 Cell
http://Fedex.com/us
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX
And I would probably use SMF records to do this rather than REXX.
Lizette
Sorry for the ignorance..
This e-mail (and any attachments) may contain information that is confidential and/or protected by law. Any review, use, distribution or disclosure to anyone other than the intended recipient(s) is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and delete all copies of this message.
000001 /* rexx */
000002 call status 'YOUR FIRST.SEQ.DSN'
000003 call status 'YOUR.SECOND.SEQ.DSN'
000004 call status 'YOUR FIRST.GDG.G000V00'
000005 call status 'YOUR.SECOND.GDG.G000V00'
000006 call status 'SOME.OTHER.DNS'
000007 exit 0
000008 status: arg dsn .
000009 if dsn = '' then
000010 do
000011 say 'DSN missing, RC=12'
000012 exit 12
000013 end
000014 dsn = "'"strip(dsn,"B","'")"'"
000015 qname = 'SYSDSN'
000016 asname = '*'
000017 address ISPEXEC
000018 "CONTROL ERRORS RETURN"
000019 "DSINFO DATASET("dsn")"
000020 if RC <> 0 then say dsn 'not found, RC='RC
000021 dsn = strip(dsn,"B","'")
000022 "QUERYENQ TABLE(QUERYENQ) QNAME(QNAME) RNAME(DSN)",
000023 "XSYS REQ("asname")"
000024 ENQRC = RC
000025 select
000026 when ENQRC <= 2 then
000027 do
000028 "TBSKIP QUERYENQ"
000029 "TBGET QUERYENQ"
000030 end
000031 when ENQRC = 8 then
000032 do
000033 zendisp = 'NOTINUSE'
000034 zenjob = 'NOHOLDER'
000035 end
000036 otherwise say 'QUERYENQ error RC='ENQRC
000037 end
000038 say left(dsn,44) zdsrdate left(zendisp,8) zenjob
000039 "TBEND QUERYENQ"
000040 return
In a message dated 7/22/2010 9:04:23 A.M. US Mountain Standard Time,
Will let the list know how it goes..
Again, thanks for the help and insight..
/* REXX */
ADDRESS ISPEXEC "DSINFO DATASET("ARG(1)")"
SAY ZDSRDATE
--> From: Wagner, David
Thanks, but it will take me a while to digest and try it out.
Will let the list know how it goes..
Again, thanks for the help and insight..
-->From: Robert Zenuk
Here is a quick and dirty way to get it with REXX and ISPF services...
000001 /* rexx */
000002 call status 'YOUR FIRST.SEQ.DSN'
000003 call status 'YOUR.SECOND.SEQ.DSN'
000004 call status 'YOUR FIRST.GDG.G000V00'
000005 call status 'YOUR.SECOND.GDG.G000V00'
000006 call status 'SOME.OTHER.DNS'
000007 exit 0
000008 status: arg dsn .
000009 if dsn = '' then
000010 do
000011 say 'DSN missing, RC=12'
000012 exit 12
000013 end
000014 dsn = "'"strip(dsn,"B","'")"'"
000015 qname = 'SYSDSN'
000016 asname = '*'
000017 address ISPEXEC
000018 "CONTROL ERRORS RETURN"
000019 "DSINFO DATASET("dsn")"
000020 if RC <> 0 then say dsn 'not found, RC='RC
000021 dsn = strip(dsn,"B","'")
000022 "QUERYENQ TABLE(QUERYENQ) QNAME(QNAME) NAME(DSN)",
000023 "XSYS REQ("asname")"
000024 ENQRC = RC
000025 select
000026 when ENQRC <= 2 then
000027 do
000028 "TBSKIP QUERYENQ"
000029 "TBGET QUERYENQ"
000030 end
000031 when ENQRC = 8 then
000032 do
000033 zendisp = 'NOTINUSE'
000034 zenjob = 'NOHOLDER'
000035 end
000036 otherwise say 'QUERYENQ error RC='ENQRC
000037 end
000038 say left(dsn,44) zdsrdate left(zendisp,8) zenjob
000039 "TBEND QUERYENQ"
000040 return
----------------------------------------------------------------------
Rob
In a message dated 7/22/2010 10:37:23 A.M. US Mountain Standard Time,
david....@FEDEX.COM writes:
>-----Original Message-----
>From: TSO REXX Discussion List [mailto:TSO-...@vm.marist.edu] On Behalf
Of
>Robert Zenuk
>Sent: Thursday, July 22, 2010 11:25
>To: TSO-...@vm.marist.edu
>Subject: Re: [TSO-REXX] With REXX, is one able to pull last modification
>date (date/time) on a DSN?
>
>Here is a quick and dirty way to get it with REXX and ISPF services...
>
>000001 /* rexx */
>000002 call status 'YOUR FIRST.SEQ.DSN'
>000003 call status 'YOUR.SECOND.SEQ.DSN'
>000004 call status 'YOUR FIRST.GDG.G000V00'
>000005 call status 'YOUR.SECOND.GDG.G000V00'
>000006 call status 'SOME.OTHER.DNS'
>000007 exit 0
>000008 status: arg dsn .
>000009 if dsn = '' then
>000010 do
>000011 say 'DSN missing, RC=12'
>000012 exit 12
>000013 end
>000014 dsn = "'"strip(dsn,"B","'")"'"
>000015 qname = 'SYSDSN'
>000016 asname = '*'
>000017 address ISPEXEC
>000018 "CONTROL ERRORS RETURN"
>000019 "DSINFO DATASET("dsn")"
>000020 if RC <> 0 then say dsn 'not found, RC='RC
>000021 dsn = strip(dsn,"B","'")
>000022 "QUERYENQ TABLE(QUERYENQ) QNAME(QNAME) RNAME(DSN)",
>000023 "XSYS REQ("asname")"
>000024 ENQRC = RC
>000025 select
>000026 when ENQRC <= 2 then
>000027 do
>000028 "TBSKIP QUERYENQ"
>000029 "TBGET QUERYENQ"
>000030 end
>000031 when ENQRC = 8 then
>000032 do
>000033 zendisp = 'NOTINUSE'
>000034 zenjob = 'NOHOLDER'
>000035 end
>000036 otherwise say 'QUERYENQ error RC='ENQRC
>000037 end
>000038 say left(dsn,44) zdsrdate left(zendisp,8) zenjob
>000039 "TBEND QUERYENQ"
>000040 return
>
Thanks, but it will take me a while to digest and try it out.
Will let the list know how it goes..
Again, thanks for the help and insight..
Wags ;)
>>>----------------------------------------------------------------------
>>>For TSO-REXX subscribe / signoff / archive access instructions,
>>>send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX
>>
>>----------------------------------------------------------------------
>>For TSO-REXX subscribe / signoff / archive access instructions,
>>send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX
>
>This e-mail (and any attachments) may contain information that is
>confidential and/or protected by law. Any review, use, distribution or
>disclosure
>to anyone other than the intended recipient(s) is strictly prohibited. If
>you are not the intended recipient, please contact the sender by reply
>email
>and delete all copies of this message.
>
>
>
Help me understand what I am missing.
Looking at SMF 14/15 (if you can afford to collect those and sift through
them), it looks like the DCB/DEB section contains the SMFDEBFL field that
indicates whether the dataset was modified. So, there might be a way to
combine what I provided already along with SMF to get a report if you know how
far back you need to go with the SMF data...
Since the OP was from Fedex, I would suspect your DASD Management group can
help you with a request like this since knowing whether your SMS
environment forces timely backups (each night) after changes is key to knowing when
a change occurred. At that point, scraping the results of an HLIST BCDS
would fill in the last change date to within 24 hours.
If someone has a better approach, please let me know.
Rob
In a message dated 7/22/2010 3:47:38 P.M. US Mountain Standard Time,