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

Invalid allocations

Under the old compilers, the following piece of code "worked":

    dcl vdptr  pointer;
    dcl vdcom  char(2000) based(vdptr);

    dcl
      1 vdcommarea based(addr(vdcom)),
        2 vda  char(1000),
        2 vdb  char(1000),
        2 vdz  char(1);

    alloc vdcom;

    vdcommarea = '';

This code is not valid PL/I code because you must not use a 2001 byte area to overlay a 2000 byte allocated piece of storage. By luck, this "worked" under the OS PL/I V2R3 run-time, but under the Language Environment run-time, this code fails miserably.


Terms of use | Feedback

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