how we can reverse the string in the cobol for example
satheesh can be reveresed as hseehtas
Answer Posted / g venkatesh
data division.
01 ws-input pic x(8).
01 ws-output pic x(8).
01 i pic 9.
01 j pic 9.
procedure division.
move 1 to i.
perform varying j from 8 by -1 until j =0
move ws-input(i:1) to ws-output(j:1)
add 1 to i
end-perform
display ws-output.
stop run.
| Is This Answer Correct ? | 51 Yes | 7 No |
Post New Answer View All Answers
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
What are the different data types in cobol?
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
What kind of error is trapped by on size error option?
What are different data types in cobol?
For rewrite, why is it mandatory that file needs to be opened?
what is the difference between COBOL2 AND COBOL390?
What is redefines clause in COBOL?
Can we redefine the field of x(200) to less than 200?
Write a program that uses move corresponding.
Name some of the examples of COBOl 11?
What is length is cobol?
What rules are to be followed while using the corresponding options?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
IF I mention stop run in CICS what happens?