CEE3MTS—Get default thousands separator

CEE3MTS returns the default thousands separator for the specified country with country_code.
Read syntax diagramSkip visual syntax diagram
Syntax

>>-CEE3MTS--(--country_code--,--thousands_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.
thousands_separator (output)
A 2-character fixed-length string representing the default thousands separator for the country specified. The thousands 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.
CEE3C8 2 3464 The thousands separator 'thousands-separator' was truncated and was not defined in CEE3MTS.
CEE3C9 2 3465 The country code country-code was invalid for CEE3MTS. The default thousands separator 'thousands-separator' was returned.

Usage notes

  • If you specify a country_code that is not valid, the default thousands separator is a comma (,).
  • z/OS UNIX considerations—CEE3MTS applies to the enclave. Every enclave has a single current country setting that has a single thousands separator. 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

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