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
Which division and paragraphs are mandatory for a COBOL program?
What is Pic 9v99 Indicates in COBOL?
What is the utilization of copybook in cobol?
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
Write a program to enter and display the names of students in a class using the occurs clause.
What is static and dynamic call in cobol?
Write a cobol program making use of the redefine clause.
Which mode is used to operate the sequential file?
how do you define single dimensional array and multidimensional array in your cobol?
What is the difference between binary search and sequential search?
What is rmode(24)
What is the compute verb? How is it used?
What are literals?
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.
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue