z/OS Communications Server: SNA Customization
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


End function

z/OS Communications Server: SNA Customization
SC27-3666-00

The end function of the session management exit is invoked during VTAM® termination. The session management exit routine uses this function to perform any cleanup required before VTAM termination is completed. In this sample, the begin function obtained virtual storage for maintaining user data and loaded a network registration table. Therefore, the end function must delete the table and free the storage before returning control to VTAM. The following code performs these necessary functions:    
***********************************************************************
*        SME ROUTINE - END FUNCTION
***********************************************************************
END      EQU   *
*
** DELETE NETID REGISTRATION TABLE
*
         L     R2,8(R11)       LOCATE USER DATA FIELD IN PARAMETER LIST
         L     R2,0(R2)        OBTAIN ADDRESS OF USER DATA STORAGE
         CLI   0(R2),X'F0'     EXAMINE IF NETID TABLE LOADED
         BE    FREEANPS        NO - TABLE NOT LOADED
         DELETE EP=NETIDTAB    ISSUE DELETE MACRO TO CANCEL
*                                PREVIOUS LOAD
*
** FREE ALIAS NAME POOL STORAGE
*
FREEANPS EQU   *
*
         L     R2,8(R11)       LOCATE USER DATA FIELD IN PARAMETER LIST
         L     R2,0(R2)        OBTAIN ADDRESS OF USER DATA STORAGE
         CLI   32(R2),X'FF'    EXAMINE IF ALIAS NAME STORAGE OBTAINED
         BE    FREEUDSA        NO - NOT OBTAINED
         L     R3,32(R2)        OBTAIN ADDRESS ALIAS NAME POOL STORAGE
         FREEMAIN R,LV=4096,A=(R3)
*
** FREE USER DATA STORAGE AREA
*
FREEUDSA EQU   *
*
         FREEMAIN R,LV=48,A=(R2)
         B     RETURN
         LTORG
         END
***********************************************************************

The fifth word in the parameter list passed to the exit for the END function contains the address of a 2-byte length field followed by the character string that is entered on the MODIFY EXIT, ID=ISTEXCAA,OPT=INACT,PARMS= parameter. If the PARMS= parameter was not entered, this pointer will be zero.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014