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 different data types in cobol?
What is link edit in cobol?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
What is amode(24)?
what is difference between cobol and cobol/400
What is the difference between comp and comp-3?
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
What is inspect in cobol ?
What is rmode(any) ?
Can we redefine the field of x(200) to less than 200?
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
What is perform what is varying?
How do u write test cases?
What is length is cobol?