Progress 4GL and RDBMS I18n Startup Parameters

These startup parameters simplify supporting regional markets.
Note that items that "look like this" are not recommended.
Thanks to George Potemkin for his review comments and the materials taken from his undocumented startup parameters web page.

Table of Contents

 

Date Format Parameters

ParameterExampleNotes
-d-d mdy Specifies date format: dmy, mdy, ymd. Default is mdy.
For example, set "ymd" for Japan, "dmy" for Europe, and "mdy" for U. S. A.
Note that FORMAT "99/99/9999" recognizes -d options and moves the 4 digit year accordingly.
The Date Format can also be evaluated or dynamically set with SESSION:DATE-FORMAT.
ASSIGN SESSION:DATE-FORMAT = "ymd".
DISPLAY SESSION:DATE-FORMAT.

Display and print are affected, source code always expects mdy format.
-yy (base century) -yy 1950 Specifies beginning range of 100 years represented as 2 digits. Default value is 1950, so the years 1950-2049 can be represented as 50-49.
For example, -yy 2500 can be used to switch to the Buddhist calendar and to have the 2 digit year 70 represent 2570. (Gregorian year 2003 is Buddhist year 2546.) The base century can be evaluated or dynamically set with SESSION:YEAR-OFFSET.
ASSIGN SESSION:YEAR-OFFSET = 2500.
DISPLAY SESSION:YEAR-OFFSET.
-yr4def -yr4def Make the default date format use 4 digits for years in the EXPORT, PUT UNFORMATTED, and MESSAGE statements. Introduced in 9.0A. (KB 18505)
-nofixdate -nofixdate Resolves the memory violation problem prior to 8.3A with the code:
DEFINE VARIABLE v-date AS DATE.
MESSAGE "Enter date" UPDATE v-date.

Return to Top

Number Format Parameters

ParameterExampleNotes
-E -ESpecifies European number format i.e. “,” as decimal separator, and “.” as thousands separator.
The Number Format can also be evaluated or dynamically set with SESSION:NUMERIC-FORMAT.
ASSIGN SESSION:NUMERIC-FORMAT="EUROPEAN".
ASSIGN SESSION:NUMERIC-FORMAT="AMERICAN".
DISPLAY SESSION:NUMERIC-FORMAT.
-, -,European Number Format (the same as -E)
-numdec (decimal code point) -numdec 44Fractional Separator- The supplied decimal number is treated as the value of the character (its code point in the -cpinternal code page) that should be used to separate the integer portion from the fractional portion when displaying DECIMAL numbers. In the example, since 44 is the value for the character comma, a comma would be used.
-numsep (group separator) -numsep 46Thousands Separator- The supplied decimal number is treated as the value of the character (its code point in the -cpinternal code page) that should be used to separate every 3 digits in integers or decimals greater than 999. In this example, a period or full-stop character would be used, since that is the character represented by 46.

Return to Top

Code Page Parameters

Except for -checkdbe, all of the parameters in this table can be used by client, broker, appserver, database server, dataserver, and OID driver. All of the Progress executables make use of -cp* parameters, or equivalences. (Although they don't all need all of the -cp*, generally, -cpinternal and -cpstream are supported.)

Code Page Parameters
ParameterNotes
-charset Same as -cpinternal.
-checkdbe,
-nocheckdbe
Check Double-byte Enabled- When -checkdbe is specified, compile listings will highlight all uses of SUBSTRING, OVERLAY, LENGTH that do not specify explicitly RAW, COLUMN, CHARACTER, or FIXED. See Unicode Checklist. The warning only occurs during compilation and appears in the listing. The r-code is still produced and is not affected.
-convmap The file path to the convmap.cp file. convmap.cp contains the definitions of code pages and character properties (case, collation, etc.) used by PROGRESS. You only use this if you have created your own convmap.cp and do not want to replace the Progress-supplied convmap.cp file. It is useful for testing new convmap.cp files before replacing the standard version.
-cpcase Names the table of Upper/lower case rules to be used with the -cpinternal code page.
-cpcoll Names the collation table to be used with the -cpinternal code page, defining the rules for comparison of characters in the 4GL. Note databases have their own collation tables for indexes.
-cpinternal The code page used for in memory representation of text and for display to GUI.
Text brought into a client or server process from files, devices, over the network, or via inter-process communication is always converted to the -cpinternal code page. This allows the processes' text routines to use a single set of code page tables, such as case, collation, isalpha, is-lead-byte (all related to -cpinternal) for efficient text handling.
Even text coming from a database must be converted to -cpinternal. However, PROGRESS passes database information around in the database code page. Only at the final point that a client or server actually processes the text data, is it converted to the -cpinternal code page. The conversion is deferred until the data is actually processed as a performance enhancement, so PROGRESS isn't processing gobs of database buffers, of which only a few fields might actually be examined. (Neat eh!)
-cplog Log File Code Page
-cpprint Printer code page
Note for Microsoft Windows: Windows has three ways to print files-
a) Graphical- Windows takes the text data and converts it to a graphical image, essentially figuring out which pixels to print on the page and downloads the image to the printer. Since Windows is creating the displayed image, the code page of the printer is irrelevant.
b) The other approach that Windows drivers can take is to leverage the fonts in the printer. It downloads text with commands to use the printer's native fonts. In this case, Windows converts characters from the native code page (e.g.1252, or Unicode) to that required by the printer.
c) You may also choose to send text and commands directly to a printer, as you might on other systems. In this instance, you may want to set -cpprint to the code page of the printer or your chosen printer font, so the characters are mapped correctly.
-cprcodein The code page that text read from R-code is converted from. Text is converted to -cpinternal code page.
-cprcodein was created because version 7.3a didnt write out the code page label to the R-code file. When 7.3b and later versions read the 7.3a R-code files they need to know its code page. -cprcodein should not be used with 73b and later R-code files because it overrides the actual codepage value written in the file when it is created and then the wrong conversion can be performed. So I don't recommend it.
-cprcodeout The code page that text is written out to R-code with. Default value is -cpinternal.
-cpstream The code page for file i/o. Text is converted from -cpstream to -cpinternal on input. Vice versa on output. -cpstream code page is also the default code page for -cpprint, -cpterm code pages.
-cpterm The terminal’s code page. When debugging terminal I/O code page problems, also look at termcap, PROTERMCAP, and on Unix "stty" 8-bit and parity settings.
-stream Same as -cpstream.

