Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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?


Answers were Sorted based on User's Feedback



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

Answer / guest

Hi All,

The following combinations are possible with REDEFINES and
OCCURS clause.

1.Variable at level 01 can be redefined.
2.VALUE clause cannot be used along with the REDEFINES
clause.
3.Variable having OCCURS clause cannot be REDEFINED.
4.Variable at level 01 cannot have OCCURS clause.

Please correct if any of the above points are wrong.

Is This Answer Correct ?    7 Yes 1 No

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

Answer / vikas sharma

This clause work as when u have define this another 01 level..
We can not define like this...

Is This Answer Correct ?    1 Yes 2 No

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

Answer / vikas sharma

Yes, We Can.
In this question, When we display WS-EX we will get the
answer 5 times A. Like this AAAAA .

Is This Answer Correct ?    0 Yes 2 No

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

Answer / v@m$i

REDEFINES IS NOT USED IN OCCURS CLAUSE.

Is This Answer Correct ?    0 Yes 2 No

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

Answer / sunil

This works on MF-COBOL

Display WS-EX will display AAAAA

Is This Answer Correct ?    1 Yes 4 No

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

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

More COBOL Interview Questions

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

0 Answers   Accenture,


What is an in line PERFORM? When would you use it? Anything else to say about it?

4 Answers  


OCCURS clause is used in the DATA DIVISION on data names at (a) 01 level (b) 77 level (c) 88 level (d) any level from 02 to 49

13 Answers   TCS,


1)what is the maximum limit for occurs? Eg: 01 A PIC X(10) OCCURS N TIME. What is the max value for N?

11 Answers   Wipro,


whats the disadvantage of search all over search?

4 Answers   Patni, TCS,


Mention the guidelines to write a structured cobol program?

0 Answers  


What is level 66 used for ?

3 Answers   TCS,


01 MOVE 10 TO N 05 PERFOM PARA1 TIMES STOP RUN WAT WILL HAPPEN?? WILL IT RUN INFINITELY OR AN ERROR WIL BE THER BECAUSE NO OF TIMES IS NOT GIVEN??

1 Answers  


in the TIME parameter we r giving hours r minutes

4 Answers   IBM,


I have a cobol program with a sub program. How ca i find that it is a dynamic call? or static call..?

3 Answers   HCL, IBM,


what is scope terminator

2 Answers   IBM,


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

3 Answers   IBM, Wipro,


Categories