Previous Topic
Table Of Contents
Parent Topic
Next Topic

The SWSAPRCV Function

Related Topics

Web Server API Function Index


May be used in Shadow/REXX
May be used from Other REXX Interpreters
HLL entry point name is SDCPAR or SWCPAR

The REXX-language SWSAPRCV built-in function can be used to continue receiving message output from an IMS transaction (i.e. multi-segment output messages). Once you receive a non-zero return code, the IMS conversation is deallocated and the transaction is complete.

In the case of conversational IMS transactions, the non-zero return code will indicate that their is no more data to receive.

Upon return from the call, the following Rexx variables are populated with data:

APPC.STMTHDL The statement handle for the interface call.
APPC.CONVID The Conversation ID for the IMS APPC conversation.
APPC.OUTBUFF.0 The length of the data contained within the APPC.OUTBUFF.1 Rexx variable.
APPC.OUTBUFF.1 The returned Message Output Descriptor data. The output message contains the MOD data as well as a two byte length prefix. This variable contains the data, including any supplied trailing blanks.
APPC.RETCODE The APPC Interface return code.
APPC.DATATYPE The returned datatype.

SWSAPRCV Syntax

The general form for a REXX-language invocation of SWSAPRCV is:


   rc = SWSAPRCV("Connection Type", ,
                 "Conversation ID", ,
                 "Partner LU Name")

Connection Type Specifies the type of IMS transaction to execute

IMS IMS Non-conversational transaction.

IMSCONV IMS Conversational transaction.

Note: Required parameter.

Conversation ID Specifies the IMS Conversation ID.

Note: Required parameter.

Partner LU Name Specifies the APPC LU Name for the IMS system

Note: Optional parameter.

Top

SWSAPRCV Examples


 
     /*-------------------------------------------------------------*/
     /* initialize some system values                               */
     /*-------------------------------------------------------------*/
 
     address SWSSEND
     imsappc = 'P390.P392AIMS'
     imstran = 'NEONDISP'
     parms   = ''
 
     /*-------------------------------------------------------------*/
     /* Retrieve more data from the IMS transaction                 */
     /*-------------------------------------------------------------*/
 
     rc = SWSAPRCV('ims',APPC.CONVID,imsappc)
 
     /*-------------------------------------------------------------*/
     /* parse the output into usable variables                      */
     /*-------------------------------------------------------------*/
 
     pars.msg      = substr(APPC.OUTBUFF.1,1,79)
     pars.page     = substr(APPC.OUTBUFF.1,80,2)
     pars.index    = substr(APPC.OUTBUFF.1,82,2)
     pars.scroll   = substr(APPC.OUTBUFF.1,84,150)
 
     pars.area     = substr(APPC.OUTBUFF.1,234,380)
     pars.len      = 380
     pars.data     = ''
     do i = 1 to 10
       pars.part.i = substr(pars.area,4,15)
       pars.desc.i = substr(pars.area,19,20)
       pars.len    = pars.len - 38
       pars.area   = substr(pars.area,39,pars.len)
       pars.data   = pars.data||' '||pars.part.i||pars.desc.i
     end
  

Top