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 / sairanga

procedure division.
move name1(17:1) to name2(1:1).
move name1(16:1) to name2(2:1).
move name1(15:1) to name2(3:1).
.
.
.

move name1(2:1) to name2(16:1).
move name1(1:1) to name2(17:1).
display name2.
stop run.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you get the ksds file records into your cobol program?

727


What are literals?

724


What is a report item?

813


Which is not true about evaluate statement

1844


explain sorting techniques in cobol program?

784






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

797


What guidelines should be followed to write a structured cobol prgm?

764


Discuss about changing dataset name in proc.

839


how to move the records from file to array table. give with code example

2315


What is the utilization of copybook in cobol?

763


Why would you use find and get rather than to obtain?

776


How many bytes S(8) comp field occupy and its maximum value?

1745


Can a Search can be done on a table with or without Index?

924


how to refer the data field?

1902


How many sections are there in data division in COBOL?

792