Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Compare each GDG Generations to other GDG generations

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Compare each GDG Generations to other GDG generations
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: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 28, 2016 2:01 pm    Post subject:
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    Post subject:
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: 1712
Location: UK

PostPosted: Tue Jun 28, 2016 2:41 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 28, 2016 3:50 pm    Post subject:
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    Post subject:
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: 1712
Location: UK

PostPosted: Wed Jun 29, 2016 3:29 pm    Post subject:
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    Post subject:
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: 1712
Location: UK

PostPosted: Fri Jul 01, 2016 12:00 am    Post subject:
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    Post subject:
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: 1712
Location: UK

PostPosted: Fri Jul 01, 2016 8:02 pm    Post subject:
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    Post subject:
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

New User


Joined: 01 Sep 2015
Posts: 94
Location: Switzerland

PostPosted: Mon Jul 04, 2016 5:13 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts COMPARE command sivatechdrive TSO/ISPF 7 Fri Sep 16, 2016 4:31 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am
No new posts 2 vsam file compare and update a fiel... ABINAYATHULASI DFSORT/ICETOOL 6 Sun May 29, 2016 11:15 am
No new posts Compare 2 files & write Indicator... nagendrapgupta SYNCSORT 5 Sun May 15, 2016 10:42 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us