Without using move verb how to move one variable to another.
Answer Posted / manikandesvaran
1)Using REDEFINES you can acheive this.
For ex.
10 WS-OLD-START-DATE PIC 9(8).
10 WS-NEW-START-DATE REDEFINES WS-OLD-START-DATE.
15 WS-START-YEAR PIC 9(4).
15 WS-START-MONTH PIC 9(2).
15 WS-START-DAY PIC 9(2).
Now WS-NEW-START-DATE will hold the value of WS-OLD-START-
DATE.
2)Using UNSTRING operator.
UNSTRING WS-NEW INTO WS-OLD
3)Using COMPUTE verb.
COMPUTE WS-NEW = WS-OLD.
4)Using SET statement.
SET OLD to NEW.
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What are the different open modes available in cobol?
Difference between cobol and cobol-ii?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
What is the Purpose of POINTER Phrase in STRING command in COBOL?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
Write a program to enter and display the names of students in a class using the occurs clause.
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
) How do u handle errors in BMS macro?
For rewrite, why is it mandatory that file needs to be opened?
Explain about different table spaces.
How do you differentiate between cobol and cobol-ii?
How to remove 2 duplicate records and copy only one using job control language?
What is the difference between perform … with test after and perform … with test before?
how can i see junk values in dclgen or in hostvariable of comp ?
Can you please let me know the centre name of INS certification in Kolkata.