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 / mr2981
to reverse the string use REVERSE function
01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING".
01 NAME2 PIC X(13).
MOVE FUNCTION REVERSE(NAME1) TO NAME2.
Is This Answer Correct ? | 34 Yes | 3 No |
Post New Answer View All Answers
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
What rules are to be followed while using the corresponding options?
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.
How do you reference the fixed block file formats from cobol programs
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this
What is a scope terminator give example?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
What is a SSRANGE and NOSSRANGE?
What do you understand by psb and acb?
Difference between cobol and cobol-ii?
What is rmode(24)
Write down the divisions of cobol program?