Is this allowed?

01 WS-TABLE.

03 FILLER-X PIC X(5) VALUE 'AAAAA'.

03 WS-EX REDEFINES FILLER-X OCCURS 5 TIMES PIC X(1).

can redefines clause be used with occurs clause?

Answer Posted / sandy

Bob, using occurs under redefines is also possible.
example.
01 WS-REF-TABLE.
05 WS-DATA1 PIC X(8) VALUE 'TEST '.
05 WS-DATA2 PIC X(8) VALUE 'COBOL '.
01 WS-RED-TABLE REDEFINES WS-REF-TABLE.
10 WS-RED-DATA OCCURS 2 TIMES PIC X(8).

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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.

1123


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

1852


what is the use of outrecord?

1776


What is the difference between structured cobol programming and object alternativelyiented cobol?

763


How arrays can be defined in COBOL?

669






What are the different open modes available in cobol?

725


What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

685


example for sub strings ? and refernce modifications whit output pls

1852


What do you understand by psb and acb?

674


Name the divisions, which are available in a cobol program?

695


How to use the same COBOL program in Batch and CICS on lines? explain with an example

1918


How do define dynamic array in cobol.

679


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

1006


how do you reference the printer file formats from cobol programs

673


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?

899