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
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)?
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
Explain about different table spaces.
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
What is a scope terminator give example?
I have a File that has duplicate records. I need only those records that occur more than thrice.?
What is the difference between comp and comp-3?
What are different data types in cobol?
What is the difference between perform … with test after and perform … with test before?
What is report-item in COBOL?
Are you comfortable in cobol or jcl?
What is perform what is varying?
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
What is the default value(s) for an initialize? What keyword will allow for an override of the default?