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
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
What is amode(24)?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
What is an in line perform? When would you use it? Anything else you wish to say about it.
what happens if parmparameter passes zero bytes to the program
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.
explain sorting techniques in cobol program?
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)?
How to know whether the module is dynamical or statistical?
What is link edit in cobol?
What is amode(31)
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?
how do you reference the variable block file formats from cobol programs
Which mode is used to operate the sequential file?
IF I mention stop run in CICS what happens?