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
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
HOw can I get the negative sign while deduct high value from low value
What are the various section in data division and briefly explain them.
When is inspect verb is used in cobol?
What is the difference between PIC 9.99 and PIC9v99?
I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.
How can you get the ksds file records into your cobol program?
Are you comfortable in cobol or jcl?
What rules are followed by the search verb.
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
How do get the result of your program directly on your pc?
How many bytes S(8) comp field occupy and its maximum value?
how to convert the recors form vsam file to db2 table tru file aid
What is the utilization of copybook in cobol?
i want a program using by if, evaluate , string, unstring, perform, occurs?