Return to Top

Report Builder Parameters

Parameter Notes
-cpcoll Names the collation table to be used with the -cpinternal code page, defining the rules for comparison of characters in the Report Builder. Note databases have their own collation tables for indexes.
-cpinternal The code page used for in memory representation of text and for display to GUI.
-cpstream The code page for file i/o. Text is converted from -cpstream to -cpinternal on input. Vice versa on output. In Report Builder, -cpstream is used with the Export and Memo files. Printing is not affected. There is no -cpprint for Report Builder.
-dSpecifies date format: dmy, mdy, ymd. Default is mdy.
-numdec (decimal code point) Fractional Separator- The supplied decimal number is treated as the value of the character (its code point in the -cpinternal code page) that should be used to separate the integer portion from the fractional portion when displaying DECIMAL numbers.
-numsep (group separator) Thousands Separator- The supplied decimal number is treated as the value of the character (its code point in the -cpinternal code page) that should be used to separate every 3 digits in integers or decimals greater than 999.
-rbcpreportin Report Code Page In
-rbcpreportout Report Code Page Out
-rbcpudfin UDF Code Page In
-rbcpudfout UDF Code Page Out

Return to Top

PROLIB Parameters

Parameter Notes
-codepage Specifies the code page used to record file names. See the Progress Client Deployment Guide.
-date Sets listing date format

Return to Top

Miscellaneous PROGRESS International Startup Parameters

ParameterNotes
-lng Sets the contents of the CURRENT-LANGUAGE variable which determines which of the translated text segments in r-code will be used by PROGRESS. (See Translation Manager.)
-ttwrdrul Temp-table word-break rule (undocumented). Default value is the default rules (0).
Word Indexes in temp-tables should use the same word-break rule files as the rest of the application. By default they do not and simply use the default word rules. This parameter allows you to specify the rules table to be used. This gives you the ability to have temp-tables with proper word breaking for the language you use.
-useOsLocale Sets the Date Format (-d), Fractional Separator (-numdec) and Thousands Separator (-numsep) attributes based on the current Windows locale settings. Very useful for WebClient and simplifies deployment of clients in general.
-noutf8warning If a non-batch client has -cpinternal utf-8, a warning is issued. This parameter disables the warning. Issue #20010919-036. As these clients do not support UTF-8 you should not use the combination "-noutf8warning -cpinternal utf-8" without a clear understanding of the potential corruption that can occur.
-isnoconv Initial Value Segment No Convert. (Compile-Time)
All strings read from R-code must have the correct code page conversion from r-code to -cpinternal. A bug fix to also convert INITIAL value and :U strings causes r-code to grow a bit. This switch causes the conversion to not be performed and to keep the segments at the same size. It is a temporary solution. Change the code to reduce the segment overflow and allow the correct conversions to be performed. RN#: 091A-00121

Return to Top

I18n SESSION handle attributes and methods

