COBOL program to read the string ' BOMBAY' in reverse order as 'YABMOB'
Answer Posted / rashi
MOVE 'BOMBAY' TO WS-STRING.
INSPECT WS-STRING TALLYING WS-COUNT FOR ALL CHARACTERS
MOVE WS-COUNT TO WS-COUNT1.
MOVE 1 TO WS-COUNT2.
PERFORM VARYING WS-COUNT1 BY -1 UNTIL WS-COUNT1 = 0
MOVE WS-STRING(WS-COUNT1:1) TO WS-REV-STRING(WS-COUNT2:1)
ADD 1 TO WS-COUNT2
END-PERFORM.
| Is This Answer Correct ? | 10 Yes | 0 No |
Post New Answer View All Answers
What are the pertinent COBOL
Explain how you can characterize tables in cobol?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
how to access the file from prodution from changeman tool and to submit a file to production
What are the access modes of START statement?
Differentiate between structured cobol programming and object-oriented cobol programming.
how can i see junk values in dclgen or in hostvariable of comp ?
What are different data types in cobol?
Name some of the examples of COBOl 11?
What are various search techniques in cobol? Explain.
How you can characterize tables in cobol?
What is the Purpose of Pointer in the string?
What is the usage of comp fields in cobol?
Define cobol?
Can you please let me know the centre name of INS certification in Kolkata.