Skip to Main Content
The Adabas & Natural Ideas Portal does not contain ideas from products ApplinX and EntireX. Please refer to the IBM Ideas Portal for these products (IBMid required).
Status Under Review
Workspace Natural for z/OS
Created by Philippe Van Coppenolle
Created on Sep 3, 2025

Use underscore in numbers as separator

This only concerns programming, not execution. And also any platform (mainframe, LUW).

When you need to code large numbers in a program, you can only use the decimal point to separate digits between the integer and fraction part.

But if you want to separate digits in e.g. the integer part, you cannot. Even if you would use a comma (or a semicolon), as it may be used during output, this is impossible, as the comma (and semicolon) serve as syntax element to separate different syntax items.

Therefore some programming languages allow the use of an underscore between the digits. E.g. the speed of light is 299,792,458 m/second or 1,079,252,848.8 km/hour. But you can only write 299792458 or 1079252848.8 in a program. Unless you could write 299_792_458 or 1_079_252_848.8 , which makes it much better readable.

Another example where numbers are even larger:

IF #X < 2251799813685248 THEN
#X := #X + 4503599627370496
END-IF

becomes

IF #X < 2_251_799_813_685_248 THEN
#X := #X + 4_503_599_627_370_496
END-IF

Use Case Any (large) number