HP COBOL II/XL Quick Reference Guide (31500-90015)

E- 6
The INTEGER-OF-DAY function converts a date in the Gregorian calendar
from Julian date form (YYYYDDD) to integer date form. The function type
is integer.
Syntax
FUNCTION INTEGER-OF-DAY (
parameter-1
)
Parameters
parameter-1
Must be an integer of the form YYYYDDD, whose value
is obtained as follows:
(YYYY * 1000) + DDD
where YYYY represents the year in the Gregorian
calendar and must be an integer greater than 1600.
DDD represents the day of the year and must be a
positive integer less than 367. DDD must be valid
for the year specified.
INTEGER-PART
The INTEGER-PART function returns an integer that is the integer portion
of
parameter-1
(
parameter-1
is truncated). The function type is integer.
Syntax
FUNCTION INTEGER-PART (
parameter-1
)
Parameters
parameter-1
Must be class numeric.
LENGTH
The LENGTH function returns an integer equal to the length of the
argument in character positions (bytes). To conform to ANSI
standard COBOL, you can use the LENGTH function instead of the .LEN.
pseudo-intrinsic. The function type is integer.
Syntax
FUNCTION LENGTH (
parameter-1
)
Parameters
parameter-1
A nonnumeric literal or a data item of any class or
category.
If
parameter-1
or any data item subordinate to
parameter-1
is described with the DEPENDING phrase
of the OCCURS clause, the contents of the data item
referenced by the data-name specified in the
DEPENDING phrase are used at the time the LENGTH
function is evaluated.