Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SYNCSORT Compare date in 2 files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sivatechdrive

Active User


Joined: 17 Oct 2004
Posts: 190
Location: hyderabad

PostPosted: Sat Jan 10, 2009 4:23 pm    Post subject: SYNCSORT Compare date in 2 files
Reply with quote

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
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2285
Location: @my desk

PostPosted: Sat Jan 10, 2009 8:58 pm    Post subject:
Reply with quote

Prasad,

Post a few sample records from both the files. What about the input/output file attributes-RECFM/LRECL?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Sat Jan 10, 2009 9:25 pm    Post subject: Re: SYNCSORT Compare date in 2 files
Reply with quote

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
View user's profile Send private message
sivatechdrive

Active User


Joined: 17 Oct 2004
Posts: 190
Location: hyderabad

PostPosted: Mon Jan 12, 2009 8:09 am    Post subject:
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2285
Location: @my desk

PostPosted: Mon Jan 12, 2009 10:35 am    Post subject:
Reply with quote

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
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 FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Validate the Date girishb2 DFSORT/ICETOOL 9 Tue Sep 19, 2017 1:12 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us