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 2 files - Need help

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

New User


Joined: 22 Apr 2010
Posts: 2
Location: India

PostPosted: Fri Apr 23, 2010 3:10 pm    Post subject: Comparison of 2 files - Need help
Reply with quote

I have 2 files the 1st file length is 150 & 2nd one is 80.

Ex of File 1 :-
Code:
                    Chandu A 123456789 134578978 testing cmpny xxxxxx
                    SAM     A 888888888  134578978 testing cmpny xxxxxx
                    RAM     L 123456789  134578978 testing cmpny xxxxxx
                    Pooh    L 878787878  134578978 testing cmpny xxxxxx

Ex of File 2 :-
Code:
                  L  123456789  134578978
                  A  888888888  134578978
                  A  123456789  134578978
                  L  878787878  134578978

The Requirement is combination (A 123456789 134578978) of File1 should be compared with combination (A 3456789 134578978) of File2 if matched it shud be written to 3rd file and if only two values (combination (123456789 134578978) are matched and there is discripenct in the 3rd value ( A or L) we need to replace the same value of the first file with value of the 2nd file and wriiten to the 3rd file.

In breif,

Ex of File 1 :-
Code:
                   Chandu A 123456789 134578978 testing cmpny xxxxxx

Ex of File 2 :-
Code:
                  L  123456789  134578978


Out put shd look like
Code:
                   Chandu  L 123456789 134578978 testing cmpny xxxxxx
                                                   (we can see tht A is changed to L)
                   SAM     A 888888888  134578978 testing cmpny xxxxxx
                   RAM     L 123456789  134578978 testing cmpny xxxxxx
                   Pooh    L 878787878  134578978 testing cmpny xxxxxx
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Fri Apr 23, 2010 3:24 pm    Post subject: Re: Comparison of 2 files - Need help
Reply with quote

Cprasad wrote:
discripenct
Huh?
Between the shorthand and the mis-spellings, your post is somewhat confusing, care to try again?
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: Fri Apr 23, 2010 7:40 pm    Post subject:
Reply with quote

Hello and welcome to the forum,


Might "discripenct" be discrepancy or simply "difference"?

Suggest you use the spellcheck (just below the reply text box) to make sure that the typos are minimized.
Back to top
View user's profile Send private message
Cprasad

New User


Joined: 22 Apr 2010
Posts: 2
Location: India

PostPosted: Fri Apr 23, 2010 9:48 pm    Post subject: Comarision of 2 files - Need Help
Reply with quote

Sorry for the Confusion.


File1:- F1

A dis 23456 7890 xxxx testing
A ram 5678 9870 yyyy coding
B sam 1234 3456 zzzz analysis
B cam 9998 8989 dfdf xyzxyz

File2:- F2
A 23456 7890
X 5678 9870
B 1234 3456
Y 9998 8989

File3:- output

A dis 23456 7890 xxxx testing
X ram 5678 9870 yyyy coding ------> A is replaced with X
B sam 1234 3456 zzzz analysis
Y cam 9998 8989 dfdf xyzxyz ------> B is replaced with Y


Requirement is


We need to compare F1 - 1,3,4 columns with F2- 1,2,3 coulmns, if matched we need we need to write that record as
it is to the output file. Suppose if the F1 1st column doesn't match with F2 1st column & other 2 columns of
two files are matched, then F1 1st cloumn value needs to be replaced with F2 1st column & written to the o/p file.
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 Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm

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