CEEQCEN—Query the century window
CEEQCEN
queries the century in which Language Environment contains
the 2-digit year value. When you want to change the setting, use CEEQCEN
to get the setting and then use CEESCEN to
save and restore the current setting.
Syntax >>-CEEQCEN--(--century_start--,--fc--)-------------------------><
- century_start (output)
- An integer between 0 and 100 indicating the year on which the century window is based. For example, if the Language Environment default is in effect, all 2-digit years lie within the 100-year window starting 80 years prior to the system date. CEEQCEN then returns the value 80. An 80 value indicates to Language Environment that, in 1995, all 2-digit years lie within the 100-year window starting 80 years before the system date (between 1915 and 2014, inclusive).
- fc (output)
- A 12-byte feedback code, optional in some languages,
that indicates the result of this service. If you choose to omit this
parameter, refer to Invoking callable services for the
appropriate syntax to indicate that the feedback code was omitted.
The following symbolic conditions can result from this service:
Code Severity Message number Message text CEE000 0 — The service completed successfully.
Usage notes
- z/OS UNIX considerations—CEEQCEN applies to the enclave, as does the century window.
For more information
- See CEESCEN—Set the century window for more information about the CEESCEN callable service.
Examples
- Following is an example of CEEQCEN called by C/C++.
/*Module/File Name: EDCQCEN */ #include <string.h> #include <stdio.h> #include <leawi.h> #include <stdlib.h> #include <ceeedcct.h> int main (void) { _INT4 century_start; _FEEDBACK fc; /* query the century window */ CEEQCEN(¢ury_start,&fc); if ( _FBCHECK ( fc , CEE000 ) != 0 ) { printf("CEEQCEN failed with message number %d\n", fc.tok_msgno); exit(2999); } /* if the century window is not 50 set it to 50 */ if (century_start != 50) { century_start = 50; CEESCEN(¢ury_start,&fc); if ( _FBCHECK ( fc , CEE000 ) != 0 ) { printf("CEESCEN failed with message number %d\n", fc.tok_msgno); exit(2999); } } }
- Following is an example of CEEQCEN called by COBOL.
CBL LIB,QUOTE *Module/File Name: IGZTQCEN ************************************************* ** CBLQCEN - Call CEEQCEN to query the Lang Env** ** century window ** ** In this example, CEEQCEN is called to query ** ** the date at which the century window starts ** ** The century window is the 100-year window ** ** within which Lang Envir ** ** assumes all two-digit years lie. ** ************************************************* IDENTIFICATION DIVISION. PROGRAM-ID. CBLQCEN. 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) BINARY. 04 Msg-No PIC S9(4) BINARY. 03 Case-2-Condition-ID REDEFINES Case-1-Condition-ID. 04 Class-Code PIC S9(4) BINARY. 04 Cause-Code PIC S9(4) BINARY. 03 Case-Sev-Ctl PIC X. 03 Facility-ID PIC XXX. 02 I-S-Info PIC S9(9) BINARY. PROCEDURE DIVISION. PARA-CBLQCEN. ************************************************* ** Call CEEQCEN to return the start of the ** ** century window ** ************************************************* CALL "CEEQCEN" USING STARTCW, FC. ************************************************* ** CEEQCEN has no non-zero feedback codes to ** ** check, so just display result. ** ************************************************* IF CEE000 of FC THEN DISPLAY "The start of the century " "window is: " STARTCW ELSE DISPLAY "CEEQCEN failed with msg " Msg-No of FC UPON CONSOLE STOP RUN END-IF. GOBACK.
- Following is an example of CEEQCEN called by PL/I.
*PROCESS MACRO; /* Module/File Name: IBMQCEN */ /****************************************************/ /** **/ /** Function: CEEQCEN - query the century window **/ /** **/ /** In this example, CEEQCEN is called to query **/ /** The date at which the century window starts. **/ /** The century window is the 100-year window **/ /** within which Language Environment assumes **/ /** all two-digit years lie. **/ /** **/ /****************************************************/ PLIQCEN: PROC OPTIONS(MAIN); %INCLUDE CEEIBMAW; %INCLUDE CEEIBMCT; DCL STARTCW REAL FIXED BINARY(31,0); DCL 01 FC, /* Feedback token */ 03 MsgSev REAL FIXED BINARY(15,0), 03 MsgNo REAL FIXED BINARY(15,0), 03 Flags, 05 Case BIT(2), 05 Severity BIT(3), 05 Control BIT(3), 03 FacID CHAR(3), /* Facility ID */ 03 ISI /* Instance-Specific Information */ REAL FIXED BINARY(31,0); /* Call CEEQCEN to return the start of the */ /* century window */ CALL CEEQCEN ( STARTCW, FC ); /* CEEQCEN has no non-zero feedback codes */ /* to check, so print result */ IF FBCHECK( FC, CEE000) THEN DO; PUT SKIP LIST ( 'The century window starts ' || STARTCW || ' years before today.'); END; ELSE DO; DISPLAY( 'CEEQCEN failed with msg ' || FC.MsgNo ); STOP; END; END PLIQCEN;