IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Compare each GDG Generations to other GDG generations


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ayyappa1

New User


Joined: 25 Jun 2016
Posts: 7
Location: India

PostPosted: Tue Jun 28, 2016 1:48 pm
Reply with quote

Hello All,

I receive multiple generations to my GDG dataset (say TESTZZ2.ACTUAL.TEST this is a GDG Base). The number of files received may vary day to day. It can be either 0 files or 3 files or files or 2 files, etc. No specified pattern/rule for no of files.

I have a Master dataset with 30 Generations (say TESTZZ2.MASTER.DATA - GDG Base). Now my requirement is I need to compare each generation of TESTZZ2.ACTUAL.TEST with each generation of TESTZZ2.MASTER.DATA. If there is exact match of the file content, TESTZZ2.ACTUAL.TEST generation file has to be deleted. If not matched, should be left as it is.

Any suggestions on how to achieve it would be helpful.

Note : After processing the TESTZZ2.ACTUAL.TEST by other Job(say DAILPROC), an EMPTY file with next generation number will be created. Say for example, I have received 5 files today. After processing by DAILPROC, an empty generation TESTZZ2.ACTUAL.TEST.G0006V00 will be created.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jun 28, 2016 2:01 pm
Reply with quote

What on earth is the logic behind this ?

Are you trying to find out if all generations have been processed ?
Is each generation an accumulation of data until a NULL is created after processing. Or is it an individual entity.

You really do need to explain the situation in far greater detail than you have.
Back to top
View user's profile Send private message
Ayyappa1

New User


Joined: 25 Jun 2016
Posts: 7
Location: India

PostPosted: Tue Jun 28, 2016 2:15 pm
Reply with quote

expat wrote:
What on earth is the logic behind this ?

Are you trying to find out if all generations have been processed ?
Is each generation an accumulation of data until a NULL is created after processing. Or is it an individual entity.

You really do need to explain the situation in far greater detail than you have.


To explain in brief, the files are placed by Vendor. Due to some issue on Vendor end, they are placing duplicates. So I am working on to remove duplicates and process only actuals. Hope this clarifies.

Processing will be done on the actuals. As of now, this is being manually done. Due to excess of files, I am trying to automate it. Need some suggestions very seriously.


Just to add further information. After processing, all the generations will be deleted and an empty generation will be created with next generation number.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Tue Jun 28, 2016 2:41 pm
Reply with quote

Do the data sets (nthey are not 'files') have headers that identify them uniquely? If so simply record them as they are read by DAILPROC and skip them if the header has already been processed.
Back to top
View user's profile Send private message
Ayyappa1

New User


Joined: 25 Jun 2016
Posts: 7
Location: India

PostPosted: Tue Jun 28, 2016 2:51 pm
Reply with quote

Nic Clouston wrote:
Do the data sets (nthey are not 'files') have headers that identify them uniquely? If so simply record them as they are read by DAILPROC and skip them if the header has already been processed.




Data doesn't have any header or trailer information icon_sad.gif icon_sad.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jun 28, 2016 3:50 pm
Reply with quote

So basically the application DAILPROC has been badly designed and does not contain the logic to deal with duplicate records.

Have you considered doing a sort on all of the files to be used as input and then removing any duplicate records ?

Simple but effective icon_eek.gif
Back to top
View user's profile Send private message
Ayyappa1

New User


Joined: 25 Jun 2016
Posts: 7
Location: India

PostPosted: Wed Jun 29, 2016 11:59 am
Reply with quote

DAILPROC has a different logic. It copies the file to different GDG's based on content available in it. So Sorting and verifying will not work as expected.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Jun 29, 2016 3:29 pm
Reply with quote

Do a LISTC of the daily generations and interpret it to create the JCL required to do the comparisons and reporting.
Back to top
View user's profile Send private message
Ayyappa1

New User


Joined: 25 Jun 2016
Posts: 7
Location: India

PostPosted: Thu Jun 30, 2016 10:02 am
Reply with quote

Nic Clouston wrote:
Do a LISTC of the daily generations and interpret it to create the JCL required to do the comparisons and reporting.



well. I didn't get that, can you elaborate a bit more in detail? Appreciate your help on this.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Jul 01, 2016 12:00 am
Reply with quote

Use IDCAMS to generate a list of all the data sets associated with the ACTUAL.TEST base. Process that list to extract the data set names and generate the required JCL for each comparison. If you have 5 generations of ACTUAL.TEST and you have to compare each one against each data set of MASTER.DATA then you will have to generate 150 compares. By suitable use of condition codes you could probably bypass further compares of the current ACTUAL.TEST generation to avoid excessive execution times.
Back to top
View user's profile Send private message
Ayyappa1

New User


Joined: 25 Jun 2016
Posts: 7
Location: India

PostPosted: Fri Jul 01, 2016 9:32 am
Reply with quote

Nic Clouston wrote:
Use IDCAMS to generate a list of all the data sets associated with the ACTUAL.TEST base. Process that list to extract the data set names and generate the required JCL for each comparison. If you have 5 generations of ACTUAL.TEST and you have to compare each one against each data set of MASTER.DATA then you will have to generate 150 compares. By suitable use of condition codes you could probably bypass further compares of the current ACTUAL.TEST generation to avoid excessive execution times.



Thats a good one. But I have one more issue here. I don't have the standard limit(constant) number of files received daily. It may be 20 generations today, next day it can be 5, next day it can be any number. So the problem is identifying no.of generations available in runtime(dynamically).

Any suggestions for this situation?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Jul 01, 2016 8:02 pm
Reply with quote

Does your daily generation start at G0001V00 or does it continue from the empty one created by DAILPROC? If the former then there is no problem - you generate for each data set until you have processed them all. If the latter, you can either interrogate the date created field of the IDCAMS listing and compare to the run date or you can keep a record of the last generation processed (compared).
Back to top
View user's profile Send private message
Ayyappa1

New User


Joined: 25 Jun 2016
Posts: 7
Location: India

PostPosted: Mon Jul 04, 2016 11:53 am
Reply with quote

Nic Clouston wrote:
Does your daily generation start at G0001V00 or does it continue from the empty one created by DAILPROC? If the former then there is no problem - you generate for each data set until you have processed them all. If the latter, you can either interrogate the date created field of the IDCAMS listing and compare to the run date or you can keep a record of the last generation processed (compared).



It doesn't start from G0001V00. It starts from Empty generation created by DAILPROC.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Mon Jul 04, 2016 5:13 pm
Reply with quote

So you will need to do a LISTCAT LVL(xxx) and post-process the output to get the actual names.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Compare two files with a key and writ... SYNCSORT 3
No new posts Compare latest 2 rows of a table usin... DB2 1
No new posts How to compare two rows of same table DB2 11
This topic is locked: you cannot edit posts or make replies. Compare files with duplicates in one ... DFSORT/ICETOOL 11
Search our Forums:

Back to Top