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

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

5555


Name some of the examples of COBOl 11?

2684


i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc

2105


What is comp-1 and comp-2?

764


How to print 10 to 1 if the input have only 10 digit number?

811






Give some examples of command terminators?

757


how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)

1931


here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?

6829


What is the default value(s) for an initialize and what keyword allows for an override of the default?

695


What is the difference between perform … with test after and perform … with test before?

881


What is the usage of comp fields in cobol?

658


Why would you use find and get rather than to obtain?

683


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

1914


How to remove 2 duplicate records and copy only one using job control language?

753


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

698