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
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
how do you reference the esds vsam file formats from cobol programs
What is an in line perform? When would you use it? Anything else you wish to say about it.
How do u write test cases?
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
What is Pic 9v99 Indicates in COBOL?
What is the difference between binary search and sequential search?
what is difference between cobol and cobol/400
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
How many bytes S(8) comp field occupy and its maximum value?
What is rmode(24)
how to access the file from prodution from changeman tool and to submit a file to production