CEESCEN sets the century window to a two-digit year value for use by other date and time callable services.
Use CEESCEN in conjunction with CEEDAYS or CEESECS when:
To query the century window, use CEEQCEN.
| CALL CEESCEN syntax |
|---|
|
A value of 80, for example, places all two-digit years within the 100-year window that starts 80 years before the system date. In 2008, therefore, all two-digit years are assumed to represent dates between 1928 and 2027, inclusive.
| Symbolic feedback code | Severity | Message number | Message text |
|---|---|---|---|
| CEE000 | 0 | — | The service completed successfully. |
| CEE2E6 | 3 | 2502 | The UTC/GMT was not available from the system. |
| CEE2F5 | 3 | 2533 | The value passed to CEESCEN was not between 0 and 100. |
CBL LIB
**************************************************
** **
** Function: Call CEESCEN to set the **
** date and time callable services **
** century window **
** **
** In this example, CEESCEN is called to change **
** the start of the century window to 30 years **
** before the system date. CEEQCEN is then **
** called to query that the change made. A **
** message that this has been done is then **
** displayed. **
** **
**************************************************
IDENTIFICATION DIVISION.
PROGRAM-ID. CBLSCEN.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 STARTCW PIC S9(9) BINARY.
01 FC.
02 Condition-Token-Value.
COPY CEEIGZCT.
03 Case-1-Condition-ID.
04 Severity PIC S9(4) COMP.
04 Msg-No PIC S9(4) COMP.
03 Case-2-Condition-ID
REDEFINES Case-1-Condition-ID.
04 Class-Code PIC S9(4) COMP.
04 Cause-Code PIC S9(4) COMP.
03 Case-Sev-Ctl PIC X.
03 Facility-ID PIC XXX.
02 I-S-Info PIC S9(9) COMP.
PROCEDURE DIVISION.
PARA-CBLSCEN.
**************************************************
** Specify 30 as century start, and two-digit
** years will be assumed to lie in the
** 100-year window starting 30 years before
** the system date.
**************************************************
MOVE 30 TO STARTCW.
**************************************************
** Call CEESCEN to change the start of the century
** window.
**************************************************
CALL 'CEESCEN' USING STARTCW, FC.
IF NOT CEE000 of FC THEN
DISPLAY 'CEESCEN failed with msg '
Msg-No of FC UPON CONSOLE
STOP RUN
END-IF.
PARA-CBLQCEN.
**************************************************
** Call CEEQCEN to return the start of the century
** window
**************************************************
CALL 'CEEQCEN' USING STARTCW, FC.
**************************************************
** CEEQCEN has no nonzero feedback codes to
** check, so just display result.
**************************************************
DISPLAY 'The start of the century '
'window is: ' STARTCW
GOBACK.