PM73770: COBOL gen hangs for SQL with Chinese comma

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

APAR status

  • Closed as program error.

Error description

  • Headline: COBOL generation hangs for SQL statement which contain
    Chinese comma
    
    Problem: For below program,generating it into COBOL,the COBOLGen
    hangs at 49%. The SQL in below program contains Chinese comma.
    
    program CompileLoopSQL type
    BasicProgram{includeReferencedFunctions =
    yes,allowUnqualifiedItemReferences = yes,localSQLScope =
    yes,throwNrfEofExceptions = yes,handleHardIOErrors =
    no,V60ExceptionCompatibility = yes,TextLiteralDefaultIsString =
    no}
    
        TABLE_NAME char(10);
        NTHRSKHB NTHRSKHB;
    
        function main()
    NP_INQ_NTHRSKHB_LDCPL();
        end
    
    Function NP_INQ_NTHRSKHB_LDCPL()
     TABLE_NAME = 'NTHRSKHB';
     try
       get NTHRSKHB
         with #sql{
           select
    ZONENO,BRNO,SUBACCNO,ACCNO,TOPACCNO,HTACCNO,LNACCNO,AGREENO,OPEN
    BNK,OPENBIC,SUBACFLG,SUBCNFLG,OPENBNK1
    
    ,OPENBIC1,ACCFLG,CNTIOFLG,OPENBNK2,OPENBIC2,TOPACFLG,TOPCNFLG,OP
    ENBNK3,OPENBIC3,CLASS,CURRTYPE,SUBACCNAME
    
    ,ACCNAME,TOPACCNAME,ACCFLAG,WORKDATE,FLORAMT,CTRLAMTFLG,CTRLAMT,
    CTLNAMT,CTSVAMT,SEQNO,ACTDATE,MATDATE,STOPDATE,STATUS
    
    ,COLCTCYC,COLCTDAY,DISTRCYL,DISTRDAY,DISTRTYP,DISTRFRE,COLCTTYP,
    DISTRLAMT,COLCTLAMT,DISTRLMOD,COLCTLMOD,FIXFTOP
    
    ,FIXBAL,DISTRLIMIT,COLCTPRT,CICDFLAG,AGCDFLAG,CICHGFLAG,ADJFLAG,
    UNTKBACTBRN,ACCPHYBRN,ACCACTBRN,MODDATE,MODTIME
    
    ,NOTES,CASHEXF,CORPNO,BANKNO,BANKBIC,SUBMEMNO,SUBMEMNAM,AGREETYP
    E,MAINBANK,COLDAMT,DISDAMT,COLDFLAG,DAPCODE,ACCBK1,ACCBK2,ACCBK3
    ,ACCBK4,ACCBK5,ACCBK6
    
    ,ACCBK7,ACCBK8,ACCBK9,ACCBK10,ACCBK11,AUTHFLG,KHBBK1,KHBBK2,KHBB
    K3,KHBBK4,KHBBK5,KHBBK6
           from NTHRSKHB T1
           WHERE SUBACCNO = :SUBACCNO
      AND CURRTYPE = :CURRTYPE
      AND SUBACFLG = :SUBACFLG
      AND SUBCNFLG = :SUBCNFLG
      AND OPENBIC = :OPENBIC
      AND AGREETYPE = :AGREETYPE
      AND STATUS in (1,5)
         }
         into
    ZONENO,BRNO,SUBACCNO,ACCNO,TOPACCNO,HTACCNO,LNACCNO,AGREENO,OPEN
    BNK,OPENBIC,SUBACFLG,SUBCNFLG,OPENBNK1,
    
    OPENBIC1,ACCFLG,CNTIOFLG,OPENBNK2,OPENBIC2,TOPACFLG,TOPCNFLG,OPE
    NBNK3,OPENBIC3,CLASS,CURRTYPE,SUBACCNAME,
    
    ACCNAME,TOPACCNAME,ACCFLAG,WORKDATE,FLORAMT,CTRLAMTFLG,CTRLAMT,C
    TLNAMT,CTSVAMT,SEQNO,ACTDATE,MATDATE,STOPDATE,STATUS,
    
    COLCTCYC,COLCTDAY,DISTRCYL,DISTRDAY,DISTRTYP,DISTRFRE,COLCTTYP,D
    ISTRLAMT,COLCTLAMT,DISTRLMOD,COLCTLMOD,FIXFTOP,
    
    FIXBAL,DISTRLIMIT,COLCTPRT,CICDFLAG,AGCDFLAG,CICHGFLAG,ADJFLAG,U
    NTKBACTBRN,ACCPHYBRN,ACCACTBRN,MODDATE,MODTIME,
    
    NOTES,CASHEXF,CORPNO,BANKNO,BANKBIC,SUBMEMNO,SUBMEMNAM,AGREETYPE
    ,MAINBANK,COLDAMT,DISDAMT,COLDFLAG,DAPCODE,ACCBK1,ACCBK2,ACCBK3,
    ACCBK4,ACCBK5,ACCBK6,
    
    ACCBK7,ACCBK8,ACCBK9,ACCBK10,ACCBK11,AUTHFLG,KHBBK1,KHBBK2,KHBBK
    3,KHBBK4,KHBBK5,KHBBK6;
       onException NSC_DB_ERROR() ;
     end
    
    
    end
    
    function NSC_DB_ERROR()
    
    end
    
    end
    
    Record NTHRSKHB type SQLRecord
        10 ZONENO char(10);
        10 BRNO char(10);
        10 SUBACCNO char(10);
        10 ACCNO char(10);
        10 TOPACCNO char(10);
        10 HTACCNO char(10);
        10 LNACCNO char(10);
        10 AGREENO char(10);
        10 OPENBNK char(10);
        10 OPENBIC char(10);
        10 SUBACFLG char(10);
        10 SUBCNFLG char(10);
        10 OPENBNK1 char(10);
        10 OPENBIC1 char(10);
        10 ACCFLG char(10);
        10 CNTIOFLG char(10);
        10 OPENBNK2 char(10);
        10 OPENBIC2 char(10);
        10 TOPACFLG char(10);
        10 TOPCNFLG char(10);
        10 OPENBNK3 char(10);
        10 OPENBIC3 char(10);
        10 CLASS char(10);
        10 CURRTYPE char(10);
        10 SUBACCNAME char(10);
        10 ACCNAME char(10);
        10 TOPACCNAME char(10);
        10 ACCFLAG char(10);
        10 WORKDATE char(10);
        10 FLORAMT char(10);
        10 CTRLAMTFLG char(10);
        10 CTRLAMT char(10);
        10 CTLNAMT char(10);
        10 CTSVAMT char(10);
        10 SEQNO char(10);
        10 ACTDATE char(10);
        10 MATDATE char(10);
        10 STOPDATE char(10);
        10 STATUS char(10);
        10 COLCTCYC char(10);
        10 COLCTDAY char(10);
        10 DISTRCYL char(10);
        10 DISTRDAY char(10);
        10 DISTRTYP char(10);
        10 DISTRFRE char(10);
        10 COLCTTYP char(10);
        10 DISTRLAMT char(10);
        10 COLCTLAMT char(10);
        10 DISTRLMOD char(10);
        10 COLCTLMOD char(10);
        10 FIXFTOP char(10);
        10 FIXBAL char(10);
        10 DISTRLIMIT char(10);
        10 COLCTPRT char(10);
        10 CICDFLAG char(10);
        10 AGCDFLAG char(10);
        10 CICHGFLAG char(10);
        10 ADJFLAG char(10);
        10 UNTKBACTBRN char(10);
        10 ACCPHYBRN char(10);
        10 ACCACTBRN char(10);
        10 MODDATE char(10);
        10 MODTIME char(10);
        10 NOTES char(10);
        10 CASHEXF char(10);
        10 CORPNO char(10);
        10 BANKNO char(10);
        10 BANKBIC char(10);
        10 SUBMEMNO char(10);
        10 SUBMEMNAM char(10);
        10 AGREETYPE char(10);
        10 MAINBANK char(10);
        10 COLDAMT char(10);
        10 DISDAMT char(10);
        10 COLDFLAG char(10);
        10 DAPCODE char(10);
        10 ACCBK1 char(10);
        10 ACCBK2 char(10);
        10 ACCBK3 char(10);
        10 ACCBK4 char(10);
        10 ACCBK5 char(10);
        10 ACCBK6 char(10);
        10 ACCBK7 char(10);
        10 ACCBK8 char(10);
        10 ACCBK9 char(10);
        10 ACCBK10 char(10);
        10 ACCBK11 char(10);
        10 AUTHFLG char(10);
        10 KHBBK1 char(10);
        10 KHBBK2 char(10);
        10 KHBBK3 char(10);
        10 KHBBK4 char(10);
        10 KHBBK5 char(10);
        10 KHBBK6 char(10);
    end
    

Local fix

Problem summary

  • A loop could occur if trying to use an SQL statement that is
    more than 60 characters long with no spaces. The problem is that
    there is an error in the logic that breaks apart lines, and SQL
    statements with no spaces that were between 61 and 64 characters
    long fell into the faulty logic for breaking up lines, causing
    an infinite loop.
    

Problem conclusion

  • The software has been updated and a fixtest is available.
    

Temporary fix

  • Place a space in the sql text to prevent long sql lines that
    need to be broken.
    

Comments

APAR Information

  • APAR number

    PM73770

  • Reported component name

    VAGEN2RBD MIGRA

  • Reported component ID

    5724S5002

  • Reported release

    801

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-09-26

  • Closed date

    2012-12-12

  • Last modified date

    2012-12-12

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

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

Fix information

  • Fixed component name

    VAGEN2RBD MIGRA

  • Fixed component ID

    5724S5002

Applicable component levels

  • R801 PSN

       UP



Rate this page:

(0 users)Average rating

Document information


More support for:

Rational Business Developer

Software version:

8.0.1

Reference #:

PM73770

Modified date:

2012-12-12

Translate my page

Machine Translation

Content navigation