View previous topic :: View next topic
|
Author |
Message |
sivatechdrive
Active User
Joined: 17 Oct 2004 Posts: 191 Location: hyderabad
|
|
|
|
HI All,
I have a reqirement and the details are given below.plz help me on how to proceed
FILEA will have header and detail records (header also has date)
FileB also has header and detail records (header also has date)
Need to compare the dates in both the files (header record) and write the maximum to the OUtput File.
Thanks
Prasad |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Prasad,
Post a few sample records from both the files. What about the input/output file attributes-RECFM/LRECL? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
sivatechdrive wrote: |
Need to compare the dates in both the files (header record) and write the maximum to the OUtput File. |
What does "Maximum" refer to in relation of date(s) ? |
|
Back to top |
|
|
sivatechdrive
Active User
Joined: 17 Oct 2004 Posts: 191 Location: hyderabad
|
|
|
|
HI.,
The input files are of Fixed format and LRECL = 110.
The Header and data records in file1
00000020081031
001 ABC
003 DEF
007 IJK
The Header record in file2
00000020081231
002 LMN
005 OPQ
008 RST
The Expected Output file
(the date in the header should be maximum among the 2 input files
i.e 20081231 (input file2) is > 20081031 (input file1) hence file2 header is choosen )
00000020081231
001 ABC
002 LMN
003 DEF
005 OPQ
007 IJK
008 RST
Thanks
Prasad |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Prasad,
Can the header be identified by the one starting with 5 '0's?
Do you have unique keys ( position 1,3 ? ) in both the files? |
|
Back to top |
|
|
|