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
Define cobol?
how to convert the recors form vsam file to db2 table tru file aid
What is the default value(s) for an initialize and what keyword allows for an override of the default?
Difference between cobol and cobol-ii?
How do you get the data to code the BMS macro?
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
What is the difference between a binary search and a sequential search what are the pertinent cobol?
What kind of error is trapped by on size error option?
What is the problem of ordered sequential files access?
What are the different open modes available in cobol?
Explain about different table spaces.
Difference between array and sub-script ?
How many bytes S(8) comp field occupy and its maximum value?
Which is not true about evaluate statement
What is the usage of comp fields in cobol?