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
 
To remove duplicates of a file in cobol program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
ch.prashant

New User


Joined: 16 Sep 2006
Posts: 27
Location: Hyderabad

PostPosted: Tue Sep 15, 2009 3:35 pm    Post subject: To remove duplicates of a file in cobol program
Reply with quote

How to remove duplicates from a file in a cobol program.
As iam converting the easytrive code to cobol.
it has a code in easytrive
Code:
SORT COTBLSEL   TO COTBLSLS USING COTBL-GEIS-SEL BEFORE SCREENING 
                                                                   
SCREENING. PROC                                                   
   IF COTBL-NO-OF-SUBM-SEL GT 0 OR +                               
      COTBL-1-X-FOR-EA-PASS-SEL NE '     '                         
      IF COTBL-GEIS-SEL    GT PREV-COTBL-GEIS-SEL                 
         SELECT                                                   
      END-IF                                                       
   END-IF                                                         
      PREV-COTBL-GEIS-SEL = COTBL-GEIS-SEL                         
END-PROC 


in which it removes duplicates and sort the file so i want remove duplicates in the pgm itself and sort it
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


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

PostPosted: Tue Sep 15, 2009 3:52 pm    Post subject:
Reply with quote

Why not move the record to a WORKING-STORAGE field, compare the NEXT record to the WORKING-STORAGE field, and release to the sort if the two are not equal? Isn't that just what the Easytrieve code is doing?
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am

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