|
CEEFMDA
returns to the calling routine the default date picture string for
a specified country. CEEFMDA 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
>>-CEEFMDA--(--country_code--,--date_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
date format is 'YYYY-MM-DD'.
- date_pic_str (output)
- A fixed-length 80-character string (VSTRING), returned to the
calling routine. It contains the default date 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. |
CEE3CB |
2 |
3467 |
The country code country_code was invalid
for CEEFMDA. The default date picture string date_pic_string was
returned. |
Usage notes - z/OS UNIX considerations—CEEFMDA
applies to the enclave. Every enclave has a single current country
setting that has a single date format. Every thread in every enclave
has the same default.
For more information - For a list of the default settings for a specified country, see Table 1.
- See COUNTRY for an explanation
of the COUNTRY runtime option.
- See CEE3CTY—Set default country for an explanation
of the CEE3CTY callable service.
Examples - Following is an example of CEEFMDA called by C/C++.
C/C++ example
of CEEFMDA
/*Module/File Name: EDCFMDA */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <leawi.h>
#include <ceeedcct.h>
int main(void) {
_FEEDBACK fc;
_CHAR2 country;
_CHAR80 date_pic;
/* get the default date format for Canada */
memcpy(country,"CA",2);
CEEFMDA(country,date_pic,&fc);
if ( _FBCHECK ( fc , CEE000 ) != 0 ) {
printf("CEEFMDA failed with message number %d\n",
fc.tok_msgno);
exit(2999);
}
/* print out the default date format for Canada */
printf("%.80s\n",date_pic);
}
- Following is an example of CEEFMDA called by COBOL.
CBL LIB,QUOTE
*Module/File Name: IGZTFMDA
*******************************************
** **
** CBLFMDA - Call CEEFMDA to obtain the **
** default date format **
*******************************************
IDENTIFICATION DIVISION.
PROGRAM-ID. CBLFMDA.
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-CBLFMDA.
** Specify country code for the US and call
** CEEFMDA to return the default date format
** for the US.
MOVE "US" TO COUNTRY.
CALL "CEEFMDA" USING COUNTRY , PICSTR , FC.
** If CEEFMDA runs successfully, display result
IF CEE000 of FC THEN
DISPLAY "The default date format for "
"the US is: " PICSTR
ELSE
DISPLAY "CEEFMDA failed with msg "
Msg-No of FC UPON CONSOLE
STOP RUN
END-IF.
GOBACK.
- Following is an example of CEEFMDA called by PL/I.
*PROCESS MACRO;
/* Module/File Name: IBMFMDA */
/****************************************************/
/** **/
/** Function: CEEFMDA - obtain default date **/
/** format **/
/** **/
/****************************************************/
PLIFMDA: 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 */
/* Get the default date format for the US */
CALL CEEFMDA ( COUNTRY , PICSTR , FC );
/* Print the default date format for the US */
IF FBCHECK( FC, CEE000) THEN DO;
PUT SKIP LIST(
'The default date format for the US is '
|| PICSTR );
END;
ELSE DO;
DISPLAY( 'CEEFMDA failed with msg '
|| FC.MsgNo );
STOP;
END;
END PLIFMDA;
|