Progress
Language Reference


GET-COLLATIONS Function

Interfaces
OS
SpeedScript
All
All
Yes

The GET-COLLATIONS function returns a comma-delimited list of the collations either listed in convmap.cp or specified by the Conversion Map (-convmap) startup parameter for the specified code page.

SYNTAX

GET-COLLATIONS ( codepage ) 

codepage

A code page name. If there are no collations for the specified code page, Progress returns the unknown value (?).

EXAMPLE

This procedure displays a list of the code pages available in memory for the current Progress session and the collations available for each code page.

r-get.p
DEF VARIABLE code-page-list AS CHARACTER.
DEF VARIABLE collation-list AS CHARACTER.
DEF VARIABLE i AS INTEGER.
DEF VARIABLE j AS INTEGER.

code-page-list = GET-CODEPAGES.

REPEAT i = 1 TO NUM-ENTRIES(code-page-list):
  DISPLAY ENTRY(i,code-page-list) FORMAT "x(19)" COLUMN-LABEL "Code Page"
    WITH DOWN FRAME a.
  collation-list = GET-COLLATIONS(ENTRY(i,code-page-list)).
  REPEAT j = 1 TO NUM-ENTRIES(collation-list):
    DISPLAY ENTRY(j,collation-list) FORMAT "x(19)" COLUMN-LABEL "Collation"
      WITH DOWN FRAME a.
    DOWN WITH FRAME a.
  END.
END. 

SEE ALSO

GET-CODEPAGES Function


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095