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
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.
How to know whether the module is dynamical or statistical?
What is the default value(s) for an initialize and what keyword allows for an override of the default?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
What is the local-storage section?
What is the difference between external and global variables in COBOL?
what is search and searchall?what is the diffrence between them?give an best example?
What are the cobol coding sheets?
Which mode is used to operate the sequential file?
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
Explain about different table spaces.
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?