COBOL program to read the string ' BOMBAY' in reverse order as 'YABMOB'
Answer Posted / sushree
id division.
prog-id. hello.
data division.
working-storage section.
01 ws-str pic A(6) value 'BOMBAY'.
01 ws-cnt pic 9(1).
01 ws-str1 pic A(1).
01 ws-str2 pic A(6) value space.
procedure division.
inspect ws-str tallying ws-cnt for all characters
display ws-cnt
perform until ws-cnt < 1
move ws-str3(ws-cnt:1) to ws-str1
string ws-str2 delimited by space
ws-str1 delimited by size
into ws-str3
compute ws-cnt = ws-cnt - 1
end-perform.
display ws-str3.
stop run.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are the rules of the move verb?
How to remove 2 duplicate records and copy only one using job control language?
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
What rules are to be followed while using the corresponding options?
What is the difference between Call and a Link?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
) How do u handle errors in BMS macro
What are 77 levels used for?
What is the Purpose of Pointer in the string?
Write a program that uses move corresponding.
What is the Purpose of POINTER Phrase in STRING command in COBOL?
Difference between array and sub-script ?
What is link edit in cobol?
how do you reference the rrds file formats from cobol programs