Previous Next

GET-COLLATIONS function
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, the AVM returns the Unknown value (?).
Example 
This procedure displays a list of the code pages available in memory for the current ABL session and the collations available for each code page:
 
DEFINE VARIABLE code-page-list AS CHARACTER NO-UNDO.
DEFINE VARIABLE collation-list AS CHARACTER NO-UNDO.
DEFINE VARIABLE ix             AS INTEGER   NO-UNDO.
DEFINE VARIABLE jx             AS INTEGER   NO-UNDO.
 
code-page-list = GET-CODEPAGES.
 
REPEAT ix = 1 TO NUM-ENTRIES(code-page-list):
  DISPLAY ENTRY(ix, code-page-list) FORMAT "x(19)" COLUMN-LABEL "Code Page"
    WITH DOWN FRAME a.
  collation-list = GET-COLLATIONS(ENTRY(ix, code-page-list)).
 
  REPEAT jx = 1 TO NUM-ENTRIES(collation-list):
    DISPLAY ENTRY(jx, collation-list) FORMAT "x(19)" 
      COLUMN-LABEL "Collation"
      WITH DOWN FRAME a.
    DOWN WITH FRAME a.
  END.
END.
See also 
GET-CODEPAGES function

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.