Manipulating dates and times

To invoke a date or time callable service, use a CALL statement with the correct parameters for that service. You define the data items for the CALL statement in the DATA DIVISION with the data definitions required by that service.

77  argument          pic  s9(9)  comp.
01  format.
    05 format-length  pic  s9(4)  comp.
    05 format-string  pic  x(80).
77  result            pic  x(80).
77  feedback-code     pic  x(12)  display.
. . .
    CALL "CEEDATE" using argument, format, result, feedback-code.

In the example above, the callable service CEEDATE converts a number that represents a Lilian date in the data item argument to a date in character format, which is written to the data item result. The picture string contained in the data item format controls the format of the conversion. Information about the success or failure of the call is returned in the data item feedback-code.

In the CALL statements that you use to invoke the date and time callable services, you must use a literal for the program-name rather than an identifier.

A program calls the date and time callable services by using the standard system linkage convention.

Example: manipulating dates

related concepts  
Date and time callable services

related references  
Feedback token  
Picture character terms and strings  
CALL statement (COBOL for AIX Language Reference)