ILBOCVB

ILBOCVB is a COBOL library routine called by the UNSTRING verb in a COBOL program, or by the following subroutines: ILBOUST, ILBOINS, and ILBOSTG. ILBOCVB converts display numeric data items (defined as USAGE DISP in Working Storage), and pack decimal data items (defined as USAGE COMP-3) to binary and converts binary numbers back to external or internal decimal numbers.

Hints

When an arithmetic calculation is performed on data items, most of the time these items must be converted to binary. This could cause excessive CPU time. Defining data items in working storage as binary can eliminate unnecessary CPU consumption. When defining a data item in working storage, the default is USAGE DISP. This isn't always efficient, especially if the item is used in a mathematical calculation, because it requires the item to be converted to binary each time the calculation is performed.

There are situations when it is necessary for a data item to be used in calculations and for display on the screen. In this case the CPU consumption used in converting the item to binary and back to display is unavoidable. However, if the item is used for internal calculations only, defining it in working storage as COMP-3 (Packed Decimal) or COMP (Binary) could decrease CPU consumption.