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 want Display WS-VARX and WS-VARN?
Answers were Sorted based on User's Feedback
Answer / reena
The Redefined clause cannot contain a Value Clause.
i.e. it should only be WS-VARN REDEFINES WS-VARX PIC 9(5).
| Is This Answer Correct ? | 12 Yes | 1 No |
Answer / jitinder
The Syntax of Redefine Clause is
Label number data-name-1 REDFINES data-name-2
Here data-name-1 should not contain VALUE clause, but data-
name-2 can contain VALUE clause.
Plz correct me if i m wrong.
| Is This Answer Correct ? | 1 Yes | 3 No |
Answer / saveen
ws-varx will have 12345fghij
ws-varn will have 12345.
pls kindly post ur views. am a beginner.
| Is This Answer Correct ? | 4 Yes | 11 No |
In COBOL "BEFORE" advancing is there or not ?
What is the difference between perform … with test after and perform … with test before?
What is SET TO TRUE all about, anyway?
can we redefine 77 level item is it possible
Which is not true about evaluate statement
What is the usage of comp fields in cobol?
what happens when a copybook variables are declared using include statement ?
if a>b continue display x. dispaly y. end-if display 1 display 2. display 3. what should be my output ?
what is level 66 means??
what happens if we dont close cursor in db2-cobol pgm?
How do you define a variable of COMP-1? COMP-2?
How can we know that cobol program is using report file or simple file....?