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

What is amode(24)?

680


What is the difference between PIC 9.99 and 9v99 in COBOL?

729


What are declaratives and what are their uses in cobol?

706


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

1798


How do u write test cases?

1633






What is a SSRANGE and NOSSRANGE?

818


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

8152


What are all the divisions of a COBOL program?

660


What is the difference between goback, stop run and exit program in cobol?

918


Whats the difference between search & search ALL?

5249


How arrays can be defined in COBOL?

661


how do you reference the variable block file formats from cobol programs

678


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

670


What happens when we move a comp-3 field to an edited (say z (9). Zz-)?

769


How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

2726