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
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
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.
Write a program that uses move corresponding.
What is the difference between comp and comp-3 usage?
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
What rules are to be followed while using the corresponding options?
Difference between cobol and cobol-ii?
what are decleratives in cobol?
Write a program to enter and display the names of students in a class using the occurs clause.
Why occurs cannot be used in 01 level in COBOL?
Difference between array and sub-script ?
What is rmode(any) ?
For rewrite, why is it mandatory that file needs to be opened?
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.
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?