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
 
comparison of data in two files.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
itmanand

New User


Joined: 18 Dec 2008
Posts: 24
Location: Newyork

PostPosted: Mon Oct 26, 2009 11:31 pm    Post subject: comparison of data in two files.
Reply with quote

I have two files in this format

1. File 1

01101 XXXXX
01102 YYYYY
01103 BBBB

2. File 2

01102 ....................
01103 ....................

In file 2, the first 6 chars are hexadecimal.
My requirement is if that if the first 6 chars in file 1 match with file 2,
then I need to add an indicator at the last position.

Output

01101 XXXXX N
01102 YYYYY Y
01103 BBBB Y

Can someone help me on this?
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Oct 27, 2009 12:47 am    Post subject:
Reply with quote

Quote:
My requirement is if that if the first 6 chars in file 1 match with file 2, then I need to add an indicator at the last position.


It actually looks like you're adding an indicator in either case (N for no match and Y for a match) - right?

Quote:
In file 2, the first 6 chars are hexadecimal.


So in file2, are those first 6 chars are in 3 bytes (X'011101')?

In file1, are the first 6 characters actually characters (C'011101') or are they also hex?

What is the RECFM and LRECL of each input file?

What is the starting position, length and format of each field?

Can file1 have duplicates within it?

Can file2 have duplicates within it?

Can file 1 have a match value that is not in file2?

Can file2 have a match value that is not in file1?

Please show a better example of the records in each input file and what you expect for output with all possible variations.
Back to top
View user's profile Send private message
itmanand

New User


Joined: 18 Dec 2008
Posts: 24
Location: Newyork

PostPosted: Tue Oct 27, 2009 1:13 am    Post subject:
Reply with quote

The length of both files is 80 bytes, FB.
1. Both file 1 and file 2 can have duplicates.
2. It's basically like this. Write file 1 to output. If the first 6 bytes in file 1 are available in file 2, then put indicator as Y, else N.

3. In file 1, the first 6 chars are decimal. In file 2, it's hexadecimal.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Oct 27, 2009 3:23 am    Post subject:
Reply with quote

Quote:
1. Both file 1 and file 2 can have duplicates.
2. It's basically like this. Write file 1 to output. If the first 6 bytes in file 1 are available in file 2, then put indicator as Y, else N.


Just to be sure we are on the same page, I need to see an example of input and output where both files have duplicates and nonduplicates in various combinations. For example, if the input files had these records:

Code:

File 1

01101 XXXXX
01101 QQQQQ
01102 YYYYY
01103 BBBB
01104 CCCC
01104 DDDD
01105 EEEE
01108 FFFF
01108 GGGG
01108 HHHH

File 2

01102 ....................
01103 ....................
01103 ....................
01104 ....................
01104 ....................
01106 ....................
01107 ....................
01107 ....................
01108 ....................
01108 ....................


What would the expected output be?
Back to top
View user's profile Send private message
itmanand

New User


Joined: 18 Dec 2008
Posts: 24
Location: Newyork

PostPosted: Tue Oct 27, 2009 8:18 am    Post subject:
Reply with quote

The output should be file 1 with Y or N at the end.
Y - If the first 6 bytes(decimal) in file 1 matches with first 6 bytes(hexadecimal) in file 2.

N - If the first 6 bytes(decimal) in file 1 not found in file 2.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Oct 27, 2009 7:47 pm    Post subject:
Reply with quote

Hello,

Post the actual output using the sample data provided. . .
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 0 Tue Sep 26, 2017 3:35 am
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm

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