Explain about Redefines cluse?

Answers were Sorted based on User's Feedback



Explain about Redefines cluse?..

Answer / amit barwa

REDEFINES Clause
Facilitates two or more data-names to point to the same
memory location
e.g.

01 WS-NUM1 PIC X(1)

01 WS-NUM2 REDEFINES WS-NUM1 PIC X(2).

If you MOVE '10' to WS-NUM2,

DISPLAY WS-NUM1 will show 1 while

DISPLAY WS-NUM2 will show 10.

Is This Answer Correct ?    7 Yes 0 No

Explain about Redefines cluse?..

Answer / avinanda mukherjee

If the example is-

01 WS-NUM1 PIC 9(1)

01 WS-NUM2 REDEFINES WS-NUM1 PIC X(2).

If you MOVE '10' to WS-NUM2,

DISPLAY WS-NUM1 will show 0 (Numeric) while

DISPLAY WS-NUM2 will show 10 (charecter).

Is This Answer Correct ?    5 Yes 1 No

Explain about Redefines cluse?..

Answer / mallappa

Redfeines Clause allows you to use a same memory area.
Ex:
01 var.
02 ws-date pic x(10).
02 ws-date1 Redefines ws-date
03 ws-day pic x(2).
03 ws-month pic x(2).
03 ws-month pic x(8).

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More COBOL Interview Questions

For rewrite, why is it mandatory that file needs to be opened?

0 Answers  


which one is the best of com and com-3.using of real time ?

7 Answers   Cap Gemini,


a pic s9(4) comp b pic s9(4) comp-3 c ???????????????? d ???????????????? move a to c add a+B giving d. what is ur declaration for c,d?

4 Answers  


How do u initialize an array?

2 Answers   CTS,


What is "Call by content" and "call by reference"?

4 Answers   ADP, Syntel,






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

4 Answers   IBM,


What is the difference between external and global variables in COBOL?

0 Answers   Winsol Solutions,


Did anybody attend the walkin of TCS on 31st July in Gurgaon for any technology,If u have completed 3 round i.e till the HR round,have u received the Offer letter yet? Please let me know.Thanks.

1 Answers  


HOW WE WILL SORT THE ARRAY WHICH IS GOING TO USE FOR SEARCH ALL?

2 Answers   Cap Gemini,


how we rectify soc4 and soc7 error in project(need real time answer)? please reply

3 Answers   HCL, Wipro,


What is diff betn PS and ESDS file? What is the diffrent compiler options in cobol and there discription? What is retrive nth maximum salary from salary DB2 table. Can we redefine COM-3 variable with varchar variable?

4 Answers  


How to read the last 100 records from a COBOL file. The file contains N number of records.

11 Answers   IBM,


Categories