|
CEE3MC2
returns the default currency symbol and international 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
>>-CEE3MC2--(--country_code--,--currency_symbol--,-------------->
>--international_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.
- international_currency_symbol (output)
- A 3-character alphabetic fixed-length string returned to the calling
routine. It contains the international currency symbol for the country
specified.
- 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. |
CEE3C2 |
2 |
3458 |
The country code country_code was not valid
for CEE3MC2. The default currency symbol currency_symbol was
returned. no international 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—CEE3MC2
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 CEE3MC2 called by C/C++.
/*Module/File Name: EDC3MC2 */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <leawi.h>
#include <ceeedcct.h>
int main(void) {
_FEEDBACK fc;
_CHAR2 country;
_CHAR4 currency;
_CHAR3 international_currency;
/* get the default currency symbol for Canada */
memcpy(country,"CA",2);
CEE3MC2(country,currency,international_currency,&fc);
if ( _FBCHECK ( fc , CEE000 ) != 0 ) {
printf("CEE3MC2 failed with message number %d\n",
fc.tok_msgno);
exit(2999);
}
printf("The default currency symbol for Canada is:"
" %.2s\n",currency);
printf("The international symbol for Canada is:"
" %.3s\n",international_currency);
}
- Following is an example of CEE3MC2 called by COBOL.
CBL LIB,QUOTE
*Module/File Name: IGZT3MC2
************************************************
** **
** CBL3MC2 - Call CEE3MC2 to obtain the **
** currency symbols **
** **
************************************************
IDENTIFICATION DIVISION.
PROGRAM-ID. CBL3MC2.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 COUNTRY PIC X(2).
01 CURSYM PIC X(2).
01 INTCURSYM PIC X(3).
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-CBL3MC2.
************************************************
** Specify country code for the US in the call
** to CEE3MC2
************************************************
MOVE "US" TO COUNTRY.
CALL "CEE3MC2" USING COUNTRY, CURSYM, INTCURSYM, FC.
************************************************
** If CEE3MC2 runs successfully, display result.
************************************************
IF CEE000 of FC THEN
DISPLAY "The default currency symbol "
"for the " COUNTRY " is: " CURSYM
DISPLAY "The international currency symbol "
"for the " COUNTRY " is: " INTCURSYM
ELSE
DISPLAY "CEE3MC2 failed with msg "
Msg-No of FC UPON CONSOLE
STOP RUN
END-IF.
GOBACK.
- Following is an example of CEE3MC2 called by PL/I.
*PROCESS MACRO;
/*Module/File Name: IBM3MC2 */
/****************************************************/
/** */
/** Function: CEE3MC2 - Obtain currency symbols */
/** */
/****************************************************/
PLI3MC2: PROC OPTIONS(MAIN);
%INCLUDE CEEIBMAW;
%INCLUDE CEEIBMCT;
DCL COUNTRY CHARACTER ( 2 );
DCL CURSYM CHARACTER ( 4 );
DCL INTCURSYM CHARACTER ( 3 );
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 CEE3MC2 to return currency symbol for */
/* the United States */
CALL CEE3MC2 ( COUNTRY, CURSYM, INTCURSYM, 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 || '"');
PUT SKIP LIST(
'The international currency symbol for the '
|| COUNTRY || ' is "' || INTCURSYM || '"');
END;
ELSE DO;
DISPLAY( 'CEE3MC2 failed with msg '
|| FC.MsgNo );
STOP;
END;
END PLI3MC2;
|