@PROGRAM=CPICSMP1
@include cpicvar
@include cpiccon
TPADECK: MSGTXT
/***********************************************************************
* STL deck defining the TPA Transaction Program. *
***********************************************************************/
say 'Transaction Program' tpid() 'starting.'
/**********************************************************************/
/* Initialize and allocate a conversation with TPB. */
/* Set the symbolic destination name to "LU2TPB". */
sym_dest_name='LU2TPB'
/* Initialize a conversation with TPB. */
CMINIT(conversation_ID,,
sym_dest_name,,
return_code)
/* Allocate the conversation; the sync-level defaults to "none", */
/* and the conversation type defaults to "mapped". */
CMALLC(conversation_ID,,
return_code)
/* Setup the send buffer and length. */
send_buffer='Data sent from A to B.' /* send buffer for mapped conv */
/*send_buffer='0018'x||'Data sent from A to B.' buff for basic conv */
send_length=length(send_buffer)
/* Send data to TPB. */
CMSEND(conversation_ID,,
send_buffer,,
send_length,,
request_to_send_received,,
return_code)
/* Deallocate the conversation with TPB. */
CMDEAL(conversation_ID,,
return_code)
say 'Transaction Program' tpid() 'complete.'
ENDTXT
TPCDECK: MSGTXT
/***********************************************************************
* STL deck defining the TPC Transaction Program. *
***********************************************************************/
say 'Transaction Program' tpid() 'starting.'
/* Accept the conversation with TPB. */
CMACCP(conversation_ID,,
return_code)
/* Set requested length for receive. */
requested_length=100
/* Receive data from TPB. */
CMRCV(conversation_ID,,
receive_buffer,,
requested_length,,
data_received,,
received_length,,
status_received,,
request_to_send_received,,
return_code)
/* Confirm the data was received. */
CMCFMD(conversation_ID,,
return_code)
say 'Transaction Program' tpid() 'complete.'
say 'Simulation complete.'
ENDTXT
TPBDECK: MSGTXT
/***********************************************************************
* STL deck defining the TPB Transaction Program. *
***********************************************************************/
say 'Transaction Program' tpid() 'starting.'
/* Accept the conversation with TPA. */
CMACCP(conversation_ID,,
return_code)
/* Set requested length for receive. */
requested_length=100
/* Receive data from TPA. */
CMRCV(conversation_ID,,
receive_buffer,,
requested_length,,
data_received,,
received_length,,
status_received,,
request_to_send_received,,
return_code)
/* Confirm the data was received. */
CMCFMD(conversation_ID,,
return_code)
/**********************************************************************/
/* Initialize and allocate a conversation with TPC. */
/* Set the symbolic destination name to "LU1TPC". */
sym_dest_name='LU1TPC'
/* Initialize a conversation with TPC. */
CMINIT(conversation_ID,,
sym_dest_name,,
return_code)
/* Set the conversation sync-level to "confirm". */
CMSSL(conversation_ID,,
cm_confirm,,
return_code)
/* Allocate the conversation; the conversation type defaults to */
/* "mapped". */
CMALLC(conversation_ID,,
return_code)
/* Setup the send buffer and length. */
send_buffer='Data sent from B to C.'
send_length=22
/* Send data to TPC. */
CMSEND(conversation_ID,,
send_buffer,,
send_length,,
request_to_send_received,,
return_code)
/* Deallocate the conversation with TPC. */
CMDEAL(conversation_ID,,
return_code)
say 'Transaction Program' tpid() 'complete.'
ENDTXT