Different Length Redefinitions
Question: I have a variable(REC1) which is defined as CHAR(1016). And I
second variable(REC2) defined "BASED" on REC1. But the length is of REC2
is greater (i.e. 1020) than REC1. So how two define these variables using
pointers in PL/1.
ravi
Answer: Whenever you access the longer record you will be destroying the content of whatever field that is using that adjacent memory space. Depending on just exactly what that part of memory contains the result could vary between having no apparent effect and causing totally unexpected results in some unrelated part of the program that was using that memory for something else entirely.


