I HAVE FOLLOWING DECLARATION.
02. A PIC X(10) VALUE 'XXXXXXXXXX'.
02. B REDEFINES A.
05. C PIC X(3).
05. D PIC X(3).
05. E PIC 9(3).
IN MY PROG, I HAVE
MOVE 1 TO E.
DISPLAY A.
WHAT WILL BE DISPLAYED AS A RESULT OF THIS?
PLEASE EXPLAIN THE ANSWER. THANKS.
Answers were Sorted based on User's Feedback
Answer / duboisa
for me you have
c = 'XXX'
d = 'XXX'
e = 001
and A = 'XXXXXX001'
| Is This Answer Correct ? | 7 Yes | 3 No |
Answer / paray2x
1. you will get data exception as you cannot move 'XXX' to
a 9(3) field.
2. Since you have not initialised C,D it will be '......001'
| Is This Answer Correct ? | 7 Yes | 5 No |
Answer / smiley
Can anybody explain...How C and D are having values as "XXX"
in answer ,though not initialized. Purpose of redefines
clause is to use the same storage space for different data.
I think answer posted by PRANAY2X is correct.
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / anil
we cannot declare the group item with level no 02 it should
be declared with 01. so the question itself wrong
| Is This Answer Correct ? | 1 Yes | 8 No |
What is the significance of the PROGRAM-ID paragraph? If this name doesnt match with the name of the COBOL program, does it make a difference? Is the name specified in the PROGRAM-ID paragraph used as a name for the load module or any such thing?
For rewrite, why is it mandatory that file needs to be opened?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
why we are using picture clause in the cobol programs?
How would the number +1234 be stored if a PIC clause of PICTUREs9(4) comp-3 were used?
using redefine can you redefine lower variable size to higher variable size?
in the TIME parameter we r giving hours r minutes
What is the default value of DISP for temp datasets
what is label record is standard or omitted in file description of data division?
What are differences between Static Call and Dynamic Call?
10 Answers IBM, KBC, Keane India Ltd, Verizon,
How to declare if emp-name = AAAAA""BBB in working-storage section. After display emp-name should print like AAAAA""BB
in a indexed file what is procedure for read the records from 12 to 18. please give the code example