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 amode(24)?
Whats the difference between search & search ALL?
Write the code to count the sum of n natural numbers.
State the various causes of s0c1, s0c5 and s0c7.
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
What is the difference between comp and comp-3 usage?
What is the difference between comp and comp-3?
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?
What is the default value(s) for an initialize and what keyword allows for an override of the default?
how do you reference the ksds vsam file formats from cobol programs
What is the Purpose of POINTER Phrase in STRING command in COBOL?
What is perform what is varying?
what is the use of outrecord?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there