Can we use redefine clause in occurs clause?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?

1949


What are 77 levels used for?

661


How do u write test cases?

1640


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

676


how to access the file from prodution from changeman tool and to submit a file to production

6686






what happens if parmparameter passes zero bytes to the program

1667


What is redefines clause in COBOL?

851


What are the various section in data division and briefly explain them.

700


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

425


1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

1616


Explain what you understand by passing by value.

704


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1908


i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?

897


In which area will you utilize 88 level items in cobol?

724


Write down the divisions of cobol program?

671