Can we use redefine clause in occurs clause?
Answers were Sorted based on User's Feedback
Answer / leroy
Answer #2 is incorrect for IBM COCOL compiler.
Answer #1 is correct but incomplete. a) "VALUE" close can
not be used in occurring fields b) Occuring fields are the
ones that will redefine other fields not the other way
round.
Example: CORRECT
01 LIT-FIELD PIC X(21) VALUE 'SUNMONTUEWEDTHUFRISAT'.
01 DAYS REDEFINES LIT-FIELDS.
05 WEEK-DAY OCCURS 7 PIC X(03).
INCORRECT:-
01 DAYS.
05 WEEK-DAY OCCURS 7 PIC X(03).
05 LIT-FIELDS REDEFINES WEEK-DAY VALUE 'SUNMONTUE.........'
| Is This Answer Correct ? | 16 Yes | 2 No |
Answer / manthan
yes........we can redefine occurs clause but not having
depending clause
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / jagadesh
not possible because memory allocation can not be
reallocated
| Is This Answer Correct ? | 4 Yes | 3 No |
Answer / john
All fine but, Nikhitha's Question has to be confirmed
first;
1. Whether a redefines can be used within an occurs (OR)
2. Whether an occurs can be redefined?
Looks like Nikhita's Question is 1, but all of your answers
were for Question 2.
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / sroul4
Redefines is just a pointer to the memory add, thus can be
done.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / saravanan
yes we can use redifines claues at level num 01... and alos
we can use both (redifine and occurs clause) together......
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / sivakumar sekharannair
Leroy's answer is correct. Redefined variable can have
occurs clause not in the same level but subordinate to the
higher level
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / subharaj
We can do that. I have done it multiple times and it works
in Enterprise Edition in mainframe.
| Is This Answer Correct ? | 0 Yes | 0 No |
TO abend the data sholud open in which mode? 1.new 2.old 3.mod 4.shr
What is amode(31)
How you can delete a record from a ps file in cobol?
What is the maximum size of a 01 level item in COBOL I? in COBOL II?
consider the following piece of code 01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50 05 AMOUNT-2 PIC 9(4)V99 USAGE COMP MOVE ZERO TO GROUP-ITEM ADD 50 TO AMOUNT-1 what will be the content of AMOUNT-1? a.50 b.100 c.0 d.unpredictable
What is the difference between a binary search and a sequential search what are the pertinent cobol?
db2 variable decimal(15,2) what is the equalent size of cobol variable
When is inspect verb is used in cobol?
If I want to increase the Limit in GDG. What should I do?
whn do i get soc7 abend while moving alphanumeric to numeric or while moving numeric to aplhanumeric please reply ASAP?
What is XDC ?
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.