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
 

 

Eliminate dupliates in easytreive sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
chockalingam_rsp

New User


Joined: 13 Aug 2009
Posts: 43
Location: chennai

PostPosted: Mon Dec 07, 2009 6:57 pm    Post subject: Eliminate dupliates in easytreive sort
Reply with quote

Hi ,

How do we eliminate duplicates using easytreive sort . ie what is the equivalent to sort , sum fields = none that we use in sort.....?

I have a file with 100 records that has mutiple duplicate records. I want to to sort them and elminate teh duplucates.

I want this sorting and eliminating to be done in file not in report .

how can this be done in easytreive....?
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: Mon Dec 07, 2009 9:21 pm    Post subject:
Reply with quote

Hello,

If you are determined to eliminate duplicates "in the sort", suggest you use an external sort rather than Easytrieve.

If the process work better all within Easytrieve, compare the current record with the previous and skip the duplicates. . .
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Mon Dec 07, 2009 10:11 pm    Post subject:
Reply with quote

Dick,

this is an Ezytrieve CLass homework assignment
or
there is some data manipulation that the TS did not feel necessary to divulge.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2433
Location: Netherlands, Amstelveen

PostPosted: Tue Dec 08, 2009 12:05 am    Post subject:
Reply with quote

Use this in your EZT job :

Code:

//$ORTPARM DD  * 
 SUM FIELDS=NONE
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: Tue Dec 08, 2009 12:12 am    Post subject:
Reply with quote

Hello,

Quote:
Use this in your EZT job :

Code:
//$ORTPARM DD  * 
 SUM FIELDS=NONE

Possibly - if the system uses Syncsort. . .
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2433
Location: Netherlands, Amstelveen

PostPosted: Tue Dec 08, 2009 12:29 am    Post subject:
Reply with quote

Sure Dick, but which shop doesnt?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8055
Location: East Dubuque, Illinois, USA

PostPosted: Tue Dec 08, 2009 12:36 am    Post subject:
Reply with quote

Ours doesn't use Syncsort -- just DFSORT.
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: Tue Dec 08, 2009 12:36 am    Post subject:
Reply with quote

Hello,

Quote:
but which shop doesnt?
Many, many do not. . .
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2433
Location: Netherlands, Amstelveen

PostPosted: Tue Dec 08, 2009 2:14 pm    Post subject:
Reply with quote

For DFSORT the DFSPARM Data Set can be used.
Back to top
View user's profile Send private message
rkarthik22

New User


Joined: 18 Apr 2009
Posts: 47
Location: India

PostPosted: Thu Dec 10, 2009 10:11 am    Post subject: Reply to: Eliminate dupliates in easytreive sort
Reply with quote

chockalingam_rsp

Easytrieve Plus provides a simple technique for identifying duplicate records in a file. The file should be sorted by the key field, then the Eastrieve keywords DUPLICATE, FIRST-DUP and LAST-DUP can be used to tell you not only if a record is a duplicate, but also if it is the first or last duplicate in a set of like keyed records.

Code:

//* JOBCARD HERE
//********************************************                       
//*  DEMO USE OF "DUPLICATE", "FIRST-DUP"    *                       
//*  AND "LAST-DUP" KEYWORDS IN EASYTRIEVE   *                       
//********************************************                       
//STEP010 EXEC PGM=EZTPA00                                                     
//MYDATA   DD *                                                                 
AAA 1 OF 1                                                                     
BBB 1 OF 2                                                                     
BBB 2 OF 2                                                                     
CCC 1 OF 3                                                                     
CCC 2 OF 3                                                                     
CCC 3 OF 3                                                                     
DDD 1 OF 2                                                                     
DDD 2 OF 2                                                                     
EEE 1 OF 1                                                                     
//SYSPRINT DD SYSOUT=*                                                         
//SYSIN    DD *                                                                 
FILE MYDATA                                                                     
  A-KEY       1   3   A                                                         
  A-MSG       5  10   A                                                         
                                                                               
* WORKING-STORAGE                                                               
  RECORDTYPE  W  15   A                                                         
                                                                               
JOB INPUT (MYDATA KEY(A-KEY))                                                   
                                                                               
  IF DUPLICATE MYDATA                                                           
     RECORDTYPE = 'DUPLICATE'                                                   
     PRINT MYREPORT                                                             
  END-IF                                                                       
                                                                               
* MUST USE "NOT DUPLICATE" INSTEAD OF "UNIQUE"                                 
  IF NOT DUPLICATE MYDATA                                                       
     RECORDTYPE = 'NOT DUPLICATE'                                               
     PRINT MYREPORT                                                             
  END-IF                                                                       
                                                                               
  IF FIRST-DUP MYDATA                                                           
     RECORDTYPE = 'FIRST-DUP'                                                   
     PRINT MYREPORT                                                             
  END-IF                                                                       
                                                                               
  IF LAST-DUP MYDATA                                                           
     RECORDTYPE = 'LAST-DUP'                                                   
     PRINT MYREPORT                                                             
  END-IF                                                                       
                                                                               
REPORT MYREPORT LINESIZE 80                                                     
  LINE A-KEY A-MSG RECORDTYPE                                                   


This is a sample code i got from
http://www.caliberdt.com/tips/Nov2005.htm
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


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