CEE3MDS—Get default decimal separator

CEE3MDS returns the default decimal separator for the country specified by country_code. For a list of the default settings for a specified country, see Table 1.
Read syntax diagramSkip visual syntax diagram
Syntax

>>-CEE3MDS--(--country_code--,--decimal_separator--,--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.
decimal_separator (output)
A 2-character fixed-length string containing the default decimal separator for the country specified. The decimal separator is left-justified and padded on the right with a blank.
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.
CEE3C4 2 3460 The decimal separator 'decimal-separator' was truncated and was not defined in CEE3MDS.
CEE3C5 2 3461 The country code country-code was invalid for CEE3MDS. The default decimal separator 'decimal-separator' was returned.

Usage notes

  • If you specify a country_code that is not valid, the default decimal separator is a period (.).
  • z/OS UNIX considerations—CEE3MDS applies to the enclave. Every enclave has a single current country setting that has a single decimal separator. Every thread in every enclave has the same default.

For more information

Examples

  1. Following is an example of CEE3MDS called by C/C++.
    /*Module/File Name: EDC3MDS   */
    
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <leawi.h>
    #include <ceeedcct.h>
    
    int main(void) {
    
       _FEEDBACK fc;
       _CHAR2 country,decimal;
    
       /* get the default decimal separator for Canada */
       memcpy(country,"CA",2);
       CEE3MDS(country,decimal,&fc);
       if ( _FBCHECK ( fc , CEE000 ) != 0 ) {
          printf("CEE3MDS failed with message number %d\n",
                 fc.tok_msgno);
          exit(2999);
       }
       /* print out the default decimal separator */
       printf("The default decimal separator for");
       printf(" Canada is: %.2s\n",decimal);
    }
  2. Following is an example of CEE3MDS called by COBOL.
    CBL LIB,QUOTE
          *Module/File Name: IGZT3MDS
          ************************************************
          **                                            **
          ** CBL3MDS - Call CEE3MDS to get the          **
          **           default decimal separator        **
          **                                            **
          ************************************************
           IDENTIFICATION DIVISION.
           PROGRAM-ID. CBL3MDS.
    
           DATA DIVISION.
           WORKING-STORAGE SECTION.
           01  COUNTRY                 PIC X(2).
           01  DECSEP                  PIC X(2).
           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.
    
          ************************************************
          ** Specify the country code for the US in the
          **     call to CEE3MDS.
          ** If call was successful, print result.
          ************************************************
           PARA-CBL3MDS.
               MOVE "US" TO COUNTRY.
               CALL "CEE3MDS" USING COUNTRY, DECSEP, FC.
               IF CEE000 of FC  THEN
                   DISPLAY "The default Decimal Separator "
                       "for " COUNTRY " is "" DECSEP """
               ELSE
                   DISPLAY "CEE3MDS failed with msg "
                       Msg-No of FC UPON CONSOLE
                   STOP RUN
               END-IF.
               GOBACK.
  3. Following is an example of CEE3MDS called by PL/I.
    *PROCESS MACRO;
     /* Module/File Name: IBM3MDS                        */
     /****************************************************/
     /**                                                **/
     /** Function: CEE3MDS - get default decimal        **/
     /**           separator                            **/
     /****************************************************/
     PLI3MDS: PROC OPTIONS(MAIN);
    
        %INCLUDE  CEEIBMAW;
        %INCLUDE  CEEIBMCT;
    
        DCL COUNTRY  CHARACTER ( 2 );
        DCL DECSEP   CHARACTER ( 2 );
        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 CEE3MDS to get default decimal           */
        /*    separator for the US                       */
        CALL CEE3MDS ( COUNTRY, DECSEP, FC );
    
        /*     Print the default decimal separator for   */
        /* the US             */
        IF  FBCHECK( FC, CEE000)  THEN  DO;
           PUT SKIP LIST(
              'The default decimal separator for the '
              || COUNTRY || ' is "' || DECSEP || '"' );
           END;
        ELSE  DO;
           DISPLAY( 'CEE3MDS failed with msg '
              || FC.MsgNo );
           STOP;
           END;
     END PLI3MDS;