Explain about Redefines cluse?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
how do you reference the rrds file formats from cobol programs
consider the following piece of code 01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50 05 AMOUNT-2 PIC 9(4)V99 USAGE COMP MOVE ZERO TO GROUP-ITEM ADD 50 TO AMOUNT-1 what will be the content of AMOUNT-1? a.50 b.100 c.0 d.unpredictable
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.
What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I am going to Display the WS-VARX and WS- VARN?
How do define Dymanic array in cobol how do u define single demensional arry and multidymensional arry in ur cobol.
The hierarchy of the execution of logical operators is (a) NOT AND OR (b) AND OR NOT (c) OR AND NOT (d) OR NOT AND
10 Answers Huawei, IBM, TCS,
How can we know that cobol program is using report file or simple file....?
What are the different forms of EVALUATE statement?
what is the basic concept of mainframe? what knowledge is needed for learn this mainframe?
What are differences between COBOL and java ? why we are giving more preference to COBOL ?
plz,could any one tell me? what about EBCDIC in cobol?briefly?
Why IBM?