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
A table has two indexes defined. Which one will be used by the SEARCH?
What do you understand by psb and acb?
What is link edit in cobol?
what is search and searchall?what is the diffrence between them?give an best example?
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?
What is perform what is varying?
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
how to refer the data field?
Name some of the examples of COBOl 11?
Describe the cobol database components?
Can a Search can be done on a table with or without Index?
what is the difference between COBOL2 AND COBOL390?
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
What kind of error is trapped by on size error option?