|
CEE3MCS
returns the default currency symbol for the country you specify with country_code.
For a list of the default settings for a specified country, see Table 1.
Syntax
>>-CEE3MCS--(--country_code--,--currency_symbol--,--fc--)------><
- country_code (input)
- A 2-character fixed-length string representing one of the country
codes found in Table 1. country_code is
not case-sensitive. If no value is specified, the default country
code, as set by the COUNTRY runtime option or the CEE3CTY callable service,
is used.
- currency_symbol (output)
- A 4-character fixed-length string returned to the calling routine.
It contains the default currency symbol for the country specified.
The currency symbol 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. |
CEE3C7 |
2 |
3463 |
The country code country_code was not valid
for CEE3MCS. The default currency symbol currency_symbol was
returned. |
Usage notes - If you specify a country_code that is
not valid, the default
currency symbol is X'9F404040'. In the United States, it
is shown as a '$'followed by three blanks.
- z/OS UNIX considerations—CEE3MCS
applies to the enclave. Every enclave has a single current country
setting that has a single currency symbol. Every thread in every enclave
has the same default.
- Euro considerations—For countries in the European Union that have
adopted the Euro as the legal tender, the currency symbol is represented
as a hexadecimal string in the default country settings. The value
is the code point for the Euro sign, taken from a typical code page
for the given country. Of course, the actual graphical representation
depends on the code page in use. See Table 1 for a list of country settings.
Language Environment supports
the Euro as the default currency symbol in the following countries:
Austria, Belgium, Finland, France, Germany, Greece, Ireland, Italy,
Luxembourg, the Netherlands, Portugal, and Spain. As more countries
pass the economic and monetary union convergence criteria and adopt
the Euro as the legal currency, the default currency symbol will replace
the national currency symbol with the Euro sign.
Examples - Following is an example of CEE3MCS called by C/C++.
/*Module/File Name: EDC3MCS */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <leawi.h>
#include <ceeedcct.h>
int main(void) {
_FEEDBACK fc;
_CHAR2 country;
_CHAR4 currency;
/* get the default currency symbol for Canada */
memcpy(country,"CA",2);
CEE3MCS(country,currency,&fc);
if ( _FBCHECK ( fc , CEE000 ) != 0 ) {
printf("CEE3MCS failed with message number %d\n",
fc.tok_msgno);
exit(2999);
}
printf("The default currency symbol for Canada is:"
" %.2s\n",currency);
}
- Following is an example of CEE3MCS called by COBOL.
CBL LIB,QUOTE
*Module/File Name: IGZT3MCS
************************************************
** **
** CBL3MCS - Call CEE3MCS to obtain the **
** default currency symbol **
** **
************************************************
IDENTIFICATION DIVISION.
PROGRAM-ID. CBL3MCS.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 COUNTRY PIC X(2).
01 CURSYM PIC X(4).
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-CBL3MCS.
************************************************
** Specify country code for the US in the call
** to CEE3MCS
************************************************
MOVE "US" TO COUNTRY.
CALL "CEE3MCS" USING COUNTRY, CURSYM, FC.
************************************************
** If CEE3MCS runs successfully, display result.
************************************************
IF CEE000 of FC THEN
DISPLAY "The default currency symbol "
"for the " COUNTRY " is: " CURSYM
ELSE
DISPLAY "CEE3MCS failed with msg "
Msg-No of FC UPON CONSOLE
STOP RUN
END-IF.
GOBACK.
- Following is an example of CEE3MCS called by PL/I.
*PROCESS MACRO;
/* Module/File Name: IBM3MCS */
/****************************************************/
/** **/
/** Function: CEE3MCS - Obtain default currency **/
/** symbol **/
/** **/
/****************************************************/
PLI3MCS: PROC OPTIONS(MAIN);
%INCLUDE CEEIBMAW;
%INCLUDE CEEIBMCT;
DCL COUNTRY CHARACTER ( 2 );
DCL CURSYM CHARACTER ( 4 );
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 CEE3MCS to return currency symbol for */
/* the United States */
CALL CEE3MCS ( COUNTRY, CURSYM, FC );
/* Print the default currency symbol for the US */
IF FBCHECK( FC, CEE000) THEN DO;
PUT SKIP LIST(
'The default currency symbol for the '
|| COUNTRY || ' is "' || CURSYM || '"');
END;
ELSE DO;
DISPLAY( 'CEE3MCS failed with msg '
|| FC.MsgNo );
STOP;
END;
END PLI3MCS;
|