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

How to eliminate Duplictates using DFSORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sambasivarao

New User


Joined: 10 Jul 2006
Posts: 47
Location: Bangalore

PostPosted: Thu Dec 28, 2006 9:05 pm
Reply with quote

Hi ALL,


Iam getting the Sequential file.

In that file i found that some of the Duplicate policies are there.

I want to eliminate those duplicate policies.

Could you please let me know how to eliminate duplicates using DFSORT.


Thanks in advance.


Cheers,
Samba.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Dec 28, 2006 9:09 pm
Reply with quote

Have you looked? Searching on "sort duplicate eliminate" netted a bunch, such as:
http://www.ibmmainframes.com/viewtopic.php?t=15227&highlight=sort+duplicate+eliminate
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Dec 29, 2006 1:05 am
Reply with quote

Hello,

This question would be better asked in the DFSORT forum rather than this DB2 forum. . .

Also, as W.T. pointed out, there are multiple solutions to this question in the DFSORT forum.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Fri Dec 29, 2006 8:20 am
Reply with quote

Samba,

Still if you dont find answer to your question, you need to give RECFM and LRECL of your sequential file.

Also the starting position of the "policies" with the length (on which you need to check duplicates).
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Dec 29, 2006 8:23 pm
Reply with quote

Samba,

If you just want one record with each policy value as output, you can use a DFSORT/ICETOOL job like this:

Code:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=...  input file
//OUT DD DSN=...  output file
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(p,m,f) FIRST
/*


where p,m,f is the starting position, length and format of the policy field.

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

Use [URL] BBCode for External Links
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
No new posts DFSORT - VB file RDW getting overridden DFSORT/ICETOOL 3
Search our Forums:

Back to Top