IBM Z and LinuxONE Languages

Languages

Languages

Broad range of supported development languages and tools allows to transform software delivery practices.

 View Only
  • 1.  Overflow Detection Utility

    Posted Tue February 13, 2024 03:44 PM

    United States inflation is causing more financial programs written in COBOL to overflow.   Is there a utility for detecting an 'ON SIZE ERROR" condition without adding the code to the programs and recompiling?  Unfortunately, US inflation is causing another situation similar to Y2K.    The utility would help to identify programs requiring necessary changes without having to add 'ON SIZE ERROR' to every arithmetic statement.  Unfortunately, many older programs are truncating results.   Could this be a possible enhancement to an existing utility such as ADO or a scanner/parser utility?



    ------------------------------
    Patrick Cribbs
    ------------------------------


  • 2.  RE: Overflow Detection Utility

    Posted Wed February 14, 2024 03:13 AM
    Edited by Denis FALLAI Wed February 14, 2024 03:17 AM

    Hi,

    Instead of « ON SIZE ERROR » on every arithmetic statement, a solution could be to implement in IBM Entreprise COBOL compiler the exception management as described in ISO standard. 

    A compilation option could activate globally exception management for any cases or for a subset of cases, like overflow or the >>TURN exception CHECKING ON|OFF. 

    Exception equivalent for ON SIZE ERROR are E-SIZE-OVERFLOW and EC-SIZE-UNDERFLOW. 

    Exception can be managed by DECLARATIVES and USE AFTER EXCEPTION CONDITION exception-name. 



    ------------------------------
    Denis FALLAI
    BPCE SI, BPCE group.
    ------------------------------