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


Please Help Members By Posting Answers For Below Questions

Why is it necessary that file needs to be opened in I-O mode for REWRITE?

987


What rules are to be followed while using the corresponding options?

831


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.

6092


How do you reference the fixed block file formats from cobol programs

913


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

946


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

1213


What is a scope terminator give example?

833


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

8673


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

886


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

984


What is a SSRANGE and NOSSRANGE?

1115


What do you understand by psb and acb?

846


Difference between cobol and cobol-ii?

945


What is rmode(24)

899


Write down the divisions of cobol program?

842