View previous topic :: View next topic
|
Author |
Message |
ksk
Active User
Joined: 08 Jun 2006 Posts: 355 Location: New York
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
ksk
Active User
Joined: 08 Jun 2006 Posts: 355 Location: New York
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Good to hear it is working better - thank you for telling us what you did to improve the runtime
d |
|
Back to top |
|
|
|