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
Difference between cobol and cobol-ii?
What rules are followed by the search verb.
What is the difference between next sentence and continue in cobol programing language?
Explain how you can characterize tables in cobol?
Name the sections present in data division.
What are 77 levels used for?
How many sections are there in data division in COBOL?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
What are the different rules of SORT operation?
What is the problem of ordered sequential files access?
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
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
how do you define single dimensional array and multidimensional array in your cobol?
What is the difference between structured cobol programming and object alternativelyiented cobol?
How arrays can be defined in COBOL?