COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
Example 204 MOD Function
Code:
DISPLAY FUNCTION MOD (11 5)
DISPLAY FUNCTION MOD (-11 5)
DISPLAY FUNCTION MOD (11 -5)
DISPLAY FUNCTION MOD (-11 -5)
Output:
00001
00004
-00004
-00001
NUMVAL Function
NUMVAL, a numeric function, returns the numeric value represented by its argument, which is a
character-string. NUMVAL ignores leading and trailing spaces.
string
sp
is a string of zero or more space characters.
number
If the program contains the DECIMAL POINT COMMA phrase in the SPECIAL-NAMES
paragraph, use a comma instead of a decimal point in number.
digits
is a string of one to 18 digits. The total number of digits in string cannot exceed 18.
The returned value is the numeric value represented by string. The format of the value depends
on the size of string. If the length of string is fewer than 10 characters, the equivalent PICTURE
NUMVAL Function 679










