Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Migration Guide

IBM2402: storage overlay

This message alerts you to a potentially important coding error:

  IBM2402I E  <variable x> is declared as BASED on the ADDR of <variable y>,
              but <variable x> requires more storage tha <variable y>.

The importance of this message depends on how the variables are used in your program. For instance, if X is a 100-byte structure and Y is declared as CHAR(200) BASED(ADDR(X)), then the compiler will issue this message. If your program also contains the statement Y = ’’, then you have a severe problem (because that assignment will wipe out 100 bytes of storage that the compiler is likely to be using for other purposes). You must correct this kind of problem.

However, your program might use Y only in the statements such as:

In this case, your code does not need to be changed.

However, in this case, you could change the declare of Y to eliminate these messages: if you declare Y after X, you could then declare Y as CHAR(STG(X)) BASED(ADDR(X)). This would eliminate this occurrence of the message without your having to make any changes to your code. But, if you wanted, you could also then simplify the above assignment statements to:


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)