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

explain sorting techniques in cobol program?

1159


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

2091


Discuss about changing dataset name in proc.

1192


When is inspect verb is used in cobol?

1200


Are you comfortable in cobol or jcl?

1002


What is rmode(24)

1112


What are different data types in cobol?

1247


What is the default value(s) for an initialize and what keyword allows for an override of the default?

1170


Explain the configuration section of a cobol program with examples of syntax.

1140


how to access the file from prodution from changeman tool and to submit a file to production

7482


How do define dynamic array in cobol.

1100


Give some examples of command terminators?

1215


How are the next sentence and continue different from each other?

1244


What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

1138


What are declaratives and what are their uses in cobol?

1155