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
Write a program to enter and display the names of students in a class using the occurs clause.
What is the difference between comp and comp-3 usage?
How do we get current date from system with century in COBOL?
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.
What are various search techniques in cobol? Explain.
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
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 the difference is between continue and next sentence?
Can we change the password using ALTER? anyone tried and changed?
A table has two indexes defined. Which one will be used by the SEARCH?
In which area will you utilize 88 level items in cobol?
how do you reference the esds vsam file formats from cobol programs
Name the divisions, which are available in a cobol program?