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 get the data to code the BMS macro?

1476


Which Search verb is equivalent to PERFORM…VARYING?

685


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

1115


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

5555


I have a File that has duplicate records. I need only those records that occur more than thrice.?

8652






i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

996


What is a SSRANGE and NOSSRANGE?

820


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

855


What happens when we move a comp-3 field to an edited (say z (9). Zz-)?

777


Write a program to explain size error.

675


How do define dynamic array in cobol.

671


A table has two indexes defined. Which one will be used by the SEARCH?

757


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

1936


How you can characterize tables in cobol?

716


Write a program that uses move corresponding.

673