IBM Support

PH37813: DSECT UTILITY MISSING ORG STATEMENT CAUSING INCORRECT STRUCT

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When using the NOLEG/NOLEGACY option with the DSECT Utility, an
    incorrect C struct is generated.  The struct contains additional
    members after the expected end of the struct.
    
    
       === EXAMPLE ===
    
    MY_DSECT              DSECT
    
                          ORG  MY_SECTION
    VALUE1                DS   AL2
    VALUE2                DS   X
    A_LENGTH              EQU  X'80'
                          DS   X
                          ORG  ,
    
    STORE1                DS   F
    STORE2                DS   F
    
    ------------------------------------------------
    
    CORRECT:
    
        struct {
          unsigned short _VALUE1;
          unsigned char  _VALUE2;
          unsigned char  _filler15;
          } _MY_DSECT_struct8;
    
    ------------------------------------------------
    
    INCORRECT:
    
        struct {
          unsigned short _VALUE1;
          unsigned char  _VALUE2;
          unsigned char  _filler15;
          int            ;
          int            _STORE2;     // SHOULD NOT BE IN THE STRUCT
          } _MY_DSECT_struct8;
    

Local fix

  • Do not use NOLEG
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: DSECT utility users when NOLEG default       *
    *                 option starting with z/OSV2R3 release is     *
    *                 used together with `ORG ,` HLASM             *
    *                 instruction.                                 *
    ****************************************************************
    * PROBLEM DESCRIPTION: The DC/DS fields following `ORG ,` are  *
    *                      generated as members of the current     *
    *                      nested C struct as apposed to members   *
    *                      of the immediate outer c struct. See    *
    *                      `_FIELD_N`, in the expected DSECT       *
    *                      utility output:                         *
    *                                                              *
    *                      struct ABC {                            *
    *                        ...                                   *
    *                        union {                               *
    *                          int _SECTION;                       *
    *                          ...                                 *
    *                          struct {                            *
    *                            short _SUB_FIELD_1;               *
    *                            ...                               *
    *                            } _ABC_struct8;                   *
    *                          } _FDE_nion1;                       *
    *                        short _FIELD_N;                       *
    *                        ...                                   *
    *                        };                                    *
    ****************************************************************
    * RECOMMENDATION: Install the PTF.                             *
    ****************************************************************
    N/A
    

Problem conclusion

  • The solution was to terminate nested C struct as soon as non-
    zero duplicated DC/DS field is encountered which spans beyond
    the end of the current C struct.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH37813

  • Reported component name

    C/C++ FOR MVS

  • Reported component ID

    56551210A

  • Reported release

    7B0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-06-02

  • Closed date

    2021-09-08

  • Last modified date

    2021-10-01

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    PH39787

Modules/Macros

  • CCNECICS CCNECWI  CCNED230 CCNEDSCT CCNEDWRT CCNEFILT CCNEHIFC
    CCNEIPA3 CCNEIPAO CCNEMDEP CCNEOPTP CCNEP    CCNEPP   CCNETBY
    CCNMSGE  CCNMSGT  CCNQIPA
    

Fix information

  • Fixed component name

    C/C++ FOR MVS

  • Fixed component ID

    56551210A

Applicable component levels

  • R7B0 PSY UI77052

       UP21/09/29 P F109

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.

[{"Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSTLTF","label":"z\/OS XL C\/C++"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7B0"}]

Document Information

Modified date:
02 October 2021