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 meaning of 'Eject' verb in cobol?
why 02 level number can't be use as a separate level number like 01 or 77 ?
What does the initialize statement do ?
what is sort? whis is internal & external sort ?when do u go for inter sort & external sort? tell about some sort utilites?
suppose a cobol programme A calling programme B,C and D. If C undergoes some change what if A,B,C,D need to be recompiled or only C nee to be recompliled.
Give some examples of command terminators?
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
What is amode(24)?
Program A calls program B. Will the working storage variables declared in program B be initialized every time it is called by program A or will the values be retained until the end of program A?
How arrays can be defined in COBOL?
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
What are some examples of command terminators?