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

Mention the guidelines to write a structured cobol program?

1028


I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.

2392


What is a SSRANGE and NOSSRANGE?

1416


Write down the divisions of cobol program?

1150


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

9018


Write a program to enter and display the names of students in a class using the occurs clause.

1154


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

1142


What rules are followed by the search verb.

1047


Can a Search can be done on a table with or without Index?

1235


How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?

2394


How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?

1092


What is the LINKAGE SECTION used in COBOL?

1469


) How do u handle errors in BMS macro

1958


)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?

1954


i want a program using by if, evaluate , string, unstring, perform, occurs?

4635