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

IBM1216: incorrect structure declares

Similarly, consider the following declare:

   DCL
     1 S,
       2 A    CHAR(10),
       2 B,
         2 C  CHAR(3),
         2 D  CHAR(3);

The older compilers would produce no message for this declare. However, the new compiler will produce the message:

  IBM1216I W  The structure member B is declared without any data
              attributes. A level number may be incorrect.

This message is pointing at some probable errors in the declare, namely that C and D should be declared at level 3 rather than level 2. But given the declare above, since they are at the same structure level as B, B is not their parent and gets the default attributes of FLOAT! This is almost certainly not what you intended, and this new message is directing your attention to this likely problem.

The compiler also issued this message for the following customer code:

          DCL PARDIASE CHAR (20);
          DCL 1 INDIASE1 BASED (PTPDIASE),
               2 C1CODIA CHAR      (1),
               2 C1FECDI DEC FIXED (9),
               2 C1DIADI CHAR (9),
               2 C1ABRDI CHAR (3),
               2 C1RESDI;
          DCL PTPDIASE POINTER;
          PTPDIASE = ADDR (PARDIASE);
          . . .
          INDIASE1 = '';

The message flags the fact that the variable C1RESDI is declared with out any data attributes. Hence it gets the default attributes of FLOAT DEC(6), and that means that the structure INDIASE1 then occupies 22 bytes. But since the structure is based on a pointer that has been assigned the address of a CHAR(20) field, the assignment INDIASE1 = ’’; will blank out 2 bytes of storage used by some other variable. In the customer’s code this led to an abend in a library routine. Note that f C1RESDI had been declared as CHAR(2) or even as CHAR(0) (and CHAR(0) is legitimate PL/I), then there would have been no problem.

So, even though this message, like many of the other messages discussed in this chapter, is not an E-level message, it would be very good to change your code so that your compilation is free of this message.


Terms of use | Feedback

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