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 

Comparsion of Two Input Files

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


Joined: 29 Jul 2010
Posts: 41
Topics: 9

PostPosted: Thu Mar 27, 2014 10:39 pm    Post subject: Comparsion of Two Input Files Reply with quote

Hi All,

Could you please help me with below requirement.

Input:

I need to compare two input files. Both the Input files are in Packed decimal format and the Key for comparison is ENTIRE RECORD. We need compare with Packed decimal.

OutPut File should create as below:

1. Contains Unmatched records of both the Input Files.
2. Contains Unmatched records showing difference in particular record.
3. Contains records which are present in File1 but not in File2.
4. Contains records which are present in File2 but not in File1.
5. Contains Matched records of both files.
Back to top
View user's profile Send private message Send e-mail
puttu
Beginner


Joined: 29 Jul 2010
Posts: 41
Topics: 9

PostPosted: Fri Mar 28, 2014 6:13 am    Post subject: Reply with quote

Hi Kolusu,

Can you help me in above requirement.
Back to top
View user's profile Send private message Send e-mail
puttu
Beginner


Joined: 29 Jul 2010
Posts: 41
Topics: 9

PostPosted: Fri Mar 28, 2014 7:54 am    Post subject: Reply with quote

Both the input file length are 80 bytes.

Five output files should create for this comparision and files should create as below
1. Contains Unmatched records of both the Input Files.
2. Contains Unmatched records showing difference in particular record.
3. Contains records which are present in File1 but not in File2.
4. Contains records which are present in File2 but not in File1.
5. Contains Matched records of both files
Back to top
View user's profile Send private message Send e-mail
William Collins
Supermod


Joined: 03 Jun 2012
Posts: 437
Topics: 0

PostPosted: Fri Mar 28, 2014 9:39 am    Post subject: Reply with quote

What is the difference between 1, and 3.&4.?

How do you feel 2. should possibly work? Unless you have a key other than the whole record, you can tell it doesn't match, but you can't tell what doesn't match.

So, for 1. (which seems to cover 3. and 4.) and 5, it is a simple JOINKEYS with JOIN UNPAIRED.

If you can clarify and explain more, it may be something else.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Mar 28, 2014 10:37 am    Post subject: Reply with quote

puttu wrote:
Hi Kolusu,

Can you help me in above requirement.


Puttu,

Please be considerate to people's time. I don't work in the same time zone as you are and please don't expect me to help you round the clock. You posted the question during my night time and you wanted a response by sunrise?

Did you check the smart DFSORT trick "Create files with matching and non-matching records" ?

http://www.ibm.com/support/docview.wss?uid=isg3T7000094
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
puttu
Beginner


Joined: 29 Jul 2010
Posts: 41
Topics: 9

PostPosted: Fri Mar 28, 2014 12:56 pm    Post subject: Reply with quote

Hi Williams,

1 -> Output File should Contains Unmatched records of both the Input Files that is File 1 and File 2.
3 -> Output File should Contains records which are present in Input File1 but not in Input File2.
4 -> Output File should Contains records which are present in Input File2 but not in Input File1.


Regarding output file 2 i am checking the requirement again. Will let you know.

Thanks a lot.
Back to top
View user's profile Send private message Send e-mail
puttu
Beginner


Joined: 29 Jul 2010
Posts: 41
Topics: 9

PostPosted: Fri Mar 28, 2014 1:03 pm    Post subject: Reply with quote

Hi Kolusu,

I am sorry. Sad
Back to top
View user's profile Send private message Send e-mail
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Fri Mar 28, 2014 2:20 pm    Post subject: Reply with quote

puttu wrote:

1 -> Output File should Contains Unmatched records of both the Input Files that is File 1 and File 2.
Can someone explain how this is possible with only 2 input files?
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Fri Mar 28, 2014 2:33 pm    Post subject: Reply with quote

Hi Terry,

As with Most questions like this one, the user should be required to post some sample representative data from all input files and the actual output wanted when this sample input is is processed . . .

d
Back to top
View user's profile Send private message
puttu
Beginner


Joined: 29 Jul 2010
Posts: 41
Topics: 9

PostPosted: Sat Mar 29, 2014 5:34 am    Post subject: Reply with quote

Hi Terry,

1 -> Output File should Contains Unmatched records of both the Input Files that is File 1 and File 2.

To get above scenario output file. What I am doing is, After creating Output Files File 3 and File 4 then I am concetenating File 3 and File 4 to get Output File 1.

Below Output files for File 3 and File 4.
3 -> Output File should Contains records which are present in Input File1 but not in Input File2.

4 -> Output File should Contains records which are present in Input File2 but not in Input File1.
Back to top
View user's profile Send private message Send e-mail
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Sat Mar 29, 2014 10:39 am    Post subject: Reply with quote

Why have you not posted some sample input/output data Evil or Very Mad

di
Back to top
View user's profile Send private message
puttu
Beginner


Joined: 29 Jul 2010
Posts: 41
Topics: 9

PostPosted: Sat Mar 29, 2014 1:07 pm    Post subject: Reply with quote

Will post you Very Happy
Back to top
View user's profile Send private message Send e-mail
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