IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Compare and copy


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ajaybshukla

New User


Joined: 09 Sep 2008
Posts: 39
Location: india

PostPosted: Thu Jul 09, 2009 11:27 am
Reply with quote

Hi All,

I want to compare two files on the basis of some key and want to write similar matching records in one out put file.

i/pfile1 12345 sdffg 2k34jl 34567
12346 ghdd 2lelwe 34555

i/pfile2 12345 sdffg 2k34jl 34567

Ouput should contain:
o/pfile 12345 sdffg 2k34jl 34567


Please help
Thanks
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jul 09, 2009 11:30 am
Reply with quote

Which sort product are you using, DFSORT, SYNCSORT, CA-SORT

RECFM & LRECL of both files
Key position, length and format of both files.
Any other rules for include/exclude records
Back to top
View user's profile Send private message
ajaybshukla

New User


Joined: 09 Sep 2008
Posts: 39
Location: india

PostPosted: Thu Jul 09, 2009 11:37 am
Reply with quote

Thanks for reply

We are using Sycnsort
RECFM & LRECL of both files are different
key length is 10 byte and position is also different
just want to compare 10 specific byte field and if equal then want to write it into o/p file.

Thanks
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jul 09, 2009 11:53 am
Reply with quote

Well, if you had read any threads on the subject of sort then you may have realised that the questions I asked were to help those that want to help you.

Please take the time to read your original post, see the same old questions asked again, and then look at the c**p that you replied with.

Quote:
RECFM & LRECL of both files are different

WOW, that's interesting - but NOT what was asked.
Please give definitive values

Quote:
key length is 10 byte and position is also different

Gosh, does that mean that we can choose the key positions for ourselves, or do you want to tell us the location, length and format of the ones that you want us to use.

Quote:
just want to compare 10 specific byte field and if equal then want to write it into o/p file.

What, just the 10 bytes ? Or maybe the record from file 1, or from file2 or a combination of data from both.
Back to top
View user's profile Send private message
ajaybshukla

New User


Joined: 09 Sep 2008
Posts: 39
Location: india

PostPosted: Thu Jul 09, 2009 12:04 pm
Reply with quote

my first i/p is LRCL 29021 byte long
2nd i/p file is LRCL 80 byte only
i want to compare on the basis of 10 byte fileld
i want to compare 10 byt acct number from both files if they r equal then want to write it into o/p file.

Thanks
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jul 09, 2009 1:02 pm
Reply with quote

Please explain what was so totally unclear regarding my two earlier requests for information that you have deemed that you would not answer the questions fully.

The idea of people asking for specific information is that they NEED the information to try to help you, and not to just ask questions for nothing better to do.

Maybe the little form below might help you

The RECFM for file 1 is
The LRECL for file 1 is
The position of the key in file 1 is
The data format of the key for file 1 is

The RECFM for file 2 is
The LRECL for file 2 is
The position of the key in file 2 is
The data format of the key for file 2 is

If there is a match on the keys, what exactly do you want to see in the output. Is it just the key value, is it the record from one file, both files, a combination thereof.

YOU are the only one who knows what they want, and unless you take the time and effort to explain it to us, then nobody will be able to help you.

Please CLICK HERE to find out the right way to ask your questions.
Back to top
View user's profile Send private message
ajaybshukla

New User


Joined: 09 Sep 2008
Posts: 39
Location: india

PostPosted: Thu Jul 09, 2009 1:18 pm
Reply with quote

Sorry Expat that i could not explain you my problem,

I think this will be ok

The RECFM for file 1 is FB
The LRECL for file 1 is 29021
The position of the key in file 1 is 4 to 13
The data format of the key for file 1 is Alphanumeric

The RECFM for file 2 is FB
The LRECL for file 2 is 80
The position of the key in file 2 is 4 to 13
The data format of the key for file 2 is Alphanumeric

If this key matches then whole record from the file 1 will get written to new output file

Thanks
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
Search our Forums:

Back to Top