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
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
What are the pertinent COBOL
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
Discuss about changing dataset name in proc.
Give some examples of command terminators?
What are different data types in cobol?
What is rmode(any) ?
How arrays can be defined in COBOL?
Mention the guidelines to write a structured cobol program?
For rewrite, why is it mandatory that file needs to be opened?
I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.
how to move the records from file to array table. give with code example
What is a scope terminator give example?
What rules are followed by the search verb.