SIGN CL (Change Locale) can be used to change the user-specific locale of the current user ID, i.e. the language identifier, the territory identifier and the name of the employed character set can be rolled back provided that the current user ID is a genuine user ID (not a connection user ID).
SIGN CL is only permitted in dialog program units of a UTM application which is configured using user IDs. Administration privileges is not necessary.
If the call is successful, then the new locale is valid as of the next end of transaction. All messages in the current transaction are processed using the old character set name. It is therefore advisable to terminate the program unit at the end of transaction, but without issuing a dialog message to the terminal if the character set name of the user has changed.
If you only want to change specific components of the location, you have to set binary zero for the remaining components.
Modifications performed with SIGN CL remain valid after a KDCUPD run. KDCUPD implicitly transfers the current values of a user location to the new KDCFILE.
SIGN CL is an upwards compatible extension of DIN 66265.
Setting the KDCS parameter area (1st parameter) with SIGN CL
Function of the call | Entries in the KDCS parameter area | ||||
---|---|---|---|---|---|
KCOP | KCOM | KCLANGID | KCTERRID | KCCSNAME | |
Change locale of user ID | SIGN | CL | New language identifier of user ID | New territory identifier of user ID | CCS name of new character set for user ID |
Setting the parameters | |
Field name in the KDCS parameter area | Contents |
"SIGN" | |
"CL" | |
Language identifier of user / binary zero | |
Territory identifier of user / binary zero | |
Character set name of user / binary zero |
KDCS call | |
2nd parameter | |
KDCS parameter area | — |
C/C++ macro call | |
Parameters | |
KDCS_SIGNCL | (nb,kclangid,kcterrid,kcccsname) |
openUTM return information | |
---|---|
Field name in KB return area | Contents |
Return code | |
Internal return code |
For the SIGN call with CL operation modifier you make the following entries in the KDCS parameter area:
KCOP
In the KCOP field, the SIGN operation name.
KCOM
In the KCOM field, the operation modifier
- CL: Change locale of user ID.
KCLANGID
In the KCLANGID field, the new language identifier which is to be assigned to the user ID from which the service was started. The length of the language identifier is 2 bytes. Enter binary zero in KCLANGID if you do not want to change the language identifier.
KCTERRID
In the KCTERRID field, the new territory identifier which is to be assigned to the user ID from which the service was started. The length of the territory identifier is 2 bytes.Enter binary zero in KCTERRID if you do not want to change the territory identifier.
KCCSNAME
In the KCCSNAME field, the CCS name of the new character set to be assigned to the user ID. The length of the CCS name is 8 bytes maximum.
Enter binary zero in KCCSNAME if you do not want to assign a new character set.
You specify the following for the KDCS call:
1st parameter
The address of the KDCS parameter area.
Macro name
The use of C/C++ calls is described in detail in the section "C/C++ macro interface".
openUTM returns:
KCRCCC
in the KCRCCC field, the KDCS return code (length 3 bytes). See below for possible return codes and their meaning.
KCRCDC
in the KCRCDC field: the internal return code of openUTM (see the openUTM manual ”Messages, Debugging and Diagnostics”).
KDCS return codes in the KCRCCC field for the SIGN CL call
The following codes can be analyzed in the program:
000 | Operation carried out, the specified component(s) of the location have been changed. |
40Z | The system was not able to perform the operation (generation error). |
41Z | SIGN CL is not allowed at this point:
|
46Z | Specifications for the new locale are incorrect. The location of the user ID is not changed. openUTM returns the precise cause in the KCRCDC field. |
49Z | When the function was called, unused fields in the KDCS parameter area were not set to binary zero. |
An additional return codes can be found in the dump:
71Z | No INIT call issued in the program unit. |