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
What is rmode(any) ?
What is the difference between PIC 9.99 and PIC9v99?
What is the difference between comp and comp-3 usage?
What is the Purpose of Pointer in the string?
what happens if parmparameter passes zero bytes to the program
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
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.
example for sub strings ? and refernce modifications whit output pls
what is the use of outrecord?
HOw can I get the negative sign while deduct high value from low value
What guidelines should be followed to write a structured cobol prgm?
Write the code implementing the perform … varying.
Explain what you understand by passing by value.
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)