The CENTRALSUPPORT library procedures are integer-valued functions. The procedures return values in the output parameters and the functional result. The results returned by each procedure can be checked using standard programming practices. The results are useful in deciding if an error has occurred. The error results and their meanings are presented in the description of each procedure and at the end of this section.
The CENTRALSUPPORT library procedures are called by application programs and system software. An application program can call the CENTRALSUPPORT library procedures to perform the following tasks:
-
Determine the default settings on the host computer.
-
Identify and validate character sets and ccsversions.
-
Obtain information about a coded character set or a ccsversion.
-
Check data against ccsversion data classes.
-
Translate data using ccsversion mapping tables.
-
Compare data.
-
Manipulate text.
-
Translate characters using ccsversion escapement.
-
Obtain information about the convention contents.
-
Add, modify and delete conventions.
-
Format date and time.
-
Format monetary and numeric data.
-
Obtain default characteristics for hard copy output.
Functional Grouping of CENTRALSUPPORT Library Procedures lists the CENTRALSUPPORT library procedures according to the tasks the procedures perform and describes the purpose of each procedure.
Table 15. Functional Grouping of CENTRALSUPPORT Library Procedures
|
Procedure Name |
Purpose |
|---|---|
|
Determine the default settings on the host computer |
|
|
CURRENT_MACHINE_ID |
Returns the current processor's machine id. |
|
INSERT_MACHINE_NAME |
Returns the machine name. |
|
INSERT_PRODUCTLINE_NAME |
Returns the product line name. |
|
INSERT_VENDOR_NAME |
Returns the vendor name. |
|
Identifying the Available Coded Character Sets and Ccsversions |
|
|
CCSVSN_NAMES_NUMS |
Returns the names and numbers of all coded character sets or all ccsversions available on the host computer. The names and numbers are listed in two arrays. These arrays are ordered so that the names in the names array correspond to the numbers in the numbers array. |
|
CENTRALSTATUS |
Obtains the values of the default settings for internationalization features on the host computer. This procedure returns the names of the default ccsversion, language, and convention. It also returns the number of the default ccsversion. |
|
VALIDATE_NAME_RETURN_NUM |
Verifies that a designated coded character set or ccsversion name is valid on the host computer. If the coded character set or ccsversion is valid, the procedure returns the corresponding number for the designated coded character set or ccsversion. |
|
VALIDATE_NUM_RETURN_NAME |
Verifies that the designated coded character set or ccsversion number is valid on the host computer. If the coded character set or ccsversion is valid, the procedure returns the name of the coded character set or ccsversion. |
|
Obtaining Coded Character Set and Ccsversion Information |
|
|
CCSINFO |
Provides basic information about a designated coded character set, including the number of bits per character (8, 16, or mixed), the coding format (for example, ISO or EBCDIC), and the space character. |
|
VSNINFO |
Returns the following information for a designated ccsversion: The number of the base character set to which the ccsversion applies The escapement information The characters in the spaces data class for the ccsversion The array sizes required by the other ccsversion elements |
|
Mapping Data from One Coded Character Set to Another |
|
|
CCSTOCCS_TRANS_TABLE |
Returns a translation table used to translate data appearing in one designated character set to another designated character set. The result is a one-to-one mapping of the characters. You also can use the translate table directly with the REPLACE syntax. |
|
CCSTOCCS_TRANS_TABLE_ALT |
Returns a coded character set to coded character set translate table. The procedure provides an alternative to CCSTOCCS_TRANS_TABLE. |
|
CCSTOCCS_TRANS_TEXT |
Translates data from one character set to another character set by using a translate table. Characters are translated using a one-to-one mapping between the two character sets. |
|
CCSTOCCS_TRANS_TEXT_COMPLEX |
Translates data from one character set to another character set by using an advanced character mapping operation. The procedure supports the complex translation requirements of mixed, multibyte, and 16-bit coded character sets, as well as 8-bit coded character sets. |
|
Processing Data According to a Ccsversion |
|
|
VSNINSPECT_TEXT |
Compares the input text to a designated ccsversion truth set to determine whether the characters in the text are in the truth set. This procedure can be used to determine if characters are in one of the following data classes: Alphabetic Lowercase Numeric Presentation Spaces Uppercase |
|
VSNTRANSTABLE |
Returns a translation table for a designated ccsversion. The type of translation table requested depends on the task to be performed. Translation tables can be requested to perform the following tasks: Translate lowercase letters to uppercase letters. Translate uppercase letters to lowercase letters. Translate any digits 0 through 9 to any alternate digits (that is, one-to-one mapping of 0 through 9 to another representation for those digits). Translate alternate digits to 0 through 9. Translate characters to their character escapement direction value. |
|
VSNTRANS_TEXT |
Translates data using a designated ccsversion translate table. The type of table used determines the type of translation done. All translation is a one-to-one mapping of the characters. This procedure can be used to perform the following types of translations: Lowercase to uppercase characters Uppercase to lowercase characters The digits 0 through 9 to alternate digits Alternate digits to the digits 0 through 9 Characters to their character escapement direction value |
|
VSNTRUTHSET |
Returns a truth set for the designated ccsversion. The truth set contains the characters in a given data class for the ccsversion. Truth sets are available for the following data classes: Alphabetic Lowercase Numeric Presentation Space Uppercase |
|
Comparing and Sorting Text |
|
|
COMPARE_TEXT_USING_ORDER_INFO |
Compares two strings by using the ordering information returned by the VSNORDERING_INFO procedure. One of the following comparison methods can be chosen: Equivalent comparison This method is based on the ordering sequence values of the characters. Logical comparison This method is based on the ordering sequence values and the priority sequence values of the characters. |
|
VSNCOMPARE_TEXT |
Compares two strings by using one of three comparison methods for a designated ccsversion. You can select one of the following comparison methods: Binary comparison, which is based on the binary values of the characters Equivalent comparison, which is based on the Ordering Sequence Values (OSVs) of the characters Logical comparison, which is based on the OSVs and Priority Sequence Values (PSVs) of the characters |
|
VSNGETORDERINGFOR_ONE_TEXT |
Returns the ordering information for the input text. The ordering information determines how the input text is collated. It includes the ordering and priority sequence values of the characters and any substitution of characters to be made when the input text is sorted. One of the following types of ordering information can be chosen: Equivalent ordering information, which comprises only the ordering sequence values Logical ordering information, which comprises the ordering sequence values followed by the priority sequence values |
|
VSNORDERING_INFO |
Returns the ordering information for a designated ccsversion. The ordering information determines the way in which data is collated for the ccsversion. It includes the ordering and priority sequence values of the characters and any substitution of characters to be made when the designated ccsversion ordering is applied to a string of text. |
|
Positioning Characters |
|
|
VSNESCAPEMENT |
Rearranges the input text according to the escapement rules of the ccsversion. |
|
Determining the Available Natural Languages |
|
|
MCP_BOUND_LANGUAGES |
Returns the names of the languages that are currently bound to the MCP. |
|
Accessing CENTRALSUPPORT Library Messages |
|
|
GET_CS_MSG |
Returns the text of a CENTRALSUPPORT message associated with the designated error number. |
|
Identifying the Available Convention Definitions |
|
|
CENTRALSTATUS |
Obtains the values of the default settings for internationalization features on the host computer. This procedure returns the names of the default ccsversion, language, and convention. It also returns the number of the default ccsversion. |
|
CNV_NAMES |
Returns the names of the conventions available on the host computer. |
|
CNV_VALIDATENAME |
Indicates whether a designated convention name is currently defined on the host computer. |
|
Obtaining Information About Conventions |
|
|
CNV_INFO |
Returns a description of all the elements defined in a designated convention. |
|
CNV_SYMBOLS |
Returns the numeric and monetary symbols defined for a designated convention. The symbols in the convention are Numeric positive symbol Numeric negative symbol Numeric thousands separator symbol Numeric decimal symbol Numeric left enclosure symbol Numeric right enclosure symbol Numeric grouping specifications International currency notation Monetary positive symbol Monetary negative symbol Currency symbol Monetary thousands separator symbol Monetary decimal symbol Monetary left enclosure symbol Monetary right enclosure symbol Monetary grouping specifications |
|
CNV_TEMPLATE |
Returns the requested template for a designated convention. The template can be obtained for the following: Long date format Short date format Numeric date format Long time format Numeric time format Monetary format Numeric format |
|
Formatting Dates According to a Convention |
|
|
CNV_CONVERTDATE |
Converts a formatted numeric date passed as a parameter to the procedure to the format YYYYMMDD. The numeric date must be formatted according to the numeric date format template defined in the designated convention. |
|
CNV_DISPLAYMODEL |
Returns either the date or time display model defined for a designated convention. The components for the model are translated to the designated language. |
|
CNV_FORMATDATE |
Formats a numeric date passed as a parameter to the procedure according to a designated convention and language. The date can be formatted using the long, short, or numeric date format defined in the convention. |
|
CNV_FORMATDATETMP |
Formats a numeric date passed as a parameter to the procedure according to a template and language passed as parameters of the procedure. |
|
CNV_SYSTEMDATETIME |
Returns the system date and/or time formatted according to the designated convention and language. The following types of templates can be chosen: Long date and long time Long date and numeric time Short date and long time Short date and numeric time Numeric date and long time Numeric date and numeric time Long date only Short date only Long time only Numeric time only |
|
CNV_SYSTEMDATETIMETMP |
Returns the system date and/or time in the designated language, formatted according to a template passed as a parameter to this procedure. |
|
Formatting Times According to a Convention |
|
|
CNV_CONVERTTIME |
Converts a formatted numeric time passed as a parameter to the procedure to the format HHMMSS. The numeric time must be formatted according to the numeric time format template defined in the designated convention. |
|
CNV_DISPLAYMODEL |
Returns either the date or time display model defined for a designated convention. The components for the model are translated to the designated language. |
|
CNV_FORMATTIME |
Formats a time passed as a parameter to the procedure according to a designated convention and language. The time can be formatted using the long or numeric time format defined in the convention. |
|
CNV_FORMATTIMETMP |
Formats a time passed as a parameter to the procedure according to a template and language passed as parameters of the procedure. |
|
CNV_SYSTEMDATETIME |
Returns the system date and/or time formatted according to the designated convention and language. The following types of templates can be chosen: Long date and long time Long date and numeric time Short date and long time Short date and numeric time Numeric date and long time Numeric date and numeric time Long date only Short date only Long time only Numeric time only |
|
CNV_SYSTEMDATETIMETMP |
Returns the system date and/or time in the designated language, formatted according to a template passed as a parameter to this procedure. |
|
Formatting Numeric Data According to a Convention |
|
|
CNV_CONVERTNUMERIC |
Converts a string containing digits and numeric symbols to a real number. |
|
Formatting Monetary Data According to a Convention |
|
|
CNV_CONVERTCURRENCY |
Converts a string containing digits and monetary symbols to a real number. |
|
CNV_CURRENCYEDIT |
Formats a monetary value passed as a parameter to the procedure according to the monetary formatting template defined in the designated convention. |
|
CNV_CURRENCYEDIT_DOUBLE |
Formats a double-precision integer that represents a monetary value according to the monetary formatting template defined in the designated convention. |
|
CNV_CURRENCYEDITTMP |
Formats a monetary value passed as a parameter to the procedure according to a template also passed as a parameter. |
|
CNV_CURRENCYEDITTMP_DOUBLE |
Formats the double-precision integer that represents a monetary value according to the template parameter. |
|
Determining the Default Page Length and Width |
|
|
CNV_FORMSIZE |
Returns the default lines-per-page and characters-per-line values from a designated convention for formatting printer output. |
|
Adding, Modifying, and Deleting Conventions |
|
|
CNV_ADD |
Adds a new convention to the *SYSTEM/CONVENTIONS file. The new definition goes into effect immediately. |
|
CNV_DELETE |
Deletes an existing convention from the SYSTEM/CONVENTIONS file. The convention is deleted after the next halt/load. Only conventions that have been created by a user can be deleted. The standard conventions that are provided cannot be deleted. |
|
CNV_MODIFY |
Modifies an existing convention in the *SYSTEM/CONVENTIONS file. The modified set becomes effective after the next halt/load. Only conventions that have been created by a user can be modified. The standard conventions that are provided cannot be modified. |

