Can we use redefine clause in occurs clause?

Answers were Sorted based on User's Feedback



Can we use redefine clause in occurs clause?..

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

Can we use redefine clause in occurs clause?..

Answer / manthan

yes........we can redefine occurs clause but not having
depending clause

Is This Answer Correct ?    6 Yes 1 No

Can we use redefine clause in occurs clause?..

Answer / jagadesh

not possible because memory allocation can not be
reallocated

Is This Answer Correct ?    4 Yes 3 No

Can we use redefine clause in occurs clause?..

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

Can we use redefine clause in occurs clause?..

Answer / sroul4

Redefines is just a pointer to the memory add, thus can be
done.

Is This Answer Correct ?    1 Yes 0 No

Can we use redefine clause in occurs clause?..

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

Can we use redefine clause in occurs clause?..

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

Can we use redefine clause in occurs clause?..

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

Can we use redefine clause in occurs clause?..

Answer / srinivasulu

no no no no no anyone can bet on this

Is This Answer Correct ?    1 Yes 2 No

Can we use redefine clause in occurs clause?..

Answer / saravanan

answer from leroy is exactly correct ......

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More COBOL Interview Questions

created cluster using IDCAMS ..that is empty ..when i write a program for read using Input ..wil it open the cluster or gives any error?

2 Answers   HCL,


Can we change the password using ALTER? anyone tried and changed?

0 Answers   IBM,


sample code for read a 2nd record from last in flatfile how can do?

4 Answers   iNautix,


Can we put move statement in COBOL copybook

3 Answers   Global Logic,


how to refer the data field?

0 Answers  






what is the meaning of pic 9(09)v99-

4 Answers   HSBC,


What is the difference between CONTINUE & NEXT SENTENCE ?

2 Answers  


if we have a 10 steps how to override the 4th step in jcl?

2 Answers   Hewitt,


How can we pass data from cobol to JCl?

7 Answers   ADP, Amdocs, IBM,


here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?

2 Answers   IBM,


1.What is the limit of linkage section?

4 Answers  


what is redefines? where it can be effectively use for the purpose of memory utilization? give an example?

4 Answers   IBM,


Categories