Can a REDEFINES clause be used along with an OCCURS clause?
if yes,
01 WS-TABLE.

03 WS-TABLE-EL OCCURS 5 TIMES PIC X(1) VALUE 'A'.

03 WS-EX REDEFINES WS-TABLE-EL PIC X(5). What can you
expect?
if no,why?


Answer Posted / anoop

It is possible to use redefine class along with OCCURS
class, but you cannot redefine a table directly. So the
above code wont work.

01 ws-table
03 ws-table-el redefines ws-ex occurs 5 times pic x(1).

This is valid one.

Is This Answer Correct ?    3 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how do you reference the variable block file formats from cobol programs

670


What is report-item in COBOL?

702


What is the difference between external and global variables in COBOL?

804


Why did you choose to work with ibm mainframe cobol programming?

619


what is search and searchall?what is the diffrence between them?give an best example?

5521






Name the sections present in data division.

691


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

846


What is the difference between PIC 9.99 and 9v99 in COBOL?

725


What are the different rules of SORT operation?

689


Can we redefine the field of x(200) to less than 200?

805


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

402


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

1915


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

619


Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.

1691


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

724