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 |
Is it possible to mutliply a comp variable with an comp-3 variable. Will there be any error if i do it?
I try to use some column names in my cobol progorm but these column not in db2 table ..when do i get error ..while bind time or runtime?
What is the difference between static call & Dynamic call?
what is a load module ?
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 is the minimum number of lines a Cobol program should have to successfully compile and run
11 Answers ABC, Societe Generale,
How can i write a comp-3 variable into a sequential file should i declara the field in the file description as comp- 3?
how do you move only numeric data from A to B 01 A pic x(10) value 'a1b2c34d5e'. 01 B pic x(5).
HELLO FRIENDS, THIS IS JANARDHAN.GADIRAJU, I FACED ONE INTERESTING QUESTION IN COBOL, THAT IS WHAT ARE THE VALUES WE CAN SEE IN HIGHVALUES AND LOWVALUES, CAN U PLEASE GIVE ME THE ANSWER
Why we need to use redefine clause when we can define the variable seperately... what is actual need....
if you code move high-values to variable,can you move it into numeric variable or alphanumeric variable?
) what is the difference between AID and HANDLE AID?