Consultor Eletrônico



Kbase 16933: AS/400 Native 4GL: Codepages And -cpstream Parameter
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   21/11/2006
Status: Unverified

GOAL:

How to make use of a code page startup parameters when working with the Progress/400 Native 4GL compiler.

FACT(s) (Environment):

IBM AS/400 (RISC)
Progress/400 DataServer

FIX:

Progress documentation states that default values for these parameters are iso8859-1 for -cpinternal and ibm850 for -cpstream.

This is not true when working with the Progress/400 Native 4GL compiler. The real default is ibm037 for -cpinternal, -cpstream, -cpprint, -cpterm, -charset and -cplog.

The real important parameter is -cpstream. When working with AS/400, where the system code page (DSPSYSVAL QCHRID) is different than 037 (USA), you may get the following problems:

- If the source code contents square brackets (]), for example for
extents, when compiling the source you get errors like:
NOTE: ** Unknown Field or Variable name - field[i]. (201)

- If the source code contents literals with accentuated characters
and prints them using OUTPUT TO file, they are converted to strange
characters.

Other errors you may get are:

NOTE: ** PROGRAM.P Could not understand line 5. (196)
NOTE: ** Unable to run startup procedure PROGRAM.P. (492)

To avoid these problems, specify in the -cpstream startup parameter the code page which your AS/400 is using. For example, when running the program PROGRAM.P on a Spanish AS/400 (codepage 284), execute the STRPROCLI like this:

STRPROCLI PROGRAM.P DBNAME PROPARMS('-cpstream ibm284') where DBNAME is the name of your database.