The following code is a framework for the SYGWMAP exit. You must write additional code to parse the language request and return the Server Option remote procedure name to handle the corresponding language event.
TITLE 'SYBASE CONTEXT HANDLER LANG TRAN MAPPING EXIT' * *---------------------------------------------------------------------* * Sybase Gateway Library * Confidential Property of Sybase Inc. * (c) Copyright Sybase, Inc 2004 * All rights reserved * * This subroutine is called by the mainline SYGWCTXH * context handler. It passes: * . Addr of context handler CICS EIB (input). * . Addr of Language Requestbuffer read in by the context * handler (input). * . Length of the language request statement (input). * . Addr of a field to contain a valid RPC name to process * language requests (input/output). Max. length of 30 bytes. * Note: on input the field defaults to "Language_Request". * If the field is changed by this exit, then the new value * must also be in the SYRP file. * . Return Code (output) 0=OK * 1=33891 SYGWCTXH SYGWMAP Error * * History: * *---------------------------------------------------------------------* * EQUATES *---------------------------------------------------------------------* R00 EQU 0 GENERAL REGISTERS R01 EQU 1 R02 EQU 2 R03 EQU 3 R04 EQU 4 R05 EQU 5 R06 EQU 6 R07 EQU 7 R08 EQU 8 R09 EQU 9 R10 EQU 10 R11 EQU 11 R12 EQU 12 R13 EQU 13 R14 EQU 14 R15 EQU 15 * *---------------------------------------------------------------------- * Parameter dsect for SYGWMAP call *---------------------------------------------------------------------- PARMS DSECT COPY SYGWMAPA *---------------------------------------------------------------------- * WORKING STORAGE SECTION *---------------------------------------------------------------------* DFHEISTG DSECT uSERID DS 8C user id to be returned here * * *---------------------------------------------------------------------* * PROGRAM ENTRY *---------------------------------------------------------------------* SYGWMAP DFHEIENT CODEREG=(12) EIBREG=11 SYGWMAP AMODE 31 SYGWMAP RMODE ANY *--------------------------------------------------------------------- * address the parameter area and do some initialization *--------------------------------------------------------------------- USING PARMS,R09 LR R09,R01 L R04,MAP_EIB Get Addr of EIB L R05,MAP_LANG_REQUEST Get Addr of Lang Req L R06,MAP_LANG_REQ_LENGTH Get Length of Lang Req L R07,MAP_LANG_TRAN Get Addr of name of Lang Req MVC MAP_RC,ZERO Init Return code to OK * * ADD CODE TO PARSE SQL STATEMENT POINTED TO BY R05 * * If you need Client's User Id, uncomment the following line * EXEC CICS ASSIGN USERID(USERID) * CLC USERID(8),................ * NOCHANGE B RETURN Default * CHANGE1 MVC 0(30,R07),=CL30'Language_Request2' B RETURN CHANGE2 MVC 0(30,R07),=CL30'Language_Request3' B RETURN * RETURN DS 0H * DFHEIRET *---------------------------------------------------------------------* * CONSTANTS *---------------------------------------------------------------------* ZERO DC F'0' ONE DC F'1' * LTORG END