-
Difference between normally dividing fields and with redefines
what is the difference between normally dividing fields and with redefines?
ie 05 name.
10 f-name pic x(5).
10 l-name pic x(5).
and
05 name pic x(10).
05 name-r redefines name.
10 f-name pic x(5).
10 l-name pic x(5).
Question askec by visitor praveen naik
-
Contributing Member
Re: Difference between normally dividing fields and with redefines
In the first example, you are forced to hardcode both vars.
In the second, you can use the one var to represent both vars.
In such a small example, there's little benefit. But when you work with a REDEFINES having many fields, it saves a lot of coding and processor time.
Another use is dynamically mapping macros to getmain'd storage in the linkage section. In this case, there's no other way of referring to the entire getmain'd area.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules