Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Compare and copy

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Compare and copy
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jul 09, 2009 11:30 am    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jul 09, 2009 11:53 am    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jul 09, 2009 1:02 pm    Post subject:
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    Post subject:
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    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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us