Re: 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.
Answers were Sorted based on User's Feedback
Answer / sruthi
Hi Subu,
first of all the size of the var NAME1 is 13. You are
passing more than 13 chars. Some data will be truncted.
There are 2 methods to reverse the string.
one is move reference modification.it is very lengthy
process and other is reverse function.
syntax: move function reverse(NAME1) to NAME2
| Is This Answer Correct ? | 12 Yes | 0 No |
Answer / praveen ellur
Reverse function in Cobol will do this for u.
Here is the syntax.
FUNCTION REVERSE ('COBOL PROGRAMMING')
| Is This Answer Correct ? | 5 Yes | 0 No |
what is S04E error in jcl?
11 Answers IBM, L&T,
how to display the dataset information?
How much salary you are expecting? If they ask in an interview, what we have to tell?
6 Answers Tech Mahindra, Wipro,
What is difference between comp & comp-4?
what is s013u000 for?
what is difference between the sysabend and userabend?
How many sections are there in data division in COBOL?
How do you fetch current date in normal cobol pgm and in cobol-db2 pgm?
what is redefines? where it can be effectively use for the purpose of memory utilization? give an example?
What are decleratives in COBOL ?
What guidelines should be followed to write a structured cobol prgm?
File status must be checked both while opening and reading the file or only while reading the file?