View previous topic :: View next topic
|
Author |
Message |
ram_vizag
Active User
Joined: 21 Aug 2008 Posts: 112 Location: hyd
|
|
|
|
I would like to know how to compare two rows within same file and write matched records into output file. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Look up JOINKEYS in the manual. |
|
Back to top |
|
|
ram_vizag
Active User
Joined: 21 Aug 2008 Posts: 112 Location: hyd
|
|
|
|
Hey Akatsukami,
If you done before using JOINKEYS share it. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
ram_vizag, after almost 9 years here you should know that this is a HELP forum, not a WRITE-THE-CODE-FOR-YOU forum. If you ask for code, be prepared to pay the going rate for it. Furthermore, you did not specify the record length of the file, nor whether you are calling duplicates a complete duplicate or just a duplicate key (and if so, how long the key is and where it starts), so nobody could help you even if they wanted to give you the code.
Google is your friend. Googling joinkeys returned about 40,900 hits and one of the first was www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.icea100/ice2ca_Example_1_-_Paired_F1_F2_records_without_duplicates.htm which has an example of precisely what you want, using 2 files instead of 1. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3049 Location: NYC,USA
|
|
|
|
No one will give you readymade solutions here until you try something |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
the question has already been asked a few times, search the forum |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Your terminology could be better: not 'file' but a 'data set' and both files and data sets have records, not rows. SQL tables have rows. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2012 Location: USA
|
|
|
|
Nic Clouston wrote: |
Your terminology could be better: not 'file' but a 'data set' and both files and data sets have records, not rows. SQL tables have rows. |
Frankly, any "table" has "rows", not only a SQL table:
- ISPF tables
- Excel tables
- tables printed on paper
- etc.
|
|
Back to top |
|
|
|