|
CEEFMTM
returns to the calling routine the default time picture string for
the country specified by country_code. For
a list of the default settings for a specified country, see Table 1. CEEFMTM is affected only
by the country code setting of the COUNTRY runtime option or CEE3CTY
callable service, not the CEESETL callable service or the setlocale() function.
Syntax
>>-CEEFMTM--(--country_code--,--time_pic_str--,--fc--)---------><
- country_code (input)
- A 2-character fixed-length string representing one of the country
codes found in Table 1. The country_code is
not case-sensitive. Also, if no value is specified, the default country
code (as set by either the COUNTRY runtime option or the CEE3CTY callable service)
is used. If you specify a country_code that
is not valid, the default
time picture string is 'HH:MI:SS'.
- time_pic_str (output)
- A fixed-length 80-character string (VSTRING), representing the
default time picture string for the country specified. The picture
string is left-justified and padded on the right with blanks if necessary.
- 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. |
CEE3CD |
2 |
3469 |
The country code country_code was invalid
for CEEFMTM. The default time picture string time_pic_string was
returned. |
CEE3CE |
2 |
3470 |
The date and time string datetime_str was
truncated and was not defined in CEEFMDT. |
Usage notes - z/OS UNIX considerations—CEEFMTM
applies to the enclave. Every enclave has a single current country
setting that has a single time format. Every thread in every enclave
has the same default.
Examples - Following is an example of CEEFMTM called by C/C++.
/*Module/File Name: EDCFMTM */
#include <stdio.h>
#include <string.h>
#include <leawi.h>
#include <stdlib.h>
#include <ceeedcct.h>
int main(void) {
_FEEDBACK fc;
_CHAR2 country;
_CHAR80 time_pic;
/* get the default time format for Canada */
memcpy(country,"CA",2);
CEEFMTM(country,time_pic,&fc);
if ( _FBCHECK ( fc , CEE000 ) != 0 ) {
printf("CEEFMTM failed with message number %d\n",
fc.tok_msgno);
exit(2999);
}
/* print out the default time format */
printf("%.80s\n",time_pic);
}
- Following is an example of CEEFMTM called by COBOL.
CBL LIB,QUOTE
*Module/File Name: IGZTFMTM
*************************************************
** **
** IGZTFMTM - Call CEEFMTM to obtain the **
** default time format **
** **
*************************************************
IDENTIFICATION DIVISION.
PROGRAM-ID. IGZTFMTM.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 COUNTRY PIC X(2).
01 PICSTR PIC X(80).
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-CBLFMTM.
** Specify country code for the US.
MOVE "US" TO COUNTRY.
** Call CEEFMTM to return the default time format
** for the US.
CALL "CEEFMTM" USING COUNTRY , PICSTR , FC.
** If CEEFMTM runs successfully, display result.
IF CEE000 of FC THEN
DISPLAY "The default time format for "
"the US is: " PICSTR
ELSE
DISPLAY "CEEFMTM failed with msg "
Msg-No of FC UPON CONSOLE
STOP RUN
END-IF.
GOBACK.
- Following is an example of CEEFMTM called by PL/I.
*PROCESS MACRO;
/* Module/File Name: IBMFMTM */
/****************************************************/
/** **/
/** Function: CEEFMTM - obtain default time **/
/** format **/
/** **/
/** This example calls CEEFMTM to request the **/
/** default time format for the US and print **/
/** it out. **/
/** **/
/****************************************************/
PLIFMTM: PROC OPTIONS(MAIN);
%INCLUDE CEEIBMAW;
%INCLUDE CEEIBMCT;
DCL COUNTRY CHARACTER ( 2 );
DCL PICSTR CHAR(80);
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);
COUNTRY = 'US'; /* Specify country code for */
/* the United States */
/* Call CEEFMTM to get default time format for */
/* the US */
CALL CEEFMTM ( COUNTRY , PICSTR , FC );
/* Print the default time format for the US */
IF FBCHECK( FC, CEE000) THEN DO;
PUT SKIP LIST(
'The default time format for the US is '
|| PICSTR);
END;
ELSE DO;
DISPLAY( 'CEEFMTM failed with msg '
|| FC.MsgNo );
STOP;
END;
END PLIFMTM;
|