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

how to refer the data field?

0 Answers  


What are different data types in cobol?

0 Answers  


can we read records in a file from botom to top. if possible how can we read

12 Answers   ACS,


How do we get current date from system with century in COBOL?

0 Answers   Winsol Solutions,


What is ASKTIME, SUSPEND

1 Answers   IBM,






What are the steps you go through while creating a COBOL program executable?

3 Answers  


How did the release of cobol/370 version 1.3 improve the performance of release 1.1?

0 Answers  


Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are the ways for doing this?

12 Answers   T systems, Tech Mahindra,


i want a program using by if, evaluate , string, unstring, perform, occurs?

1 Answers  


Can we use goto statement in inline_perform ?

5 Answers   IBM,


I need to compare two VSAM files, both having 'number' as key. If there is a matching record, write the data into another VSAM file. How will it be possible.

1 Answers   DSRC,


record length in spool?

2 Answers   Infosys,


Categories