COBOL

COBOL

COBOL

COBOL is responsible for the efficient, reliable, secure, and unseen day-to-day operations of the world's economy.


#Programminglanguages
 View Only
  • 1.  INITCHECK and DECLARATIVES

    Posted 03/07/19 08:10 PM

    It looks like a IGYCB7311-W "data item may be used at this statement before it is set" is issued for any data item used as a sending item in any statement within DECLARATIVES.  This is true even if the data item is initialized with a VALUE clause.

     

    Both COBOL 5.2 and 6.2.

    fswarbrick


  • 2.  Re: INITCHECK and DECLARATIVES

    Posted 03/21/19 05:19 PM

    Hi Frank,

    Thank you for reporting this. It appears that this may have been fixed already in the September PTF UI58632. With this PTF, if your data item has a VALUE clause, it will not report it as uninitialized in a DECLARATIVE section. Please let us know if you still encounter the issue after applying the PTF.

    Regards,

    Nicole

    Nicole Trudeau


  • 3.  Re: INITCHECK and DECLARATIVES

    Posted 03/21/19 05:24 PM

    We won't have that applied until some time in May, but I will check it once we do.  Thank you.

    fswarbrick


  • 4.  Re: INITCHECK and DECLARATIVES

    Posted 05/31/19 01:18 PM

    More recent PTFs do resolve the issue as long as the data items referred to within DECLARATIVES have a VALUE clause.  This is what you stated, so I assume that means you know that setting them using a MOVE statement within the remainder of the PROCEDURE DIVISION does not eliminate this warning.  And the fact that a FILE STATUS field is implicitly set by an I-O statement prior to a DECLARATIVE section being invoked also is not enough to eliminate this warning.  Perhaps its to difficult for the optimist to recognize that the declarative procedures are only implicitly invoked after an I-O statement.

    fswarbrick