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 meant by binary search?
What is the difference between goback, stop run and exit program in cobol?
In an EVALUATE statement, can I give a complex condition on a when clause?
The following entries appear in the WORKING-STORAGE SECTION: 01 DATE-TODAY. 05 YY PIC XX VALUE "90". 05 MM PIC XX VALUE "12". 05 DD PIC XX VALUE :31". 01 DATE-EDIT PIC XX/XX/XX. MOVE DATE-TODAY TO DATE-EDIT. (a) 901231 (b) 90/12/31 (c) 31/12/90 (d) 311290
What are the functions like c or c++ in cobol?
How to delete the records of a dataset through cobol programme?We should not use jcl utilitities like IDCAMS.
how to know that the file has 300 records how to acess it?
Write the code to count the sum of n natural numbers.
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
How to remove 2 duplicate records and copy only one using job control language?
What is the Purpose of POINTER Phrase in STRING command
consider the following two statements MOVE 10 TO N PERFORM PARA-X N TIMES STOP RUN PARA-X MOVE 5 TO N how many times PARA-X willbe exicuted? a.10 b.5 c.infinate d.execution error