Reference: |
To write and configure a Natural Program for use with the iWay Transaction Adapter for CICS:
For more information, see Using the AASSUBC Calling API and Natural Program.
The Advanced tab opens.
Perform the following steps:
For more information on Natural Logon Parameters themselves, see the Natural documentation.
Note: Since this target invokes the Natural proxy program, it is not suitable for use with non-Natural, ECI CICS programs.
The Add Service window opens.
Perform the following steps:
Note: This value is usually SYSTEM by default.
The size of data sent to the Natural program + 300 and the maximum number of bytes to be received from the Natural program.
The iWay Transaction Adapter for CICS requires this extra space on output to send the data required by the proxy program to invoke the Natural Nucleus.
Note: This value is usually SYSTEM by default.
The size of data sent to the Natural program + 300 and the maximum number of bytes to be received from the Natural program.
The iWay Transaction Adapter for CICS requires this extra space on output to send the data required by the proxy program to invoke the Natural Nucleus.
For more information on Natural logon parameters, see the Natural documentation.
Note: This value is usually SYSTEM by default.
The size of data sent to the Natural program + 300 and the maximum number of bytes to be received from the Natural program.
The iWay Transaction Adapter for CICS requires this extra space on output to send the data required by the proxy program to invoke the Natural Nucleus.
A Natural program must use program AASSUBC for all access to input and output buffers.
Calls to AASSUBC all use the following control block as their first parameter:
1 #REQUEST-PARMS 2 #FUNCTION (A2) GT,PT,LC,LI 2 #OFFSET (I2) DATA OFFSET OF INPUT/OUTPUT 2 #LENGTH (I2) LENGTH OF DATA TO GET OR PUT 2 #RESPONSE-CODE (I4) 2 #ERR-MESSAGE (A72)
The following table lists and describes the implemented functions:
Function |
Description |
---|---|
GT |
Get input by offset. The offset must be set to 0 for the first call only. It is incremented following each call by the number of bytes read. The length of the requested data must be provided for each call and must match the length of the area provided to receive the input data. For example: MOVE #FUNC-GT TO #FUNCTION MOVE 8 TO #LENGTH MOVE 0 TO OFFSET - FIRST CALL ONLY CALL 'AASSUBC' #FUNCTION #EMP-NUM1 WHERE #EMP-NUM1 IS AN EIGHT BYTE FIELD |
PT |
Put output by offset. The offset must be set to 0 for the first call only. It is incremented following each call by the number of bytes written. The length of the requested data must be provided for each call and must match the length of the area provided containing the output data. For example: MOVE #FUNC-PT TO #FUNCTION MOVE 8 TO #LENGTH MOVE 0 TO OFFSET - FIRST CALL ONLY CALL 'AASSUBC' #FUNCTION #EMP-NUM1 WHERE #EMP-NUM1 IS AN EIGHT BYTE FIELD |
LI |
Get length of input data. This function updates the #LENGTH field with the total length of all input parameters. No additional parameters are required. For example: MOVE #FUNC-LI TO #FUNCTION CALL 'AASSUBC' #FUNCTION |
LC |
Get length of COMMAREA used to send data. This function updates the #LENGTH field with the COMMAREA length. No additional parameters are required. For example: MOVE #FUNC-LC TO #FUNCTION CALL 'AASSUBC' #FUNCTION |
The following table lists and describes the implemented response codes:
Response Code |
Description |
---|---|
0 |
Operation completed successfully. |
4 |
ENDDATA - OFFSET exceeds end of input data and indicates that no further input is available. |
8 |
OFFSET + LENGTH is greater than COMMAREA. |
Note: Always use the first field of a group when calling AASSUBC. Notice all calls are made with #FUNCTION and not #REQUEST-PARMS.
All input fields must be read before output fields are written. The sample program aasnatn.natural shows how AASSUBC is used. On Windows, the Natural sample program is located in:
C:\Program Files\iWay61\etc\samples\cics\natural
For more information on using this program, see Natural Program.
iWay Software |