$nlssortorder
Set or return the current sequencing rules to apply when sorting strings in entities and lists, or reading occurrences from the hitlist.
$nlssortorder =
"nlslocale"
| "classic"
| "binary"
Result =
$nlssortorder
Example:
$nlssortorder = "BINARY"
Parameters
Parameter | Description |
---|---|
NLSLOCALE
|
Applies locale-based sorting for
strings, if $nlslocale is not set to classic . |
CLASSIC
|
No locale-based sorting rules are applied. |
BINARY
|
Binary ordering |
Return Values
Returns a string indicating the sort order currently in use.
Use
Allowed in all component types except self-contained Report and Services.
Description
Use the $nlssortorder function to check, set, or change the way in which string data is sequenced by:
- ProcScript sort commands (sort, sort/list, $sort, and $sortlist)
- The order by clause of the read statement. This is used to sort data in the hitlist (in other words, when the hitlist is sorted by Uniface, not the database).
The value $nlssortorder may be overridden by the Type option of ProcScript sort commands.
Setting $nlssortorder in ProcScript overrides the value of the $NLS_SORT_ORDER assignment setting, if set.
If $NLS_SORT_ORDER is not set, the value of $nlslocale is used.
If $nlslocale is not set, the default sort order for strings is binary.
Using $nlssortorder
The following example saves the current sorting order in variable vOrder, and sets the current sorting order to BINARY:
variables string vOrder endvariables vOrder = $nlssortorder ; save current sort order $nlssortorder = "BINARY" ; set sort order to BINARY sort/e "COUNTRY_CODES", "CODE.COUNTRY:a" ; sort country codes as binary $nlssortorder = vOrder ; restore original sort order
Version | Change |
---|---|
9.4.01 | Introduced |