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

Performance Improvement in Comparing 2 Files


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Wed Jun 25, 2008 10:27 am
Reply with quote

Hi,

We have 2 files with 9.5 Million and 8.5 Million records. Key field in both the files is composite of "Account Number (position 1-16) and Record Type (21-23)". One account number can have either of 2 transaction types '01' or '15'. So one account number can have one record or 2 records.

We have to compare these 2 files. If match found, we have to set FLAG 'M' and if not match found, set FLAG 'U' in the output file. Output file should contain only single record for an account number. To make this, we will extract 3 fields from transaction '15' type record and 1 field from '01' transaction type record and make it single record file for an account number.

For ex:

With '01' transaction type layout the records would be displayed as below.

Code:

ACCOUNT-NUMBER   RECORD-TYPE   INDICATOR
16/AN      2/AN      1/AN
(1-16)      (21-22)      (414-414)
********************************* TOP OF DATA ***
0010000000000000        01      Y
0010000000000000        15
0020000000000000        01      N
0020000000000000        15
0030000000000000       01      Z


The same above file with transaction type '15' looks like below.

Code:

ACCOUNT-NUMBER      RECORD-TYPE      STATUS       REASON CODE   CHANGE-DATE      
16/AN         2/AN         1/AN      1/AN      6/AN
(1-16)         (21-22)         (108-108)   (198-198)   (207-212)
********************************* TOP OF DATA ***
0010000000000000        01               
0010000000000000        15         H      X      080624
0020000000000000        01         
0020000000000000        15         B      Y      080524
0040000000000000   15         G      N      070530



Please observe that first data doesn't have values for '15' record type and 2nd data doesn't have for '01' record type as

layouts are different.

Output file will have records as shown below.

Code:

ACCOUNT-NUMBER      STATUS       REASON CODE      CHANGE-DATE      INDICATOR      
16/AN         1/AN      1/AN         6/AN         1/AN      1/AN
(1-16)         (235-235)   (236-236)      (237-242)      (243-243)   (244-244)
********************************* TOP OF DATA ***
0010000000000000   H      X         080624         Y      
0020000000000000   B      Y         080524         N
0030000000000000   SPACE      SPACE         DEFAULT-DATE      Z
0040000000000000   G      N         070530         SPACE


In the input file, account numbers have 2 records each but output contains only one record. If one of the record type doesn't

exist, date of that particular type would be filled with Default-date and other fileds with blanks.


Presently we are doing this using Ezetreive and it is taking 2 hours clock time for the whole process. Can we do this using

DFSORT to improve the performance? If not is there any other way to reduce the time?

RECL=1019,RECFM=VB for input files
RECL=244,RECFM=FB for output file

KSK
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Jul 27, 2008 9:22 am
Reply with quote

Hello,

Do you have a resolution for this?

If you simply copy the 2 files, how long does the copy job take?

Is the easytrieve code compiled or is the job run from the source?
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Mon Jul 28, 2008 9:38 am
Reply with quote

Dick,

Instead of doing all the process in single Eazytreive program, we have divided it into 2 programs as below and it's taking now less time.

1. In the first step, Using Ezetreive program, extracted both '01' and '15' record type fields into one record along with acount number.

2. In the second step, we have compared two files.

Regards,
KSK
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jul 28, 2008 10:03 am
Reply with quote

Good to hear it is working better - thank you for telling us what you did to improve the runtime icon_smile.gif

d
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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top