TDSETPT

Description

Specifies the type of IMS TM transaction being used.

NoteThis function is for use with IMS TM programs only. CICS programs ignore this call, however, MVS programs do not.

Syntax

% INCLUDE SYGWPLI;
01 IHANDLE   PTR,
01 RETCODE   FIXED BIN(31),
01 PROG_TYPE CHAR(4), 
01 SPA       CHAR(n),
01 RESERVED1 FIXED BIN(31),
01 RESERVED2 FIXED BIN(31);
CALL TDSETPT (IHANDLE, RETCODE, PROG_TYPE, SPA,
               RESERVED1,RESERVED2);

Parameters

IHANDLE

(I) A transaction-wide structure that contains information used to set up the Gateway-Library environment. This must be the same IHANDLE specified in the program’s initial TDINIT call. It corresponds to the context structure 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-34.

PROG_TYPE

(I) Type of IMS TM program being called. This is a four-byte padded field.

Assign this argument one of the following IMS TM program types:

MPP

An IMS TM online (implicit or Adapter) message processing program that runs in an IMS TM message processing region. This is the default.

BMP

An IMS TM batch message program that runs in an IMS TM batch message processing region.

CONV

An IMS TM message processing program that uses the IMS TM scratch pad area (SPA).

EXPL

An IMS TM message processing program that uses the explicit API. This is the only option that supports long-running transactions.

Under CICS: If you leave this field blank, Gateway-Library ignores this value and assumes a standard CICS program.

Under IMS TM: If you leave this field blank, Gateway-Library assumes a standard IMS TM MPP program.

Under MVS: PROG_TYPE must be EXPL.

SPA

(I) The IMS TM scratch pad area where conversational transaction results are stored.

When PROG_TYPE is CONV, this argument is required. For other program types, set this field to zeroes, and Gateway-Library ignores this field.

RESERVED1

(I) Reserved for future use.

RESERVED2

(I) Reserved for future use.

Returns

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

Table 3-34: TDSETPT return values

Return value

Meaning

TDS_OK (0)

Function completed successfully.

TDS_INVALID_IHANDLE (-19)

Invalid IHANDLE specification. Error in specifying a value for the IHANDLE argument.

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.

Examples

Example 1

The following code fragment illustrates the use of TDINIT, TDSETPT, and TDACCEPT at the beginning of a Gateway-Library program. This example is taken from the sample program SYIXSAM1, listed in Appendix D, “Sample RPC Application for IMS TM (Explicit).”

  /* 	------------------------------------------------------------*/ 
  /* 	establish gateway environment                               */ 
  /* 	------------------------------------------------------------*/ 
  	CALL TDINIT (P_PCBTERM, GWL_RC, GWL_INIT_HANDLE); 
              .                                   
              .   [check return code]     
              .                          
  /* 	------------------------------------------------------------*/ 
  /* 	set program type to MPP 							*/ 
  /* 	------------------------------------------------------------*/ 
  	GWL_PROG_TYPE = ‘EXPL’; 
  	CALL TDSETPT 		(GWL_INIT_HANDLE, GWL_RC, GWL_PROG_TYPE, 
	GWL_SPA_PTR, TDS_NULL, TDS_NULL); 
              .                                   
              .   [check return code]     
              .                          
  /* 	------------------------------------------------------------*/ 
  /* 	accept client request 							*/ 
  /* 	------------------------------------------------------------*/ 
  	CALL TDACCEPT (GWL_PROC, GWL_RC, GWL_INIT_HANDLE, 
	SNA_CONNECTION_NAME, 
	SNA_SUBC); 
              .   [check return code]

Usage


TDSETPT

This function tells Gateway-Library which type of IMS TM transaction is being called and, if the transaction is conversational (CONV), the address of the scratch pad area.

See also

Related functions

Related topics

Related documentation