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 / ankur kar
In order to reverse the String the only way is by declaring
the string as an array and then sequentially arrage the
array based on the asending/desending order of the array
and then display the sequential result accordingly.
Otherwise there is no command in COBOL that will allow the
string to be displayed in the reverse order.
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
i want a program using by if, evaluate , string, unstring, perform, occurs?
What is the difference between PIC 9.99 and 9v99 in COBOL?
What is the difference between comp and comp-3?
How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
Which mode is used to operate the sequential file?
Write a program that uses move corresponding.
Which is not true about evaluate statement
What is length is cobol?
how to move the records from file to array table. give with code example
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
Write a program to enter and display the names of students in a class using the occurs clause.
What is the difference between structured cobol programming and object alternativelyiented cobol?