CEEQRYL—Query active locale environment

CEEQRYL, analogous to the C language function localename=setlocale(category, NULL), queries the environment for which locale defines the current setting for the locale category. CEEQRYL is sensitive to the locales set by setlocale() or CEESETL, not to the Language Environment settings from COUNTRY or CEE3CTY.

Read syntax diagramSkip visual syntax diagram
Syntax

>>-CEEQRYL--(--category--,--localename--,--fc--)---------------><

category (input)
A symbolic integer number that represents all or part of the locale for a program. Depending on the value of the localename, these categories can be initiated by the values of global categories of corresponding names. The following values for the category parameter are valid; Language Environment locale callable services do not support the LC_TOD and LC_SYNTAX categories.
LC_ALL
A 4-byte integer (with a value of -1) that affects all locale categories associated with a program's locale.
LC_COLLATE
A 4-byte integer (with a value of 0) that affects the behavior of regular expression and collation subroutines.
LC_CTYPE
A 4-byte integer (with a value of 1) that affects the behavior of regular expression, character classification, case conversion, and wide character subroutines.
LC_MESSAGES
A 4-byte integer (with a value of 6) that affects the format and values for positive and negative responses.
LC_MONETARY
A 4-byte integer (with a value of 3) that affects the behavior of subroutines that format monetary values.
LC_NUMERIC
A 4-byte integer (with a value of 2) that affects the behavior of subroutines that format non-monetary numeric values.
LC_TIME
A 4-byte integer (with a value of 4) that affects the behavior of time conversion subroutines.
localename (output)
Returns the name of the locale that describes the current setting of the category requested.
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.
CEE2KD 3 2701 An invalid category parameter was passed to a locale function.
CEE3T1 3 4001 General Failure: Service could not be completed.

Usage notes

  • PL/I MTF consideration—CEEQRYL is not supported in PL/I MTF applications.
  • CEEQRYL does not change the status of the active locales.
  • This callable service uses the C/C++ runtime library. The C/C++ library must be installed and accessible even when this service is called from a non-C program.
  • If the active locale is not explicitly set with CEESETL or setlocale(category, localename), then the locale chosen is as follows:
    • With POSIX(OFF), the SAA C locale is chosen, and querying the locale with CEEQRYL returns "C" as the locale name.
    • With POSIX(ON), the POSIX C locale is chosen, and querying the locale with CEEQRYL returns "POSIX" as the locale name.

    The SAA C locale provides compatibility with previous releases of C/370. The POSIX C locale provides consistency with POSIX requirements and supports the z/OS UNIX System Services environment.

For more information

Examples

For examples of how to use CEEQRYL with other Language Environment locale callable services, see CEESETL—Set locale operating environment.