The business and cultural features enable users of an application program to display and receive data according to local conventions. A convention consists of formatting instructions for date, time, numeric, currency, and page size.
Unisys provides standard convention definitions for many formatting styles. For example, some of the conventions are Denmark, Italy, Turkey, and UnitedKingdom1. These convention definitions contain information to create formats for time, date, numbers, currency, and page size required by a particular locality.
Each enterprise server includes a data file named *SYSTEM/CONVENTIONS that contains all the convention definitions supported on the system. Although you can use many conventions, only one default convention is defined as the default for the entire system. This convention is called the system default convention. You can override this default and you can access all the conventions by calling the CENTRALSUPPORT library procedures. To display the names of the conventions available on the host computer, use the CNV_NAMES CENTRALSUPPORT library procedure. The MultiLingual System Administration, Operations, and Programming Guide provides complete information on all of the conventions supplied to you.
If none of the conventions provided to you meet your needs, you can define a new convention. You must use a template to define a convention. A template is a group of predefined control characters that describe the components for date, time, numeric, or currency. For example, the data item 02251990 and the template!0o!/!dd!/!yyyy! produce the formatted date, 02/25/1990. To use some of the CENTRALSUPPORT library procedures, you must understand how templates are defined. The MultiLingual System Administration, Operations, and Programming Guide describes how to define and use a template.
Using the Date and Time Features
Date and time features are provided by the ALGOL programming language and by several CENTRALSUPPORT library procedures.
The ALGOL programming language has date and time features for standard use. The TIME function provides system date and time with various formats, for example YYDDD, MMDDYY, or HHMMSS. For more information, see TIME Function.
Date and time punctuation can be specified in the PICTURE clause through string literals. For example:
PICTURE PDATE(99"/"99"/"99), PICTURE PTIME(99":"99":"99),
For more information, see PICTURE Declaration.
The ALGOL date and time features do not use the convention features for internationalization. The ALGOL internationalization features are limited in internationalizing programs. The user can call the CENTRALSUPPORT library procedures to format date and time items.
The following types of procedures are available to format the date and time:
|
Procedure Type |
Description |
|
Convention |
You supply the convention name and the value for the date or time. The procedure returns the date or time value in the format used by the convention. All the conventions are described in the MultiLingual System Administration, Operations, and Programming Guide. |
|
Template |
You supply the following: the format that you want for the date or time in a template parameter; the value for the date or time. You must use predefined control characters to create the template. These control characters are described in the MultiLingual System Administration, Operations, and Programming Guide. |
|
System |
The system supplies the date and time. There is a procedure that formats the system date, the system time, or both according to a convention and a procedure that formats the system date, the system time, or both according to a template that you supply. |
You can use the CNV_SYSTEMDATETIME procedure to display the system date and time according to the convention and language you choose. If you designate the ASeriesNative convention and the ENGLISH language, the date and time can be displayed as follows:
9:25 AM Monday, July 4, 1988
If you designate the France Listing convention and the French language, the same date and time can be displayed as follows:
9h25, lundi 4 juillet 1988
Using the Numeric and Currency Features
Numeric and currency features are provided by the ALGOL programming language and by several CENTRALSUPPORT library procedures.
The ALGOL programming language has numeric and currency features for standard use. ALGOL also provides the introduction codes that can be used to specify the thousands separator, the decimal sign, and a single character currency symbol in the PICTURE clause. For example:
PICTURE PAMOUNT(C/ N, U#, FFFDZZ9I99)
declares “/” as the thousands separator, “,” as the decimal sign, and “#” as the currency symbol for PAMOUNT.
For more information, see PICTURE Declaration.
ALGOL provides a DECIMALPOINTISCOMMA option for messages in output message arrays. This enables the user to replace commas with periods and periods with commas in message parameters. For more information, see OUTPUTMESSAGE ARRAY Declaration.
In addition to using the features in ALGOL, you can call the CENTRALSUPPORT library procedures to inquire about numeric symbols or to format currency amounts. All numeric or currency symbols can be retrieved with a CENTRALSUPPORT library call. Monetary amounts in real number form can be formatted according to different conventions.
You can use the CNV_CURRENCYEDIT procedure to format a monetary value according to the convention you choose. If you designate the Greece convention, the monetary amount 12345.67 is formatted as DR.12 345,67.
Using the Page Size Formatting Features
The CNV_FORMSIZE CENTRALSUPPORT procedure enables you to retrieve default lines-per-page and characters-per-line values for a specified convention.
For example, the Netherlands convention definition specifies 70 lines as the default page length and 82 characters as the default page width, while the Zimbabwe convention definition specifies 66 lines as the default page length and 132 characters as the default page width.

