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 is amode(24)?
How do you define a variable of comp-1 and comp-2?
What are the access modes of START statement?
Write the code to count the sum of n natural numbers.
) How do u handle errors in BMS macro?
What is cobol?
how do you reference the variable block file formats from cobol programs
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
HOw can I get the negative sign while deduct high value from low value
How do define dynamic array in cobol.
What are the different rules for performing sort operation?
What are the different rules of SORT operation?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
Give some examples of command terminators?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?