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

I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

1107


if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.

5668


What is report-item in COBOL?

702


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.

1999


Write a program that uses move corresponding.

668






) how do u code after getting data?

1578


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

4039


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

813


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

1643


What are the different types of condition in cobol and write their forms.

652


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

1922


How to know whether the module is dynamical or statistical?

650


Which is not true about evaluate statement

1565


How do you reference the fixed block file formats from cobol programs

697


i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

989