SET219Z

LANSA

SET219Z
* =======================================================
* Process ........: SET_219
* Function .......: SET219Z
* Created on .....: 7th November, 2001
* Description ....: Called Marshal (runs on the Server)
* Version.........: 1
* Full Description:
* This function is invoked from remote systems by SET219Y
* Once it starts execution it invokes another instance
* of SET219Y running on the server system. In effect the
* client SET219Y and the server SET219Y "talk to each
* other" using XML as the way of passing information
* between themselves.
* =======================================================
* ============== D E F I N I T I O N S ================
* =======================================================
Function Options(*LIGHTUSAGE *DIRECT)
Define Field(#RETCODE) Type(*CHAR) Length(002) Desc('Standard Char(2) Return Code')
* =======================================================
* ================ M A I N L O G I C ===============
* =======================================================
*
* Ask SET219Y to receive the lists that it has sent from
* the client system ( it will automatically open the
* connection with itself on the client system )
*
Execute Subroutine(CALL_219Y) With_Parms(RECEIVE)
*
* Get the name of the function that is to be called
* from the symbolic names list that is passed between
* systems ....
*
Change Field(#S_219FUNC) To(UNKNOWN)
Execute Subroutine(GET_ALPHA) With_Parms('=FUNCTION=' *BLANKS 1 #S_219FUNC)
*
* Call the nominated RDML function
*
Call Process(*DIRECT) Function(#S_219FUNC) Exit_Used(*NEXT) Menu_Used(*NEXT) If_Error(*NEXT)
*
* Now capture all messages and give them to SET219Y
* so that it can send them back to the client system
*
Use Builtin(GET_MESSAGE) To_Get(#RETCODE #S_219MSGT)
Dowhile Cond('#RETCODE = OK')
Execute Subroutine(CALL_219Y) With_Parms(ADDMSGQ)
Use Builtin(GET_MESSAGE) To_Get(#RETCODE #S_219MSGT)
Endwhile
*
* Now ask SET219Y to send the details back to the caller
* on the client system. Note the setting of S_219HOST
* to the special value =CALLER=. This tells SET219Y that
* the information is to be sent back to the caller rather
* than to some other host system.
*
Change Field(#S_219HOST) To('=CALLER=')
Execute Subroutine(CALL_219Y) With_Parms(SEND)
*
* Ask SET219Y to close the connection with the client
*
Execute Subroutine(CALL_219Y) With_Parms(CLOSE)
*
* The CALL operation on the server system is now finished
*
Return
*
* =======================================================
* ======== C O M M O N S U B R O U T I N E S =========
* =======================================================
* This set of subroutines are simple interfaces to RDML
* function SET219Y. They can be copied from this function
* and used in other similar functions unchanged.
* =======================================================
* -------------------------------------------------------
* CALL_219Y is used to consolidate calls to SET219Y
* -------------------------------------------------------
Subroutine Name(CALL_219Y) Parms((#S_219OPER *RECEIVED))
Exchange Fields(#S_219OPER #S_219NAM1 #S_219NAM2 #S_219NAMI #S_219AVAL #S_219NVAL #S_219HOST #S_219FUNC #S_219MSGT)
Call Process(*DIRECT) Function(SET219Y)
Endroutine
* -------------------------------------------------------
* Use GET_ALPHA to return an alphanumeric value
* -------------------------------------------------------
Subroutine Name(GET_ALPHA) Parms((#S_219NAM1 *RECEIVED) (#S_219NAM2 *RECEIVED) (#S_219NAMI *RECEIVED) #S_219AVAL)
Execute Subroutine(CALL_219Y) With_Parms(GETALP)
Endroutine