Sets the Shift Out/Shift In (“SO/SI”) processing options for a column or parameter.
This function is used with the Japanese Conversion Module
(JCM).
%INCLUDE SYGWPLI;
01 TDPROC PTR, 01 RETCODE FIXED BIN(31), 01 OBJECT_TYPE FIXED BIN(31), 01 OBJECT_NUMBER FIXED BIN(31), 01 STRIP_SOSI FIXED BIN(31);
CALL TDSETSOI (TDPROC, RETCODE, OBJECT_TYPE, OBJECT_NUMBER, STRIP_SOSI);
(I) Handle for this client/server connection. This must be the same value specified in the associated TDACCEPT call. The TDPROC handle corresponds to the connection and command handles in Open Client Client-Library.
(O) Variable where the result of function execution is returned. Its value is one of the codes listed in Table 3-35.
(I) Indicator for type of object being set. This argument indicates whether the object being described is a column in a return row or a return parameter.
Assign this argument one of the following values:
TDS_OBJECT_COL (1) |
Object is a column in a return row. |
TDS_OBJECT_PARM (2) |
Object is a return parameter. |
(I) Number of the column or parameter being set.
If the object is a column, this is the number of the column with the SO/SI option that is being set. Columns are numbered sequentially; the first column in a row is number 1.
If the object is a parameter, this is the number of the parameter with the SO/SI option that is being set. All parameters are counted, whether or not they are return parameters. Parameters are numbered sequentially; the first parameter is number 1.
(I) The SO/SI processing option being set for this column or parameter.
Assign STRIP_SOSI one of the following values:
TDS_STRIP_SOSI (0) |
SO/SI codes are stripped at the mainframe before being sent to the client. This is the default. |
TDS_BLANK_SOSI (1) |
SO/SI codes are converted to blanks before being sent to the client. The length of the object does not change. |
The RETCODE argument can contain any of the return values in Table 3-35.
Return value |
Meaning |
---|---|
TDS_OK (0) |
Function completed successfully. |
TDS_ENTRY_NOT_FOUND (-8) |
The specified column number, transaction number, or parameter does not exist. |
TDS_INVALID_FLAGS (-176) |
Invalid padding option for a field. |
TDS_INVALID_PARAMETER (-4) |
Invalid parameter value. The value assigned to one or more of the arguments supplied in the call is not valid. The operation failed. |
TDS_INVALID_TDPROC (-18) |
Error in specifying a value for the TDPROC argument. |
Use this function to specify whether SO/SI codes are stripped or converted to blanks for a specified column or parameter before results are returned to the client.
SO/SI codes are inserted around double-byte character strings when the client request is received by the Gateway-Library program. The TDSETSOI setting determines what happens to those codes when the string is returned to the client.
If a program uses TDSETSOI to handle SO/SI codes when there are no SO/SI codes or blanks surrounding kanji characters, the TDSETSOI setting is ignored.
SO/SI codes are used with character datatypes. Graphic datatypes do not use SO/SI codes.
Replacing SO/SI codes with blanks maintains the length of the string. Otherwise, if SO/SI codes are stripped, the result length is shorter than the source length. Unless you know in advance how many pairs of SO/SI codes are in the source string, it is difficult to know what the result length will be.
For a discussion of Shift Out and Shift In codes, read “Character sets” and “Processing Japanese client requests”.
Related functions
Related topics