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
 
Identifying the duplicate keys and displaying thru DFSort

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

New User


Joined: 11 Nov 2006
Posts: 6

PostPosted: Thu Dec 14, 2006 4:18 am    Post subject: Identifying the duplicate keys and displaying thru DFSort
Reply with quote

Hi,

Is there are any way to identify the duplicate keys in a record and display using DFSort.

I understand that duplicates can be eliminated thru DFSort, but i have a need to identify those keys before eliminating.

Thanks in advance.

Veer
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: Thu Dec 14, 2006 5:50 am    Post subject:
Reply with quote

Quote:
Is there are any way to identify the duplicate keys in a record and display using DFSort.


Yes, you can do that with the SELECT operator of DFSORT's ICETOOL.

But exactly what you'd do depends on what you want to display.

Some examples:

If you have keys like this:

AAA
AAA
BBB
CCC
CCC
CCC
DDD

and you want to display the second and subsequent duplicates, e.g.

AAA
CCC
CCC

you can use this DFSORT/ICETOOL job:

Code:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//SHOW DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(IN) DISCARD(SHOW) ON(1,3,CH) FIRST
/*


If you want to display all of the duplicate records, e.g.

AAA
AAA
CCC
CCC
CCC

you can use this DFSORT/ICETOOL job:

Code:

//S2 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//SHOW DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(IN) TO(SHOW) ON(1,3,CH) ALLDUPS
/*


If you want to display one record for each duplicate, e.g.

AAA
CCC

you can use this DFSORT/ICETOOL job:

Code:

//S3 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//SHOW DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(IN) TO(SHOW) ON(1,3,CH) FIRSTDUP
/*


If you want to do something else, please explain exactly what you want to do and show an example of the input records and output records.

For complete details on the SELECT operator of DFSORT's ICETOOL, see:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/6.11?DT=20060615185603
Back to top
View user's profile Send private message
veer

New User


Joined: 11 Nov 2006
Posts: 6

PostPosted: Fri Dec 15, 2006 4:21 am    Post subject:
Reply with quote

Thanks a lot Frank for the very detailed explanation.
I appreciate you taking the time to help me with this request.

Thanks again

Veer
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 Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Reg:Displaying the particular month o... bhavana yalavarthi All Other Mainframe Topics 4 Sat Jul 08, 2017 8:13 pm
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts PA02 - Programmtically control attent... dodithegreat IMS DB/DC 1 Thu Apr 06, 2017 8:33 pm

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