Post #1
0 votes
Jordan
Reputation
12
Posts: 32
Joined: May 2, 2026, 11:10 AM
Posted: Jul 21, 2026, 11:48 AM
Saw REDEFINES in a record layout. Same bytes described two different ways. When is that useful and when is it a footgun?
Saw REDEFINES in a record layout. Same bytes described two different ways. When is that useful and when is it a footgun?
Useful when the same file record is type A or type B depending on a code in the header. One layout redefines the other.
Footgun when people redefine numerics as character and then do math, or forget which view is "current."
Also common for breaking a date PIC 9(8) into YYYY MM DD fields without MOVEing.
You must be signed in to reply to this thread