TDGETSOI

Description

Queries the Shift Out/Shift In (SO/SI) processing settings for a column or parameter.

NoteThis function is used with the Japanese Conversion Module (JCM).

Syntax

COPY SYGWCOB.
01   TDPROC        PIC S9(9)  USAGE COMP SYNC.
01   RETCODE       PIC S9(9)  USAGE COMP SYNC.
01   OBJECT-TYPE   PIC S9(9)  USAGE COMP SYNC.
01   OBJECT-NUMBER PIC S9(9)  USAGE COMP SYNC.
01   STRIP-SOSI    PIC S9(9)  USAGE COMP SYNC.
CALL 'TDSETSOI' USING TDPROC, RETCODE, OBJECT-TYPE, 
OBJECT-NUMBER, STRIP-SOSI.

Parameters

TDPROC

(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.

RETCODE

(O) Variable where the result of function execution is returned. Its value is one of the codes listed in Table 3-10.

OBJECT-TYPE

(I) Type of object to be checked. This argument specifies which type of object is checked by this call: a column in a return row or a return parameter.

Assign OBJECT-TYPE 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.

OBJECT-NUMBER

(I) Order number of the column or parameter being checked.

If the object is a column, this is the position of the column in the row, counting from left to right. Columns are numbered sequentially with the leftmost column in a row number 1.

If the object is a return parameter, this is the number of the parameter with the value that is being checked. All parameters are counted, whether or not they are return parameters. Parameters are numbered sequentially with the first parameter number 1.

STRIP-SOSI

(O) The SO/SI processing setting being used for this column or parameter.

STRIP-SOSI returns one of the following values:

TDS-STRIP-SOSI (0)

SO/SI codes are stripped 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.

Returns

The RETCODE argument can contain any of the return values listed in Table 3-10.

Table 3-10: TDGETSOI return values

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.

Examples

Example 1

The following code fragment uses TDGETSOI to replace SO/SI codes with blanks before retrieving parameters and again before returning data to the client. This example is not included on the Open ServerConnect API tape, but is available to Japanese customers on the Japanese Conversion Module tape.

 ****************************************************************
  PROCEDURE DIVISION.
 ****************************************************************
      CALL ‘TDINIT’   USING DFHEIBLK, GWL-RC, GWL-INIT-HANDLE.
 *
      CALL ‘TDACCEPT’ USING GWL-PROC, GWL-RC, GWL-INIT-HANDLE,
                            SNA-CONNECTION-NAME,
                            SNA-SUBC.
 *
      CALL ‘TDRESULT’ USING GWL-PROC, GWL-RC.
 *
 *    get the information of sosi
 *
      MOVE TDS-OBJECT-PARM  TO PRM-01-OBJ-TYPE.
      MOVE PRM-01-ID        TO PRM-01-OBJ-ID.
      CALL ‘TDGETSOI’ USING GWL-PROC, GWL-RC,
                                PRM-01-OBJ-TYPE,
                                PRM-01-OBJ-ID,
                                PRM-01-STRIP-SOSI.
 *
      IF PRM-01-STRIP = TDS-STRIP-SOSI
      THEN
 *
 *    specify the embedded blanks to the parameter
 *
      MOVE TDS-BLANK-SOSI  TO PRM-01-STRIP-SOSI
           CALL ‘TDSETSOI’ USING GWL-PROC, GWL-RC,
                                    PRM-01-OBJ-TYPE,
                                    PRM-01-OBJ-ID,
                                    PRM-01-STRIP-SOSI
 *
      END-IF
 *
      MOVE TDSCHAR            TO PRM-01-HOST-TYPE.
 *
      MOVE LENGTH OF PRM-01-DATA TO PRM-01-MAX-LEN.
 *
      CALL ‘TDRCVPRM’ USING GWL-PROC, GWL-RC,
                            PRM-01-ID,
                            PRM-01-AREA,
                            PRM-01-HOST-TYPE,
                            PRM-01-MAX-LEN,
                            PRM-01-ACT-LEN.
 *      CALL ‘TDESCRIB’ USING GWL-PROC, GWL-RC,
                            COL-01-NUM,
                            COL-01-HOST-TYPE,
                            COL-01-HOST-LEN,
                            COL-01-AREA,
                            COL-01-NULL-INDICATOR,
                            TDS-FALSE,
                            COL-01-CLIENT-TYPE,
                            COL-01-CLIENT-LEN,
                            COL-01-NAME,
                            COL-01-NAME-LEN.
 *
 *    get the information of sosi
 *
      MOVE TDS-OBJECT-COL TO COL-01-OBJ-TYPE.
      MOVE COL-01-NUM    TO COL-01-OBJ-ID.
      CALL ‘TDGETSOI’ USING GWL-PROC, GWL-RC,
                            COL-01-OBJ-TYPE,
                            COL-01-OBJ-ID,
                            COL-01-STRIP-SOSI.
 *
      IF COL-01-STRIP-SOSI = TDS-STRIP-SOSI
      THEN
 *
 *    specify the embedded blanks to the column
 *
      MOVE TDS-BLANK-SOSI TO COL-01-STRIP-SOSI
      CALL ‘TDSETSOI’ USING GWL-PROC, GWL-RC,
                            COL-01-OBJ-TYPE,
                            COL-01-OBJ-ID,
                            COL-01-STRIP-SOSI
      END-IF
 *
 *
      PERFORM FETCH-AND-SEND-ROWS UNTIL ALL-DONE.

Usage

See also

Related functions

Related topics