All subscripted local variables for a process must use the same collation sequence. The collation sequence used by local variables can be established as a default or in the current process. The local collation sequence can only be changed when a process has no subscripted local variables defined.
To establish a default local collation sequence define the logical name:
$ DEFINE GTM_LOCAL_COLLATE n
where n is the number of a collation sequence, which matches a valid collation number defined by a logical name in the form GTM_COLLATE_n.
An active process can use the %LCLCOL utility to define the collation sequence for subscripts of local variables. %LCLCOL has these extrinsic entry points:
set^%LCLCOL(n)changes the local collation to the type specified by n.
If the collation sequence is not available, the routine returns a false (0) and does not modify the local collation sequence.
Example:
IF '$$set^%LCLCOL(3) D . W "local collation sequence not changed",! B
This piece of code illustrates $$set^LCLCOL used as an extrinsic. It would write an error message and BREAK if the local collation sequence was not set to 3.
get^%LCLCOLreturns the current local type.
Example:
GTM> WRITE $$get^%LCLCOL 0
This example uses $$get^%LCLCOL as an extrinsic that returns 0, indicating that the effective local collation sequence is the standard M collation sequence.
If set^%LCLCOL is not specified and GTM_LOCAL_COLLATE is not defined, or is invalid, the process uses M standard collation. The following would be considered invalid values:
A value less than 0
A value greater than 255
a legal collation sequence that is inaccessible to the image
Inaccessibility could be caused by a missing logical name, a missing image, or by security denial of access.