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 / ak

1.copy the file into array
2.read the file entil eof
3.if file-key equals to ws-arry-key(Count)
move ws-arry-key(count) to ws-dup-rec(for duplicate values)
else continue
write ws-arry-key

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?

862


What do you understand by psb and acb?

858


What are the different open modes available in cobol?

954


What is report-item in COBOL?

907


Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks

2616


What are 77 levels used for?

861


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.

2224


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

2022


Write down the divisions of cobol program?

859


What is redefines clause in COBOL?

1056


What is difference between static and dynamic call in cobol?

1043


What are the access modes of START statement?

947


please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

2197


What is the difference between external and global variables in COBOL?

1060


can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

2193