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 |
What kind of error is trapped by on size error option?
how to access vsam files in cobol and how to differentiate that this is ESDS file
how do u link sub pgm to main pgm ?
How to resolve the soc4 & soc7 other than following answers. Soc4 can resolved using mispleed dd name and dd name is not matching with file and soc7 check the sysdump and copy the offest address then correct it in the program.
10 Answers ADP, Amdocs, Cap Gemini, Keane India Ltd, Super Value, TCS,
how do you reference the fixed unblock file formats from cobol programs
WHY LRECL NEEDS TO BE 4 EXTRA THEN THE COBOL FILE LENGTH & WHAT IT CONTAIN IN THAT LENGTH
what are the diferences b/w sub-script and index?
i have a requrement in A as viswa!@#$%&^**reddy i need to move viswareddy in B without junk values pls say how to do ths reply fast
how do you move only numeric data from A to B 01 A pic x(10) value 'a1b2c34d5e'. 01 B pic x(5).
I have two questions here. 1. How to read a flat file in reverse order? 2. How to read a VSAM KSDS file in reverse order? In both the cases we donot know the total number of records.
COBOL Snippet: Tell where the control will when the below code execute IF (A=B) CONTINUE ELSE NEXT SENTENCE PERFORM <IMP-STMT> END-IF.
what is label record is standard or omitted in file description of data division?