Get the last reference date of migrated dataset.

Virtual Storage Access method - ESDS, KSDS, RRDS & LDS. Basic direct access method, Basic sequential -, Queued sequential -, Basic partitioned -, Indexed sequential -, Object - access method.
Post Reply
Biden
Registered Member
Posts: 21
Joined: Thu Jul 25, 2013 12:19 pm

Get the last reference date of migrated dataset.

Post by Biden »

Hi,

Is there any way using which without recalling a migrated data-set we can get the "last reference date" of a migrated dataset?

I tried using LISTCAT, using this I'm getting only the Creation & Expiration dates.

I need to know if this can be done using REXX as well, but not sure if I should make a second topic for this? Please advise.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1900
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Get the last reference date of migrated dataset.

Post by Robert Sample »

DCOLLECT output for migrated data sets includes the last reference date in the M and B records. However, processing DCOLLECT output is easiest done using SAS or another reporting tool as the format for the output is not easy to understand, and I'm not sure if REXX is capable of processing it.
Biden
Registered Member
Posts: 21
Joined: Thu Jul 25, 2013 12:19 pm

Re: Get the last reference date of migrated dataset.

Post by Biden »

Thanks Robert. Can DCOLLECT output be read with REXX? I'll try that.
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 837
Joined: Wed Sep 11, 2013 3:57 pm

Re: Get the last reference date of migrated dataset.

Post by enrico-sorichetti »

certainly YES
the only thing that is boring is to write FOR the first time the record parsing
done already a few times

I' ll look around to see if I can find some snippets in my soapbox

not my preferred coding style but You can get a grasp of it here
http://cbttape.org/ftp/cbt/CBT206.zip

here is the content of it

Code: Select all

DCOLLECT REXX Routines

Linnea Nichols
Fairfax County Govt
12000 Govt Cntr Pkwy
Fairfax, VA 22035
703/324-2708

This diskette contains the following files:

README.TXT    You are reading it

LNICHO.REX    Contains all REXX programs. Needs to be uploaded to a PS
file (LRECL=80) and then unloaded to a PDS using IEBUPDTE. Sample JCL to
unload is in REXUPD.JCL. You will need to allocate a DSORG=PS, LRECL=80,
RECFM=FB file on MVS to upload LNICHO.REX to. Then run the REXUPD job,
being sure to put in your own SYSIN and SYSUT2 data set names.  The
beginning of each program includes the following: Purpose of the REXX
program, Input files needed, Output files created, and Presort
requirements.

LNICHO.PAR     Contains routines that can be used to parse record types
D, M, C, V, T, and B as well as the standard header. Needs to be
uploaded to a PS (LRECL=80) file and then unloaded to a PDS using
IEBUPDTE. Sample JCL to unload it is in REXUPD.JCL. Use the same
procedure as documented for LNICHO.REX.

REXUPD.JCL     Sample JCL to create a PDS from the PS file you uploaded.

DCOLLECT.JCL   Sample JCL to run DCOLLECT collection, and create most of
the files used for input into the REXX programs.

If you need help, have suggestions, or just want to talk about
DCOLLECT, please feel free to call me at 703/324-2708 or contact
me via IBMMAIL at US5RNFRN or via INTERNET at US5RNFRN@ibmmail.com

The routines included are as follows:

/*                                                                    */
/* DASDVOLS                                                           */
/*    PURPOSE: READS TYPE V AND C RECORDS FOR VOLUME DETAIL REPORT    */
/*             AND STORAGE GROUP SUMMARY REPORT, READS TYPE T RECORDS */
/*             FOR DFHSM TAPE SUMMARY REPORT                          */
/*                                                                    */

/*                                                                    */
/* DATERFSM                                                           */
/*    PURPOSE: READS TYPE D AND M RECORDS AND PRODUCES REPORTS OF     */
/*             DAYS FROM LAST REFERENCE FOR THE FOLLOWING:            */
/*                L0, ML1 AND ML2 DATA COMBINED                       */
/*                ALL L0 DATA                                         */
/*                L0 SMS ONLY                                         */
/*                L0 NONSMS ONLY                                      */
/*                                                                    */
/*             A DETAIL REPORT IS PRODUCED THAT LISTS OUT ALL         */
/*             DSNS OLDER THAN 30 DAYS, NOT INCLUDING VSAM INDEXES,   */
/*             VTOCS, VVDS, PAGE AND TEMPORARY DSNS                   */
/*                                                                    */

