Specifies the type of IMS TM transaction being used.
This function is for use with IMS TM programs only.
CICS programs ignore this call, however, MVS programs do not.
% 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);
(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.
(O) Variable where the result of function execution is returned. Its value is one of the codes listed in Table 3-34.
(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.
(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.
(I) Reserved for future use.
(I) Reserved for future use.
The RETCODE argument can contain any of the return values listed in Table 3-34.
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. |
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]
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.
TDSETPT is used with IMS TM programs only. If this function is called in a CICS program, Gateway-Library ignores the function and assumes that the program is a standard CICS program.
TDSETPT follows TDINIT and precedes TDACCEPT in a Gateway-Library program.
Because the default program type is MPP, coding TDSETPT immediately after TDINIT is particularly important for BMP, conversational (CONV), and explicit (EXPL) programs.
If your transaction is conversational (CONV), you must
insert the scratch pad area into the IO/PCB before sending
the results with TDSNDROW.
Related functions
Related topics
Related documentation
Mainframe Connect Server Option for IMS and MVS Installation and Administration Guide