Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

I want to remove a duplicates form a given input field using cobol program. please Any one help me out to solve this ... Thanks in Advance.

Answer Posted / naveenkumar m

As few answered for VSAM file dedup, I will explain for PS flat files,

1) Make sure your file is sorted either Ascending or descending using SORT.

2)FIRST-READ PARA
READ INPUT-FILE INTO WS-ARRAY()
UNTIL EOF
ARRAY-COUNT=ARRAY-COUNT + 1

3)PERFORM COMPARE-PARA VARYING I FROM 1 BY 1 UNTIL I < ARRAY-COUNT
IF WS-ARRAY(I)=WS-ARRAY(I+1) THEN
WRITE DUPLICATE-RECORDS
ELSE
WRITE NODUPLICATE-RECORDS
END-PERFORM

=====================================
I just given algorithm not exact code....

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you get the ksds file records into your cobol program?

1103


What is length is cobol?

1111


) what is the difference between AID and HANDLE AID?

2165


How did the release of cobol/370 version 1.3 improve the performance of release 1.1?

1085


Write the code implementing the perform … varying.

1078


what is the difference between COBOL2 AND COBOL390?

3071


Explain how to differentiate call by context by comparing it to other calls?

1193


What rules are followed by the search verb.

1130


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

1161


Define static linking and dynamic linking.

1205


A table has two indexes defined. Which one will be used by the SEARCH?

1289


What is the difference between goback, stop run and exit program in cobol?

1599


How do get the result of your program directly on your pc?

2352


how do you reference the rrds file formats from cobol programs

1590


What is the Purpose of Pointer in the string?

1086