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
How can you get the ksds file records into your cobol program?
What are literals?
What is a report item?
Which is not true about evaluate statement
explain sorting techniques in cobol program?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
What guidelines should be followed to write a structured cobol prgm?
Discuss about changing dataset name in proc.
how to move the records from file to array table. give with code example
What is the utilization of copybook in cobol?
Why would you use find and get rather than to obtain?
How many bytes S(8) comp field occupy and its maximum value?
Can a Search can be done on a table with or without Index?
how to refer the data field?
How many sections are there in data division in COBOL?