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
 

 

DFSORT to remove duplicates

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: DFSORT to remove duplicates
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: 8593
Location: Back in jolly old England

PostPosted: Fri Oct 10, 2008 4:10 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Fri Oct 10, 2008 9:12 pm    Post subject:
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    Post subject:
Reply with quote

No Dick, CH type is not working ...
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: Fri Oct 10, 2008 9:27 pm    Post subject:
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    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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Updating the counters after eliminati... PANDU1 DFSORT/ICETOOL 12 Mon Nov 21, 2016 9:47 am
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts DFSORT sorting only specific records akodakka DFSORT/ICETOOL 4 Thu Aug 04, 2016 11:24 am


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