構文 >>-CEEQCEN--(--century_start--,--fc--)-------------------------><
このサービスの結果、出力される記号条件は以下のとおりです。
コード | 重大度 | メッセージ番号 | メッセージ・テキスト |
---|---|---|---|
CEE000 | 0 | — | サービスが正しく完了した。 |
/*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);
}
}
}
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.
*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;