01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING".
01 NAME2 PIC X(13).
now I want to display the value of NAME1 in reverse order
i.e value should be displayed as "GNIMMARGORP LOBOC"
HOW can I do that ??? please let me know if any one knows
it.
Answer Posted / rajani
working-storage section.
01 name1 pic x(17) value 'cobol programming'.
01 name2 pic x(17).
01 i pic 99.
01 j pic 99 value 1.
procedure division.
perform para varying i from 17 by -1 until i<1.
display name2.
stop run
para.
move name1(i:1) to name2(j:1).
add 1 to j.
| Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
When is inspect verb is used in cobol?
how do you reference the variable block file formats from cobol programs
Discuss about changing dataset name in proc.
What are the different rules to perform a Search?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
how do you define single dimensional array and multidimensional array in your cobol?
explain sorting techniques in cobol program?
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
What is the Purpose of Pointer in the string?
1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?
Difference between cobol and cobol-ii?
What are the various section in data division and briefly explain them.
Write some characteristics of cobol as means of business language.
What is a SSRANGE and NOSSRANGE?