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


Please Help Members By Posting Answers For Below Questions

how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1916


What do you understand by psb and acb?

873


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

1102


How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?

994


In COBOL programming, what is PERFORM? What is VARYING?

898


What is the difference between comp and comp-3 usage?

899


How do get the result of your program directly on your pc?

2096


Explain about different table spaces.

888


What type of SDLC u followed? Why?

1746


What are literals?

887


Are you comfortable in cobol or jcl?

828


what is the use of outrecord?

1995


if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.

6135


Have you used comp and comp-3 in your project? And how?

2235


What is the difference between a binary search and a sequential search what are the pertinent cobol?

947