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
What is a report item?
Write the code to count the sum of n natural numbers.
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
What is the difference between next sentence and continue in cobol programing language?
What is the difference between binary search and sequential search?
What is the difference between comp and comp-3 usage?
What is length is cobol?
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
How do you define a variable of comp-1 and comp-2?
Explain how you can characterize tables in cobol?
How do define dynamic array in cobol.
How do you differentiate between cobol and cobol-ii?
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
What is the LINKAGE SECTION used in COBOL?
How many bytes S(8) comp field occupy and its maximum value?