01 var1 pic x(10)
01 var2 redefines var1 pic 9(10).
then in procedure division
move 'abcde' to var1 then waht is the value of var1 and var2
Answers were Sorted based on User's Feedback
Answer / s.v.venkata sivaprasad
redefines will reuse the memory with irrespective of date
type var1 is abcde and var2 also abcde.
Is This Answer Correct ? | 22 Yes | 0 No |
Answer / abhishek_ibm
Both will be having the same value but the only difference
is when we use airthmetic operation then it will take hex
value .. I do think I am correct but kindly correct me if i
am mistaken.
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / ashok
in x1 & x2 is haveing same value "abcd" and also memory
location also is same. thats why if u chang any values of
these atomatically chang both values.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / soumya santosini patnaik
soc7 abend occurs because according to move rules
alphaneumericfields can be moved to numeric fields only
when alphanumeric field consists of numeric data only.
Is This Answer Correct ? | 0 Yes | 5 No |
Answer / jaganmohanreddy
var1 will be abcde
var2 will be 0000000000
Is This Answer Correct ? | 1 Yes | 7 No |
Answer / veena
************************************************************
************************************************************
************************************************************
It will give compilation error.
Is This Answer Correct ? | 0 Yes | 11 No |
Can we move X(9) to 9(9). If yes what are the ways for doing this?
How can you pass values from COBOL program to non-COBOL programs?
can u plz expain me how to declare dynamic array? what is the meaning of depending on clause in dynamic array?
where do we use dyanamic call ? and where do we use static call pls give any example pls ?
Can we redefine the field of x(200) to less than 200?
1.What is the limit of linkage section?
) what is the difference between AID and HANDLE AID?
Difference between ps, esds
Why there is no questions in this column?
The order of precedence of arithmetic operators in an expression can be overridden with the use of (a) [] (b) () (c) {} (d) Any of the above
DATAONLY, MAPONLY functionality?
Can a REDEFINES clause be used along with an OCCURS clause? if yes, 01 WS-TABLE. 03 WS-TABLE-EL OCCURS 5 TIMES PIC X(1) VALUE 'A'. 03 WS-EX REDEFINES WS-TABLE-EL PIC X(5). What can you expect? if no,why?