IBM Support

PH12359: SQL group host variable reference error

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • PMR 15791-830-758: SQL group host variable reference error
    
    Date reported: 2019/2019
    -------------
    
    Prereqs: All PTFs to date
    -------
    
    Severity: High
    --------
    
    This APAR includes the following PMR fixes:
    1. PMR 15791-830-758 SQL group host variable reference error
    
    2. PMR 15791-830-758 SQLABEND=(&modname)  EZPARAMS/EASYTRAN
                          option.
    
    3. Retrofit for PMR 63105,612,760 K (DBCS) fields VALUE
       cannot contain x'7d' (quote) The above PMR was built for
       Japan's version of IMU V4.1.
    
       The changes for this PMR are required in the current
       level of IMU V4.1.
    
    4. A leftover change for Easytrieve Classic issues:
       (There is no logic change)
    
    
    Users Affected:
    --------------
    All IMU V4.1 users who translate programs with the PARM
    BIND(STATIC) option.
    
    
    Problem Description:
    -------------------
    DB2 SQL Translator is failing to translate SQL Statements in
    the generated COBOL CODE.
    
    The following message is issued:
    
    IGYPS0212-S   SQL host variable reference "&VARNAME" had
    invalid syntax or the referenced host variable was an invalid
    SQL variable type.  The statement was discarded.
    
                     or
    
    GYDS0226-E   DSNH312I DSNHPARS  UNDEFINED OR UNUSABLE HOST
    VARIABLE "&VARNAME"
    
    
    Problem Summation:
    -----------------
    DB2 SQL Translator is failing because host variables in the
    program are defined as group items.
    
    The resulting generated definition is not suatable for SQL
    reference. For example:
    
       Easytrieve Plus definition:
           WS-CODES         W      20 A
              WS-CODE1 WS-CODES          3 A
              WS-CODE2 WS-CODES      +3  4 A
    
       Generates the following COBOL definition:
           02 WS-CODES-GQnnn              PIC X(20).
           02 WS-CODES       REDEFINES WS-CODES-GQnnn.
              03 WS-CODE1               PIC X(3).
              03 WS-CODE2               PIC X(4).
              03 FILLER                 PIC X(13).
    
    SQL translator fails to translate because, WS-CODES field is
    a group item.
    
    
    Problem Conclusion:
    ------------------
    The translator (EASYT007 macro) was changed to generate the
    group field as an elementary data item so that it qualifies
    for SQL calls as required by DB2.  The elementary definition
    is forced only for host variables defined as group items.
    
    For example:
    
       Easytrieve Plus definition:
           WS-CODES         W      20 A
              WS-CODE1 WS-CODES          3 A
              WS-CODE2 WS-CODES      +3  4 A
    
       Generates the following COBOL definition:
           02 WS-CODES               PIC X(20).
           02 WS-CODES-GQnnn REDEFINES WS-CODES.
              03 WS-CODE1               PIC X(3).
              03 WS-CODE2               PIC X(4).
              03 FILLER                 PIC X(13).
    
    SQL translator translates correctly because, WS-CODES field
    is an elementary item.
    
    
    Special Installation Instructions:
    ---------------------------------
    1. APPLY the APAR as usual.
    2. Re-translate programs in error.
    
    No changes are necessary to Easytrieve Plus source. Run programs
    as usual.
    
    
    Changed modules:
    ------------------------------
    FSOFT01.V4R1M0.SFSYCCLC
         FSYEZTRV - Existing file
    
    FSOFT01.V4R1M0.SFSYLOAD
    Note: These names are aliases of FSY* names in the distribution
          libraries.
         FSCCOBOL - Existing load module
         FSCCOB31 - Existing load module
         XXCCOBOL - Existing load module
         FSCASSEM - Existing load module
    
    FSOFT01.V4R1M0.SFSYFJCC
    Note: These names are aliases of FSY* names in the distribution
          libraries.
         EASYTRAN  - existing macro
         EASYOVRD  - existing macro
         DEFINE    - existing macro
         EASYT007  - existing macro
         EZTRV001  - EXISTING MACRO
    ================================================================
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: All IMU V4.1 users who translate programs    *
    *                 with the PARM BIND(STATIC) option.           *
    ****************************************************************
    * PROBLEM DESCRIPTION: The following message is issued:        *
    *                                                              *
    *                      IGYPS0212-S   SQL host variable         *
    *                      reference "&VARNAME" had                *
    *                      invalid syntax or the referenced        *
    *                      host variable was an invalid            *
    *                      SQL variable type.  The statement       *
    *                      was discarded.                          *
    *                                                              *
    *                                       or                     *
    *                                                              *
    *                      GYDS0226-E   DSNH312I DSNHPARS          *
    *                      UNDEFINED OR UNUSABLE HOST              *
    *                      VARIABLE "&VARNAME"                     *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    DB2 SQL Translator is failing because host variables in the
    program are defined as group items.
    
    The resulting generated definition is not suatable for SQL
    reference. For example:
    
       Easytrieve Plus definition:
           WS-CODES         W      20 A
              WS-CODE1 WS-CODES          3 A
              WS-CODE2 WS-CODES      +3  4 A
    
       Generates the following COBOL definition:
           02 WS-CODES-GQnnn              PIC X(20).
           02 WS-CODES       REDEFINES WS-CODES-GQnnn.
              03 WS-CODE1               PIC X(3).
              03 WS-CODE2               PIC X(4).
              03 FILLER                 PIC X(13).
    
    SQL translator fails to translate because, WS-CODES field is
    a group item.
    

Problem conclusion

  • The translator (EASYT007 macro) was changed to generate the
    group field as an elementary data item so that it qualifies
    for SQL calls as required by DB2.  The elementary definition
    is forced only for host variables defined as group items.
    
    For example:
    
       Easytrieve Plus definition:
           WS-CODES         W      20 A
              WS-CODE1 WS-CODES          3 A
              WS-CODE2 WS-CODES      +3  4 A
    
       Generates the following COBOL definition:
           02 WS-CODES               PIC X(20).
           02 WS-CODES-GQnnn REDEFINES WS-CODES.
              03 WS-CODE1               PIC X(3).
              03 WS-CODE2               PIC X(4).
              03 FILLER                 PIC X(13).
    
    SQL translator translates correctly because, WS-CODES field
    is an elementary item.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH12359

  • Reported component name

    MIGRATION UTILI

  • Reported component ID

    5697N4400

  • Reported release

    410

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-05-22

  • Closed date

    2019-07-26

  • Last modified date

    2019-08-01

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

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

    UI64470

Modules/Macros

  •    FSYASSEM FSYCCBOL FSYCCB31 FSYDFINE FSYESORD
    FSYETRAN FSYET001 FSYET007 FSYEZTRV FSYXCOBO
    

Fix information

  • Fixed component name

    MIGRATION UTILI

  • Fixed component ID

    5697N4400

Applicable component levels

  • R410 PSY UI64470

       UP19/07/31 P F907

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.

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSY4B9","label":"IBM Migration Utility for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"410","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
27 October 2020