Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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?

Answers were Sorted based on User's Feedback



Is this allowed? 01 WS-TABLE. 03 FILLER-X PIC X(5) VALUE 'AAAAA'. 03 WS-EX RED..

Answer / ankur

Yes. Redefines just causes both the fields to be started at
the same location. We can even redifine a A(100) with B
(200) and the other way round.

Is This Answer Correct ?    5 Yes 0 No

Is this allowed? 01 WS-TABLE. 03 FILLER-X PIC X(5) VALUE 'AAAAA'. 03 WS-EX RED..

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

Is this allowed? 01 WS-TABLE. 03 FILLER-X PIC X(5) VALUE 'AAAAA'. 03 WS-EX RED..

Answer / bob

Yes we can use redefine under occurs clause but we cannot
use occurs under redefine

Is This Answer Correct ?    2 Yes 1 No

Is this allowed? 01 WS-TABLE. 03 FILLER-X PIC X(5) VALUE 'AAAAA'. 03 WS-EX RED..

Answer / frankie

What is diff betn 'Occurs under Redefines' and the vice
versa?

Confused...Can you help?

Is This Answer Correct ?    0 Yes 0 No

Post New Answer



More COBOL Interview Questions

wht is the diff b/w if and evaluate stmts ?

2 Answers   DELL,


How To move a value to an array using move verb?

3 Answers   IBM,


How to define a array dynamically.....

5 Answers   Fidelity,


what is a zoned decimal data type and how it will be stored?

2 Answers   IBM,


Why we are using comp and comp-3 in real time projects?

4 Answers   IBM,






Determine the total no of bytes in the following. 01 rec1. 02 a pic x(6) 02 b redefines a. 03 c occus 6 times pic 9. 02 d occurs 6 times pic 9. 03 e pic x(5) 03 f pic 999.

12 Answers  


What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?

7 Answers   T systems,


What was removed from COBOL in the COBOL II implementation?

0 Answers  


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

0 Answers   Accenture,


01 WS-NAME PIC X(10) OCCURES 2. by this we can get ws-name 2 times. My qustion is how can we access the second name

5 Answers   TCS,


why do u need inspect verb?

3 Answers   Patni,


comp-3 field occupy?

5 Answers  






Categories