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 |
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
what modification we need to do in jcl if we use sort in cobol? I mean whether we need to include tempary file used for sorting in assign statement?
How to open and see copy book ?
I have a seq file with different fields one field is address with pic x(50) as input in a cobol program. In address there is 'PUNE' at any different positions in the address field ( form 1 t0 50) . My requirement is select the fields with address 'PUNE' by using cobol. Please suggest
COMPUTE X = A * B - C * D and COMPUTE X = (A * B) - (C * D) (a) Are not the same (b) Are same (c) Syntactically wrong (d) Will yield a run time error
is it possible to rename 01 level?
what is filler and what is use of filler
how do you reference the esds vsam file formats from cobol programs
What compiler option would you use for dynamic linking?
What is Static,Dynamic linking ?
what is the use of filler in cobol programing?
What is SDSF?