MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

comparing two files and writing the 2nd file records to outp

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
mfsrini
Beginner


Joined: 10 Aug 2006
Posts: 11
Topics: 6

PostPosted: Fri Oct 07, 2011 9:13 am    Post subject: comparing two files and writing the 2nd file records to outp Reply with quote

Hi,

My requirement is as follows:

I need to compare 2 files (eg: yesterday file, today file) and I need to write the differences to 3rd file

constraints:

1) If there is difference b/w first file record fields with second file record fields, then write second file record to output file.

2) first file has record but second file doesn't, then we need to ignore that record.

3) second file has record but first file doesn't, then we need to write that record from second file.

4) One of the field is timestamp in both files (position 10). While comparing, we should ignore this field.

Please let me know Is it possible to execute through JCL sort utilities.

Regards,
Srini
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Oct 07, 2011 10:39 am    Post subject: Reply with quote

mfsrini,


1. What is the LRECL and RECFM of yesterday's file?
2. What is the LRECL and RECFM of todays's file?
3. Post the cobol layout of both files and point out the key matching fields from both files.
4. Post a sample input of the 2 files and the desired output.
5. Run the following job and post the complete sysout from the job which will help us the determine the level of DFSORT you have.

Code:

//STEP0100 EXEC PGM=SORT   
//SYSOUT   DD SYSOUT=*     
//SORTIN   DD *           
A                         
//SORTOUT  DD SYSOUT=*     
//SYSIN    DD *           
  SORT FIELDS=COPY         
//*

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group