/*                                                                    */
/* DB2                                                                */
/*    PURPOSE: READS TYPE D RECORDS AND LISTS OUT ALL DB2             */
/*             DSNS, INCLUDING VOLSER, CREATION DATE AND              */
/*             ALLOCATED KBYTES. TOTALS ALLOCATED KBYTES.             */
/*                                                                    */

/*                                                         */
/*  DCOLDREC                                               */
/*     PURPOSE: PRINTS OUT DETAIL INFORMATION FOR EVERY    */
/*              "D" AND "M" RECORD INPUT                   */
/*                                                         */

/*                                                                    */
/* DSORG                                                              */
/*    PURPOSE: BREAKOUT OF DATA SETS BY DSORG. DONE BY DSN COUNT AND  */
/*             BY KBYTES WITH PERCENTAGES                             */
/*                                                                    */

/*                                                                    */
/* ERRORS                                                             */
/*    PURPOSE: LISTS EVERY D RECORD THAT HAS ERROR BITS SET           */
/*                                                                    */

/*                                                                    */
/* EXPDT                                                              */
/*    PURPOSE: READS TYPE D AND M RECORDS FOR ALL DSNS THAT           */
/*             HAVE AN EXPDT > 0. (VSAM IS EXCLUDED SINCE IT          */
/*             ALWAYS HAS AN EXPDT = 1999365)                         */
/*                                                                    */

/*                                                                    */
/* HLQSUM                                                             */
/*    PURPOSE: READS DCOLLECT "D" "M" AND "B" RECORDS AND PRODUCES    */
/*             A REPORT SUMMARIZED BY HLQ OF BYTES ALLOCATED AT EACH  */
/*             LEVEL (L0, ML1, AND ML2) AS WELL AS BACKUP BYTES       */
/*                                                                    */
/*             PRODUCES A SUMMARY REPORT OF THE FOLLOWING:            */
/*                                                                    */
/*                TOTAL FROM VOLUME (V) RECORDS:                      */
/*                   TOTAL AVAILABLE KBYTES                           */
/*                   TOTAL ALLOCATED KBYTES                           */
/*                   SMS AVAILABLE KBYTES                             */
/*                   SMS ALLOCATED KBYTES                             */
/*                                                                    */
/*                TOTAL FROM D, M AND B RECORDS:                      */
/*                   L0+ML1+ML2 DSN COUNT                             */
/*                   TOTAL L0 + ML1 +ML2 ALLOCATED                    */
/*                   TOTAL BACKUP KBYTES                              */
/*                   L0 DSN COUNT                                     */
/*                   L0 ALLOCATED KBYTES                              */
/*                   L0 USED KBYTES                                   */
/*                   SMS DSN COUNT                                    */
/*                   SMS ALLOCATED KBYTES                             */
/*                   ML1 DSN COUNT                                    */
/*                   ML1 ALLOCATED KBYTES                             */
/*                   ML1 ORIGINAL KBYTES                              */
/*                   ML2 DSN COUNT                                    */
/*                   ML2 ALLOCATED KBYTES                             */
/*                   ML2 ORIGINAL KBYTES                              */
/*                                                                    */

/*                                                                    */
/* MULTIVOL                                                           */
/*    PURPOSE: READS TYPE D RECORDS AND LISTS OUT                     */
/*             THE VOLSER AND DSN FOR ALL RECORDS                     */
/*             THAT HAVE A VOLUME SEQUENCE NUMBER > 1                 */
/*                                                                    */

/*                                                                    */
/* NONSMS                                                             */
/*    PURPOSE: READS TYPE D RECORDS AND LISTS OUT                     */
/*             NON-SMS DSNS AND THE VOLSER THEY ARE ON.               */
/*             FOR EACH HLQ, LISTS OUT NUMBER OF DATASETS,            */
/*             SIZE IN KBYTES, SIZE FOR PRIME POOL (OURS IS           */
/*             DEFINED AS <102400 KBYTES), SIZE FOR LARGE POOL        */
/*             (ANY DSN >1024000 KBYTES), AND KYBTES NOT              */
/*             REFERENCED IN THE LAST 30 DAYS.                        */
/*                                                                    */


cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
Biden
Registered Member
Posts: 21
Joined: Thu Jul 25, 2013 12:19 pm

Re: Get the last reference date of migrated dataset.

Post by Biden »

Thanks Enrico, this is a great help and example. Really appreciate your help.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM.”