Consultor Eletrônico



Kbase P123805: How to build a database for a specific code page
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/26/2010
Status: Verified

GOAL:

How to build a database for a specific code page

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.x
OpenEdge 10.x

FIX:

This setup method would be used when UTF-8 support is not being used, multiple codepage support is desired and the database to be built is not the default code page of the install.

Follow these steps to build a database for a specific code page, substituting the proper *.pf and promsgs.* and empty* files from the prolang directory for the desired code page support.

The example below is for the sch/gb3212 code page.

1. Create a working directory for the database.
2. Copy the promsgs.sch file from the $DLC/prolang/sch/promsgs.sch to the just created working directory.
3. Rename from promsgs.sch to promsgs.
4. Copy the gb2312.pf file to the working directory.
5. Set variables for PROMSGS, WRKDIR, PROSTARTUP and PATH in the scripts for starting the database so the proper environment is set for this code page.
PROMSGS=<path-to-working-dir>/promsgs;export PROMSGS
WRKDIR=<path-of-working-directory>;export WRKDIR
PROSTARTUP=<path-of-working-directory>/gb2312.pf; export PROSTARTUP
PATH=$DLC:$DLC\bin:<other-important-directories>;export PATH

Note: if log file is to be in another code page, set the -cplog startup parameter to the desired target code page.
example of startup parameter:
-cplog ISO8859-1

6. Create the structure for the database with the prostrct create utility and a .st file with the desired structure format.
prostrct create dbname db.st
7. Copy empty of the matching block size from the $DLC/prolang/sch/gb3212/ directory in to the void structure which was just built.
procopy $DLC/prolang/sch/gb3212/empty4 dbname
8. Start the database with the desired startup parameters.