what is redefine and its syntax?
Answers were Sorted based on User's Feedback
Answer / veena
REDEFINE specifies the same memory or storage area is
refered by different data items....dat means the starting
positon of memory will b the same...
we can redefine a data item into any number of times...the
level numbers should be same..we cant redefine level numbers
66,88...
Is This Answer Correct ? | 54 Yes | 6 No |
Answer / abdul
redefine: It is used to reuse the storage space irrespective
of datatypes.That is more than one field can reuse the memory.
redefines clause can be used with level numbers
01 to 49.we redefine the fields only which have same
group,samelevelnumbers,and immediately follow the field.
Is This Answer Correct ? | 29 Yes | 4 No |
Answer / srinivas yadav
-> It is used to reuse the storage space.
example 1:
01 A PIC X(5) VALUE 'SRINU'
01 B PIC X(5).
PROCEDURE DIVISION.
MOVE A TO B.
here we need 10 bytes of memory but in case of redefines
we need only 5 bytes of memory.we can above code by using
redefines like follows
01 A PIC X(5) VALUE 'SRINU'.
01 B REDEFINES A.
-> we can use 01 to 49 level numbers only.
-> in redefines we can use picture clause where as in
renames no need to use picture clause.
-> we have two types of REDEFINES.
1) REDEFINE
2) REDEFINING FIELD.
-> The redefining field can be declared irrespective of
data types.
-> The redefining field length may be is equal,lessthan or
greater than the redefined field.
-> The redefining field should be coded with the same
level number,same group.
-> Immediately followed the redefined or group item.
-> A redefined item cannot redefined.
I think dis is enoug for redefines.
thanking u,
urs srinivas.
Is This Answer Correct ? | 14 Yes | 4 No |
Answer / venkatesh
Allows to Share the Same Main Storage Area to Refer to
Different Data Description. The Idea is to Use the Main
Storage Efficiently.
Is This Answer Correct ? | 13 Yes | 3 No |
Answer / siri
REDEFINES :- IT IS USED TO REUSE THE SPACE FROM THE FIRST BYTE
ON WORDS....
*REDEFINING AND REDEFINING FIELDS ARE MUST BE AT SAME LEVEL
NOS..
*REDEFINING THE MEMORY MUST BE SAME OR SORTER..
*SIZE OF THE REDEFINE AND REDEFINING FIELDS NEED NOT BE SAME..
*MULTIPLE REDEFINES ARE POSSIBLE....
SYNTAX :- WORKING-STORAGE SECTION.
01 A PIC X(10) VALUE'SIRIANITHA'
01 B REDEFINES A PIC X(2)
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / unknown
REDEFINE is a Cobol Verb.
It is similar to RENAME Verb.
It uses the same WORKING-STORAGE memory of a data name
With another data name programmer want instead.
Syntax.
WORKING-STORAGE SECTION.
01 WS-NAME PIC x(15).
01 WS-AGE PIC 99.
05 NAME REDIFINES WS-NAME.
Is This Answer Correct ? | 29 Yes | 63 No |
Deleting a record from a Sequential file.
What is perform?
What is sort?
How can i change the below code in SQL to cobol/400? EXEC SQL SELECT COUNT(*) INTO : WS-COUNT FROM Db file WHERE Field 1 = : WS-VAR AND Field 2 = : WS-USERID END-EXEC
What is the actual use of fillers?
what is redefine and its syntax?
Define redefine and its syntax?
What are Fillers ? What is the actual use of Fillers ? With small/simple Example..
What is comp?
Explain how to convert 2010/02/11 to m/dd/yyy.. With string and without string if any other method... Code?
How to Convert 2010/02/11 to m/dd/yyy.. with string and without string if any other method... code
WHAT ALL THE CONDITIONES REQUIRED FOR USING OPEN OPCODE ON A FILE?