COBOL program to read the string ' BOMBAY' in reverse order as 'YABMOB'
Answer Posted / meghraj hulawale
Data Division.
w-s-s.
77 str pic x (6) value 'BOMBAY'.
77 revstr pic x (6).
77 I pic 9 (1).
77 J pic 9 (1) value 1.
77 cnt pic 9 (1).
Procedure Division.
inspect str tallying cnt for all characters before initial space.
move cnt to I.
perform until I < 1
move str (I:1) to revstr (J:1)
add 1 to J
subtract 1 from I
end-perform.
Display revstr.
stop run.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are the different rules of SORT operation?
Explain the configuration section of a cobol program with examples of syntax.
How to remove 2 duplicate records and copy only one using job control language?
What are 77 levels used for?
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.
how do you reference the rrds file formats from cobol programs
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
Which Search verb is equivalent to PERFORM…VARYING?
What is the LINKAGE SECTION used in COBOL?
Define static linking and dynamic linking.
What is the difference between binary search and sequential search?
What do you understand by psb and acb?
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.