Previous Topic
Table Of Contents
Parent Topic
Next Topic
| |
Related Topics
Web Server API Function Index
SWSAppcConnect is the Web Server API function used to execute an IMS transaction and
receive output from the transaction.
SWCPAC Call Arguments
The SWSAppcConnect (SWCPAC) function arguments are described in the table which
follows. All parameters are required.
Arg.
No. |
HLL Argument Type |
I/O |
Description of Argument |
C |
COBOL |
PL/I |
1 |
LONG |
PIC
S9(5)
COMP |
FIXED
BIN(31) |
Input |
Statement Handle. Currently ignored however, it must contain zeros. |
2 |
LONG |
PIC
S9(5)
COMP |
FIXED
BIN(31) |
Input |
IMS Call type. SWS-APPC-TYPE-IMS for non-conversational IMS transactions.
SWS-APPC-TYPE-IMSCONV for conversational IMS transactions. |
3 |
CHAR * |
PIC
X(64) |
CHAR(64) |
Input |
IMS Transaction Name. A field containing the name of an IMS Transaction Code. |
4 |
LONG |
PIC
S9(5)
COMP |
FIXED
BIN(31) |
Input |
IMS Transaction Name length. |
5 |
CHAR * |
PIC
X(17) |
CHAR(17) |
Input |
Partner LU Name. The APPC LU Name of the IMS System. |
6 |
LONG |
PIC
S9(5)
COMP |
FIXED
BIN(31) |
Input |
Security Type. CM_SECURITY_NONE to omit access security information
CM_SECURITY_SAME to use the UserID and security profile of the user that
initiated the request.
CM_SECURITY_PROGRAM to use the UserID and security profile supplied by the
program. |
7 |
CHAR * |
PIC
X(8) |
CHAR(8) |
Output |
Conversation ID of the APPC Call. |
8 |
LONG |
PIC
S9(5)
COMP |
FIXED
BIN(31) |
Input |
Input buffer length. |
9 |
CHAR * |
PIC
X(2 - 32704) |
CHAR(2 - 32704) |
Input |
Input buffer. The input buffer is comprised of a 2 byte prefix containing the binary
length of the buffer data followed by the IMS Message Input Descriptor (MID) data. |
10 |
LONG |
PIC
S9(5)
COMP |
FIXED
BIN(31) |
Output |
Output buffer length. |
11 |
CHAR * |
PIC
X(2 - 32704) |
CHAR(2 - 32704) |
Output |
Output buffer. The output buffer is comprised of a 2 byte prefix containing the binary
length of the buffer data followed by the IMS Message Output Descriptor (MOD) data. |
12 |
LONG |
PIC
S9(5)
COMP |
FIXED
BIN(31) |
Output |
Return Code. |
13 |
CHAR * |
PIC
X(8) |
CHAR(8) |
Input |
Local LU Name Specifies the name of a local LU from which the caller's allocate
request is to originate. This is provides the ability to associate a transaction request
with a particular LU name.
Note: Optional parameter. If used, it requires the use of Mode Name,
Symbolic Partner LU Name, User ID, Password and Security Profile be coded. |
14 |
CHAR * |
PIC
X(8) |
CHAR(8) |
Input |
Mode Name Specifies the Mode name designating the network properties for the local
LU Name.
Note: Optional parameter. If used, it requires the use of Local LU Name,
Symbolic Partner LU Name, User ID, Password and Security Profile be coded. |
15 |
CHAR * |
PIC
X(8) |
CHAR(8) |
Input |
Symbolic Name Specifies the symbolic name representing the IMS APPC LU Name, Mode
Name, Transaction Name. The symbolic destination name must match that of an entry in the
side information dataset. If you specify any pass any of the parameters (Local LU Name,
Mode Name or Transaction Name), these will override the information retrieved and used to
initialize the the characteristics of the conversation.
Note: Optional parameter. If used, it requires the use of Local LU Name,
Mode Name, User ID, Password and Security Profile. |
16 |
CHAR * |
PIC
X(10) |
CHAR(10) |
Input |
User ID The Partner LU uses this value and the Password to validate the identity of
the end user that initiated the request.
Note: Optional parameter. If used, it requires the use of Local LU Name,
Mode Name, Symbolic Partner LU Name, Password and Security Profile. |
17 |
CHAR * |
PIC
X(10) |
CHAR(10) |
Input |
Password The Partner LU uses this value and the User ID to validate the identity of
the end user that initiated the request.
Note: Optional parameter. If used, it requires the use of Local LU Name,
Mode Name, Symbolic Partner LU Name, User ID and Security Profile. |
18 |
CHAR * |
PIC
X(10) |
CHAR(10) |
Input |
Security Profile Specifies additional security information that may be used to
determine what partner programs the local program may access.
Note: Optional parameter. If used, it requires the use of Local LU Name,
Mode Name, Symbolic Partner LU Name, User ID and Password. |
19 |
LONG |
PIC
S9(5)
COMP |
FIXED
BIN(31) |
Output |
Data Type Received. Specifies the action taken to receive the output data.
CM_NO_DATA_RECEIVED Specifies that no additional data is to be sent to the
Partner LU, and the data may be buffered until a sufficient quantity is accumulated.
CM_DATA_RECEIVED Specifies that no additional data is to be sent to the Partner
LU, and the data is to be sent immediately.
CM_COMPLETE_DATA_RECIEVED Specifies that the data is to be sent immediately
along with a request for confirmation.
CM_INCOMPLETE_DATA_RECEIVED Specifies that the data is to be sent immediately
along with send control of the conversation.
Note: Optional parameter. If used, it requires that placeholders be
specified for Local LU Name, Mode Name, Symbolic Partner LU Name, User ID, Password and
Security Profile. |
20 |
LONG |
PIC
S9(5)
COMP |
FIXED
BIN(31) |
Input |
Data Type Sent. Specifies the action to take once the APPC Conversation is
established.
CM_BUFFER_DATA Specifies that no additional data is to be sent to the Partner
LU, and the data may be buffered until a sufficient quantity is accumulated.
CM_SEND_AND_FLUSH Specifies that no additional data is to be sent to the Partner
LU, and the data is to be sent immediately.
CM_SEND_AND_CONFIRM Specifies that the data is to be sent immediately along with
a request for confirmation.
CM_SEND_PREP_TO_RECEIVE Specifies that the data is to be sent immediately along
with send control of the conversation.
CM_SEND_AND_DEALLOCATE Specifies that the data is to be sent immediately along
with a deallocation notification.
Note: Optional parameter. If used, it requires that placeholders be
specified for Local LU Name, Mode Name, Symbolic Partner LU Name, User ID, Password and
Security Profile. |
21 |
LONG |
PIC
S9(5)
COMP |
FIXED
BIN(31) |
Input |
Synchronization Level Specifies whether or not confirmation processing will be
performed on this conversation.
CM_NONE No confirmation processing is required for this conversation.
CM_CONFIRM Confirmation processing is required for this conversation.
Note: Optional parameter. If used, it requires that placeholders be
specified for Local LU Name, Mode Name, Symbolic Partner LU Name, User ID, Password,
Security Profile and Data Type Sent. |
Top
Return Values
SWSAppcConnect always sets a signed numeric return code value. Possible values are:
- SWS_SUCCESS
- The operation succeeded. The specified operation was performed.
- SWS_ERROR
- A parameter validation or run-time error was encountered. Error information is available
using the SWSERROR function.
- SWS_ENVIRONMENT_ERROR
- The request can not be processed because of a run-time environmental error. For example,
you invoked the API service outside of a Web transaction procedure or from outside the
server's address space. Use the server's wrap-around trace to obtain diagnostic
information.
- Any other value
- The operation failed. By using the SWSERROR interface, you may obtain the error message
pertinent to the error.
-
PL/I Example
%INCLUDE SPCPHD
%INCLUDE ATBCMPLI
%INCLUDE ATBPBPLI
.
.
.
.
DCL STMTHDL FIXED BIN(31); /* Statement Handle */
DCL RC FIXED BIN(31); /* RETURN CODE */
DCL SENDLEN FIXED BIN(31); /* SEND LENGTH */
DCL RECVLEN FIXED BIN(31); /* RECEIVE LENGTH */
DCL SENDBUF CHAR(82) /* SEND BUFFER */
DCL RECVBUF CHAR(82) /* RECEIVED BUFFER */
DCL (FILL_1 initial(' ')
FILL_2 initial(' ')
FILL_3 initial(' ')) char(8);
DCL (FILL_4 initial(' ')
FILL_5 initial(' ')
FILL_6 initial(' ')) char(10);
CALL SWSAPPCCONNECT(STMTHDL, /* STATEMENT HANDLE */
SWS_APPC_TYPE_IMS,
TP_NAME,
TP_NAME_LENGTH,
PARTNER_LU_NAME,
ATB_SECURITY_NONE,
CONVERSATION_ID,
SENDLEN,
SENDBUF,
RECVLEN,
RECVBUF,
RC,
FILL_1,
FILL_2,
FILL_3,
FILL_4,
FILL_5,
FILL_6,
RECVTYPE,
CM_SEND_AND_FLUSH,
CM_NONE.
RC = PLIRETV(); /* GET RETURN CODE */
IF RC ^= SWS_SUCCESS THEN /* EXIT PROGRAM IF BAD RC */
EXIT;
Top
C Example
#include "sccphd.h" /* Neon headers */
#include "atbcmc.h" /* CPI Communications */
#include "atbpbc.h" /* LU6.2 */
.
.
.
.
long RC; /* return code */
long stmtHDL; /* statement handle */
long recvtype; /* data received type */
long sendlen; /* input buffer length */
long recvlen; /* output buffer length */
long tp_name_length; /* tp name length */
char sendbuf[82] /* input buffer area */
char recvbuf[82] /* output buffer */
char tp_name[64] /* tp name */
char fill_1[] = ' ' /* eight byte filler field */
char fill_2[] = ' ' /* eight byte filler field */
char fill_3[] = ' ' /* eight byte filler field */
char fill_4[] = ' ' /* ten byte filler field */
char fill_5[] = ' ' /* ten byte filler field */
char fill_6[] = ' ' /* ten byte filler field */
char conversation_id[8] /* conversation id */
char parner_lu_name[17] /* partner lu name */
CALL SWSAppcConnect(stmtHDL, /* statement handle */
SWS_APPC_TYPE_IMS
tp_name
tp_name_length
partner_lu_name
ATB_SECURITY_NONE
conversation_id
sendlen
sendbuf
recvlen
recvbuf
RC
fill_1
fill_2
fill_3
fill_4
fill_5
fill_6
recvtype
CM_SEND_AND_FLUSH
CM_NONE.
if (rc ^= SWS_SUCCESS)
return rc;
Top
COBOL Example
COPY SBCPHD. Neon Copybook
COPY ATBCMCOB. CPI COMMUNICATIONS COPYBOOK
COPY ATBPBCOB. LU6.2 COPYBOOK
.
.
.
.
77 STATEMENT-HANDLE USAGE IS POINTER.
77 FILLER-PARMLIST-01 PIC X(8) VALUE IS SPACES.
77 FILLER-PARMLIST-02 PIC X(8) VALUE IS SPACES.
77 FILLER-PARMLIST-03 PIC X(8) VALUE IS SPACES.
77 FILLER-PARMLIST-04 PIC X(10) VALUE IS SPACES.
77 FILLER-PARMLIST-05 PIC X(10) VALUE IS SPACES.
77 FILLER-PARMLIST-06 PIC X(10) VALUE IS SPACES.
01 SEND-BUFFER.
05 SEND-BUFFER-LENGTH PIC 9(4) COMP-4.
05 SEND-BUFFER-CONTENTS PIC X(100) VALUE IS SPACES.
05 SEND-EXTRA-AREA PIC X(10).
01 RECEIVE-BUFFER.
05 RECEIVE-BUFFER-LENGTH PIC 9(4) COMP-4.
05 RECEIVE-BUFFER-CONTENTS PIC X(80).
05 RECEIVE-EXTRA-AREA PIC X(10).
.
.
.
.
SET CM-NONE TO TRUE.
SET ATB-SECURITY-NONE TO TRUE.
SET SWS-APPC-TYPE-IMS TO TRUE.
MOVE 'PART' TO TP-NAME.
MOVE 4 TO TP-NAME-LENGTH.
MOVE 'P390.P392AIMS' TO PARTNER-LU-NAME.
CALL 'SWCPAC' USING STATEMENT-HANDLE
SWS-APPC-TYPE
TP-NAME
TP-NAME-LENGTH
PARTNER-LU-NAME
ATB-SECURITY
CONVERSATION-ID
SEND-LENGTH
SEND-BUFFER
REQUESTED-LENGTH
RECEIVE-BUFFER
ATB-RETCODE
FILLER-PARMLIST-01
FILLER-PARMLIST-02
FILLER-PARMLIST-03
FILLER-PARMLIST-04
FILLER-PARMLIST-05
FILLER-PARMLIST-06
ATB-DATA-RECVD
ATB-SEND-TYPE
SYNC-LEVEL.
MOVE RETURN-CODE TO WS-SWSAPI-RETURN-CODE.
IF NOT SWS-SUCCESS
GOBACK.
Top
|