the Create-Date of a GDG file?
I have routines that create MONTHLY files based on actually reading the file contents by using the sort/copy & include statements to filter by date, ex:
SORT FIELDS=COPY
INCLUDE COND=(73,3,CH,EQ,C'DEC',76,4,CH,EQ,'2007')
BUT THIS REQUIRES READING ALL GDGs in order to build a given monthly file. . .
Is there a utility or some "JCL trick" that will allow me to read the System Info of a GDG member in order to pull the file in for inclusion/sorting or skipping to the next gdg if the file shouldn't be included? This would save a ton of processing time by not having to read every record in every gdg member in order to build a current monthly file for that gdg family.
An ISPF command like DSL on a filename & "S" by a given file will net you the Info I'm speaking of trying to get to (LRECL/LBLK/Create-Date, etc)
Thanks for shedding a little light into my dim-dim world!!!
Is there an IEB utility or some trick in JCL to examine. . .
Moderators: Frank Yaeger, DikDude, Moderator Group
Is there an IEB utility or some trick in JCL to examine. . .
"Charter member of Vast-Right-Wing-Conspiracy"
you could try something like...
or write a small rexx to do the job...
maybe your 'systemers' could give you a better approach...
Code: Select all
//*==================================================
//LISTCAT EXEC PGM=IDCAMS,COND=(0,LT)
//SYSIN DD *
LISTCAT ENT(YOURGDG.HERE) ALL
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
maybe your 'systemers' could give you a better approach...
seagreg,
What ever you have asked can be acheived using the REXX, i mean validatuing the creat date and then sorting based on your condition. But may take some time
for coming up with code...but i am sure it can be done.
Well if you are really looking for code and if its fine in REXX let us know ..we will try to getback to you.
acevedo -> LISTCAST will just give you info reg the all gen's and limit
and other parameters like AIX, INDEX, PATH ENTRIES PROCESSED,
but getting the file creat datea and procesing can be done using rexx.
Thanks,
Veera.
What ever you have asked can be acheived using the REXX, i mean validatuing the creat date and then sorting based on your condition. But may take some time
for coming up with code...but i am sure it can be done.
Well if you are really looking for code and if its fine in REXX let us know ..we will try to getback to you.
acevedo -> LISTCAST will just give you info reg the all gen's and limit
and other parameters like AIX, INDEX, PATH ENTRIES PROCESSED,
but getting the file creat datea and procesing can be done using rexx.
Thanks,
Veera.
acevedo ->
Yes i accept what you said is correct. Using REXX it can be done.My Intention of quoting reg the LISTCAT was i taught there is a way to
hadnle using it nothing else
Well seagreg,
Here is the code for acheving what you have asked for using REXX.
Before that few points to be noted , as i made few assimptions and coded
the REXX routine.
1. I took curr-year and curr-date as refrence.
2. When ever the file-year and file-date are less than the curr-year and
curr-date i have displayed CALL SORT ROUTINE FOR THE FILE else the
file will be skipped.
3. SO what ever process you want to do after selecting the file can be
done using a function/routine where the display CALL SORT ROUTINE
FOR THE FILE is presnet.
Do get back to us if in case of any queries.
Thanks,
Veera.
Yes i accept what you said is correct. Using REXX it can be done.My Intention of quoting reg the LISTCAT was i taught there is a way to
hadnle using it nothing else
Well seagreg,
Here is the code for acheving what you have asked for using REXX.
Before that few points to be noted , as i made few assimptions and coded
the REXX routine.
1. I took curr-year and curr-date as refrence.
2. When ever the file-year and file-date are less than the curr-year and
curr-date i have displayed CALL SORT ROUTINE FOR THE FILE else the
file will be skipped.
3. SO what ever process you want to do after selecting the file can be
done using a function/routine where the display CALL SORT ROUTINE
FOR THE FILE is presnet.
Do get back to us if in case of any queries.
Code: Select all
/**************************REXX***************************************/
/* THIS ROUTINE WILL CHECK THE FILE CREATION DATE AND COMPARES */
/* WITH THE CURRENT DATE AND THEN VALIDATES WHETHER THE FILE */
/* HAS TO BE PICKED FOR THE FURTHER PROCESSING. */
/*********************************************************************/
GDGBASE='ABCD.TEST.LIST.*' -> HERE I/P THE GDG BASE FILE
FCCYYDDD = 0
FILEYEAR = 0
FILEDATE = 0
CURRDATE = 0
CURRYEAR = 0
DSN = ' '
FNAME = ' '
ADDRESS ISPEXEC "LMDINIT LISTID(LISTID) LEVEL("GDGBASE")"
ADDRESS ISPEXEC "LMDLIST LISTID("LISTID") OPTION(LIST) DATASET(DSN)"
RC_LMDLIST = RC
DO WHILE(RC_LMDLIST = 0)
SAY 'DSN : ' DSN
FNAME = DSN
CURRDATE = DATE('DAYS')
CURRYEAR = SUBSTR(DATE('STANDARD'),1,4)
DSNINFO = LISTDSI("'"FNAME"'")
DO
IF DSNINFO == 0 THEN
SAY ' DATASET CREATED DATE ' SYSCREATE
ELSE
NOP
END
FCCYYDDD = SYSCREATE
FILEYEAR = SUBSTR(FCCYYDDD, 1,4)
FILEDATE = SUBSTR(FCCYYDDD, 6,3)
SAY ' DATASET CREATED YEAR ' FILEYEAR
SAY ' DATASER CREATED DATE ' FILEDATE
SAY ' CURENT YEAR ' CURRYEAR
SAY ' CURRENT DATE ' CURRDATE
IF FILEYEAR <= CURRYEAR & FILEDATE <= CURRDATE THEN
SAY ' CALL SORT ROUTINE FOR THE FILE '
ELSE
SAY ' CALL SORT ROUTINE SKIPPED '
ADDRESS ISPEXEC "LMDLIST LISTID("LISTID") OPTION(LIST) DATASET(DSN)"
RC_LMDLIST = RC
END
ADDRESS ISPEXEC "LMDFREE LISTID("LISTID")"
Veera.
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page