Consultor Eletrônico



Kbase P17707: Which code page is my printer using in this Progress session
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/03/2003
Status: Unverified

GOAL:

How to access the code page values being used in the current Progress session?

FIX:

/***The following code demonstrates how to access all the 9 code page values used in the current Progress session:

1. The SESSION:CPCASE attribute returns the case code page Progress uses to establish case rules for the Internal Code Page (-cpinternal) startup parameter.

This attribute reads the value set using the Case Code Page (-cpcase)
startup parameter.
***/
MESSAGE "The CASE code page currently being used is: " SESSION:CPCASE
VIEW-AS ALERT-BOX INFO BUTTONS OK.

/***
2. The SESSION:CPCOLL attribute returns the collation code page Progress uses with the Internal Code Page (-cpinternal) startup parameter.

This attribute reads the value set using the Collation Code Page (-cpcoll)
startup parameter.
***/
MESSAGE "The COLLATION code page currently being used is: " SESSION:CPCOLL
VIEW-AS ALERT-BOX INFO BUTTONS OK.

/***
3. The SESSION:CPINTERNAL attribute returns the internal code page Progress uses in memory.

This attribute reads the value set using the Internal Code Page (-cpinternal)
startup parameter.
***/
MESSAGE "The INTERNAL code page currently being used is: " SESSION:CPINTERNAL
VIEW-AS ALERT-BOX INFO BUTTONS OK.

/***
4. The SESSION:CPLOG attribute returns The code page for all messages written to the log ( .lg) file.

This attribute reads the value set using the Log File Code Page (-cplog) startup parameter.
***/
MESSAGE "The LOG FILE code page currently being used is: " SESSION:CPINTERNAL
VIEW-AS ALERT-BOX INFO BUTTONS OK.

/***
5. The SESSION:CPPRINT attribute returns the OUTPUT TO PRINTER statement code page.

This attribute reads the value set using the Printer Code Page (-cpprint) startup parameter.
***/
MESSAGE "The PRINTER code page currently being used is: " SESSION:CPPRINT
VIEW-AS ALERT-BOX INFO BUTTONS OK.

/***
6. The SESSION:CPRCODEIN attribute returns the code page Progress uses to convert text strings into the text segment.

This attribute reads the value you set using the R-code In Code Page (-cprcodein) startup parameter.
***/
MESSAGE "The R-CODE IN Code Page currently being used is: " SESSION:CPRCODEIN
VIEW-AS ALERT-BOX INFO BUTTONS OK.

/***
7. The SESSION:CPRCODEOUT attribute return the code page Progress uses at compile time to convert text strings into the
text segment and marks the text segment with the code page name.

This attribute reads the value you set using the R-code Out Code Page (-cprcodeout) startup parameter.
***/
MESSAGE "The R-CODE OUT Code Page currently being used is: " SESSION:CPRCODEOUT
VIEW-AS ALERT-BOX INFO BUTTONS OK.

/***
8. The SESSION:CPSTREAM attribute return the code page Progress uses for stream I/O.

This attribute reads the value you set using the Stream Code Page (-cpstream) startup parameter.
***/
MESSAGE "The STREAM I/O Code Page currently being used is: " SESSION:CPSTREAM
VIEW-AS ALERT-BOX INFO BUTTONS OK.

/***
9. The SESSION:CPTERM attribute the code page Progress uses for I/O with character terminals.

This attribute reads the value you set using the Terminal Code Page (-cpterm) startup parameter.
***/
MESSAGE "The character TERMINAL I/O Code Page currently being used is: " SESSION:CPTERM
VIEW-AS ALERT-BOX INFO BUTTONS OK.