What will happen if a variable is declared as below..
Explain with an example? Working storage section:-
01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'.
01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'.
What will happen I am going to Display the WS-VARX and WS-
VARN?
Answer Posted / mallikarjun
WE CANNOT GIVE VALUE CLAUSE IN THE SECOND STATEMENT I.E.
WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345' . IF YOU
SPECIFY VALUE CLAUSE SYSTEM WILL SHOW AN ERROR, IF YOU
SPECIFY WITH OUT VALUE CLAUSE I.E.
WS-VARN REDEFINES WS-VARX PIC 9(5).
THEN IF YOU GIVE DISPLAY STATEMENT THEN ABCDEFGHIJ AND
ABCDE WILL BE DISPLAYED
| Is This Answer Correct ? | 26 Yes | 3 No |
Post New Answer View All Answers
What are the different data types in cobol?
What is the utilization of copybook in cobol?
Explain how you can characterize tables in cobol?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
what is difference between cobol and cobol/400
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
What are different data types in cobol?
What do you understand by psb and acb?
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 do you reference the printer file formats from cobol programs
Whats the difference between search & search ALL?
How do you differentiate between cobol and cobol-ii?
What is comp-1 and comp-2?
) what is the difference between AID and HANDLE AID?
Write the code to count the sum of n natural numbers.