input:-AABBCCDDEFGHIIJ
output:- ABCDEFGHIJ
Here in input we hav the duplicate characters i.e repeating
characters.SO we should eliminate the duplicate characters
and should display the output in ascending order.

Answer Posted / shekh

let me correct u Vaneesh.

we need to check each character. load the string to array & use condition.
perform para until eof
if ws-char (a) = ws-char (a + 1)
continue
else move ws-char (a) to ws-string (b).

define the variables accordingly.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many sections are there in data division in COBOL?

678


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

2332


Differentiate between structured cobol programming and object-oriented cobol programming.

663


Explain what you understand by passing by value.

694


I have a File that has duplicate records. I need only those records that occur more than thrice.?

8649






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

648


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

657


What is Pic 9v99 Indicates in COBOL?

723


What is the difference between perform … with test after and perform … with test before?

879


What is a SSRANGE and NOSSRANGE?

819


Which Search verb is equivalent to PERFORM…VARYING?

683


Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.

2053


What is a report item?

739


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.

2006


What is redefines clause in COBOL?

846