COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
Example 182 ATAN Function
Code:
DATA DIVISION.
WORKING-STORAGE SECTION.
01 A PICTURE S9V99.
PROCEDURE DIVISION.
MOVE FUNCTION ATAN (-10) TO A.
DISPLAY A.
MOVE FUNCTION ATAN (0) TO A.
DISPLAY A.
MOVE FUNCTION ATAN (.25) TO A.
DISPLAY A.
MOVE FUNCTION ATAN (15.5) TO A.
DISPLAY A.
MOVE FUNCTION ATAN (45) TO A.
DISPLAY A.
Output:
-1.47
0.00
0.24
1.50
1.54
CHAR Function
CHAR, an alphanumeric function, returns a character whose ordinal number in the program collating
sequence is the value of its argument.
argument
is an integer greater than zero and less than or equal to n, where n is the number of positions
in the program collating sequence.
If more than one character has the same position in the program collating sequence, the returned
character is the first character that the ALPHABET clause specifies for that character position. If the
current program collating sequence was not specified by an ALPHABET clause, HP COBOL uses
the ASCII program collating sequence.
662 Intrinsic Functions










