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

DFSORT to remove duplicates


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

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Fri Oct 10, 2008 3:58 pm
Reply with quote

I have a file with characters, alphanumeric, decimal and signed decimal fields.
I need to sort this file to remove duplicates comparing record wise and not field wise.

eg:

0001 ashimer -903 xcd
0001 ashimer -903 xcd
0201 ashimer -913 xcd

the o/p should have only

0001 ashimer -903 xcd
0201 ashimer -913 xcd



Any help ?
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Oct 10, 2008 4:10 pm
Reply with quote

RECFM=
LRECL=
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Oct 10, 2008 4:23 pm
Reply with quote

What about

SORT FIELDS=(1,length of record,CH,A)
SUM FIELDS=NONE
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Fri Oct 10, 2008 4:34 pm
Reply with quote

RECFM=FB, LRECL=800
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Oct 10, 2008 5:58 pm
Reply with quote

Code:

SORT FIELDS=(1,800,CH,A)
SUM FIELDS=NONE


Do you need anything else?
With what input you have given with above sort card you will get desired output.
[/code]
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Fri Oct 10, 2008 6:02 pm
Reply with quote

Hi Sambhaji,

The record contains not only characters but also decimal, signed decimal fields too .. as the LRECL is big i dont want to split the sort keys according to their types ....
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 Oct 10, 2008 9:12 pm
Reply with quote

Hello Ashimer,

The CH type should work for what you want to do.
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Fri Oct 10, 2008 9:14 pm
Reply with quote

No Dick, CH type is not working ...
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 Oct 10, 2008 9:27 pm
Reply with quote

Quote:
No Dick, CH type is not working ...


Quote:
The record contains not only characters but also decimal, signed decimal fields too .. as the LRECL is big i dont want to split the sort keys according to their types


CH would work with the example records you showed, but you are implying that example does not illustrate the different types of data you have to deal with. You should have shown an example that does illustrate that point (one where CH does not work).

You are contradicting yourself. If the record contains different types of fields, then you must split the sort keys according to their type. For example, you need to use SFF to handle a sddd.dd field, not CH. There's no magic format that you can use for every data type - that's why we have different formats for different data types.
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 Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
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
Search our Forums:

Back to Top