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 does the INITIALIZE verb do?
Can we dynamically increase the size of occurs clause? i.e In case I an not sure of the size of array and want to increase the size at run time.If yes , how?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
How to increase the logical record length of existing PS file?
What is report-item?
how can we fetch 3 records in cobol pgm any coding pls ?
What are the differences between OS VS COBOL and VS COBOL II?
what is the difference b/w level no.01 & level no.77?
01 A pic 9(100) find record length of it
A cobol program to read a file , match it with other if. If match occurs then write it to an output file. If no match then no need to write it.Error log created by program to track any error.
Minimum how many Number of Paragraphs are there in ID- Divison?
I have two files , file1 is input file it contains 10,20,30,....,records but i want to display the records in file 2 as reverse order .how can we do by using jcl& cobol(dont use array) please any one can tell me the answer