AttributeTypeNotes
CHARSET CHARACTER Returns -charset. This attribute is obsolete. See CPINTERNAL Attribute.
CPCASE CHARACTER Returns -cpcase.
CPCOLL CHARACTER Returns -cpcoll.
CPINTERNAL CHARACTER Returns -cpinternal.
CPLOG CHARACTER Returns -cplog.
CPPRINT CHARACTER Returns -cpprint.
CPRCODEIN CHARACTER Returns -cprcodein.
CPRCODEOUT CHARACTER Returns -cprcodein.
CPSTREAM CHARACTER Returns -cpstream.
CPTERM CHARACTER Returns -cpterm.
DATE-FORMAT CHARACTER Provides run-time equivalent of the Date Format (-d) startup parameter. Typical values are ymd, mdy or dmy. Can be used to set or get the date format.
NUMERIC-DECIMAL-POINT CHARACTER Returns the character that represents a number's fractional separator (aka decimal point).
NUMERIC-FORMAT CHARACTER Provides the runtime equivalent of the European Numeric Format (-E) parameter. Returns the numeric format, either "American", "European", or a two-character string containing the thousands separator character followed by the decimal point character. Can set either "American", or "European" values. For other values see the SET-NUMERIC-FORMAT method.
NUMERIC-SEPARATOR CHARACTER Returns the character that is used as a thousands separator in numbers.
STREAM CHARACTER Returns -stream. This attribute is obsolete. See the CPSTREAM Attribute.
YEAR-OFFSET INTEGER Provides the same functionality as the Year Offset (-yy) parameter. Set or Get the current start year for the Progress two-digit year-range of 100 years.
MethodTypeNotes
SET-NUMERIC-FORMAT
(separator, decimal-point)
LOGICAL Sets the NUMERIC-SEPARATOR and NUMERIC-DECIMAL-POINT attributes simultaneously.
DISPLAY SESSION:SET-NUMERIC-FORMAT("_",","). /* shows "TRUE" */

Return to Top

Useful Internationalization 4GL Statements and Functions

4GL Statement or FunctionNotes
CODEPAGE-CONVERT convert from any code page to any code page
COLLATE phrase Query option to compare strings using operator, collation table and strength specified. See Collate Phrase Demo
COMPARE Function to compare strings using operator, collation table and strength specified. See Collate Phrase Demo
CONVERT phrase
  TARGET codepage
  SOURCE codepage
Code page conversion can be specified with the CONVERT phrase on INPUT, OUTPUT, INPUT-OUTPUT statements.
DBCODEPAGE(db_id) Get the code page of a database.
DBCOLLATION(db_id) Get the name of the collation of the database,
GET-CODEPAGES Get a comma separated list of code pages this version of Progress knows about.
GET-COLLATIONS(codepage) Get a comma separated list of collations for the specified code page.
LC, CAPS Lower and Upper case functions. Use these and do not create your own hard-code rules which will not work for other languages or scripts.
LENGTH Specify CHARACTER, RAW, or COLUMN to insure correct units are used. See Unicode Checklist.
OVERLAY Specify CHARACTER, RAW, or COLUMN to insure correct units are used. See Unicode Checklist.
String attributes Use explicit (over)sizing of text with Literal Attributes: L, C, T, R plus string size. e.g. "Hello":R10 Use the :U attribute for object names and keywords that should never be translated. e.g. "Button-1":U
SUBSTITUTE Avoid sentence building. Use SUBSTITUTE instead, so translator can see the whole sentence, have fuller context, change word order and meet other grammatical constraints.
MESSAGE SUBSTITUTE ("There were &1 tables in &2 files")
After Translation: MESSAGE SUBSTITUTE ("Dans les fichiers &2, il y avait &1 tables")
SUBSTRING Specify FIXED, CHARACTER, RAW, or COLUMN to insure correct units are used. See Unicode Checklist.
YEAR(), MONTH(), DAY(), DATE() Use date datatypes and date functions and avoid literal strings representing dates.

Return to Top

PROUTIL CONVCHAR CHARSCAN

Use the charscan utility to verify databases do not contain characters that cannot be converted, prior to conversions. For example, when converting from ISO 8859-1 to ISO 8859-15, you might test that the values 188-190 (the fractions 1/4, 1/2, 3/4) are not used since they do not exist in ISO 8859-15:

PROUTIL <db> -C convchar charscan 1252 "188,189,190"
Charscan searching for iso8859-1 character: 188 0xbc. (6570)
Charscan found a character match in Customer.Comments, recid 103. (6569)
Charscan match count: 1 (6568)

Return to Top

Retired I18n Parameters from Older Versions

(AKA parameters George won't let me forget!)

ParameterNotes
-cpdb V6 Database Code Page
Specifies a code page name for a Version 6 database. In V7 and above the databases store a codepage label in _Db._Db-Xl-Name (In V8 the value is returned by DBCODEPAGE() function).
-xc (language) V6 Extended Alphabet Support/Collation
The argument of -xc is one of the built-in language groups. In V7, -xc is a synonym for -cpcoll.

Return to Top

Other Resources

George Potemkin's list of new and/or undocumented startup parameters is a great resource.
KB 20633 I18N. Internationalization Startup Parameters Explained

Return to Top