www.sas.com > Service and Support > Technical Support
 
Technical Support SAS - The power to know(tm)
  TS Home | Intro to Services | News and Info | Contact TS | Site Map | FAQ | Feedback


IUMTEXIT TITLE 'IUMTEXIT -- Advance Initialization Exits for the IBM   +
                IUCVMULT Multiple TCP/IP Interface'
*
*                Copyright (c) 1995, SAS Institute Inc.
*                  Unpublished - All Rights Reserved
*
*   NAME:      IUMTEXIT
*   ALIASES:   ISPEXIT1, ISPEXIT2
*   SUPPORT:   LANGUAGE SYSTEMS
*   PRODUCT:   SAS/C
*   TYPE:      SAMPLE
*   ATTRIB:    RENT
*   LANGUAGE:  Assembler
*   PURPOSE:   Assembler exits that can be used to initialize IBM's
*              TCP/IP IUCVMULT multitasking interface in advance of
*              any TCP/IP application use and clear it after all
*              application terminations.  This allows elimination
*              of the requirement that the first TCP/IP application
*              task remain active until all other TCP/IP applications
*              have terminated.  The IUCVMULT interface was first
*              available with IBM MVS TCP/IP V2, with PTF's UN13465
*              and UN13466.
*
*   USAGE:     The exits when used with ISPF are ISPF initialization
*              exit (exit point 1) and termination exit (exit point 2)
*              and need to be link-edited with the ISPF exits module
*              ISPXDT to create the ISPEXITS load module.  The
*              following is a sample ISPXDT source which can be copied
*              and assembled elsewhere or merged with other ISPXDT
*              ISPF exit definition source prior to assembly.
*
         AGO   .SKIPXDT
*------ Start of ISPXDT Source module
*  ISPXDT definition to define user exits 1 and 2 to ISPF which will
*  support TCP/IP IUCVMULT initalization at ISPF startup and clearing
*  at ISPF termination,
*
          ISPMXED    START
          ISPMXLST   (1,2)
          ISPMXDEF   1
          ISPMEPT    ISPEXIT1
          ISPMXEND
          ISPMXDEF   2
          ISPMEPT    ISPEXIT2
          ISPMXEND
          ISPMXED    END
          ISPMXDD    START
          ISPMXDD    END
*------ End of ISPXDT source sample
.SKIPXDT  ANOP
*
*   USAGE -- continued
*         -- Assemble
*            - Use Assembler H or High Level Assembler
*            - TCP/IP maclib's required for assembler:
*              tcp_prefix.AEZAMAC1
*              tcp_prefix.AEZAMAC3
*              tcp_prefix.AEZAMAC4
*
*         -- Linkedit
*              The following JCL can be used to link-edit ISPEXITS
*              //LKED PGM=IEWL,PARM='RENT,LIST,MAP,XREF,LET'
*              //SYSPRINT DD SYSOUT=A
*              //SYSUT1 DD UNIT=DISK,SPACE=(CYL,(1,1))
*              //SYSLMOD DD DSN=ISP.ISPLOAD
*              //SYSLIB  DD DSN=ISP.LOCOBJ,DISP=SHR
*              //* Exits and ISPXDT object code must all be in SYSLIB
*              //SYSLIN DD *
*                ORDER ISPXDT
*                ENTRY ISPXDT
*                INCLUDE SYSLIB(ISPXDT)
*                NAME ISPEXITS(R)
*              /*
*
*              In addition to the above, ISPMAIN must link-edited with
*              a version of ISPDFLTS which allows use of ISPF exits.
*              For more details on link-editing ISPEXITS and/or ISPMAIN
*              see the ISPF and ISPF/PDF Planning and Customizing
*              Manual
*
*   HISTORY:   01JUN92 Developed by SAS INSTITUTE INC for SAS/C.
*   MACROS:    GETMAIN, FREEMAIN, IUCVMINI, MVPXVMCV, IPARML,
*              IEFJESCT, IEFJSCVT, IHAPSA, CVT
*   AREAS:
*
*   REFS:      "TCP/IP Socket Programming Using the MVS/Assembler/IUCV
*              Interface", Ron Lane (IBM), 1992 Share Paper
*              ISPF and ISPF/PDF Planning and Customizing,
*              IBM Manual: SC34-4134  (ISPF V3)
*              TCP/IP Version 2 for MVS: Programmer's Reference
*              IBM Manual: SC31-6087
*
*   NOTES:     Though these exits are geared for use by ISPF, no
*              ISPF dependent code appears in the exits, and they
*              could be used with some other suitable product which
*              provided similiar initialization/termination
*              type exits and allowed starting multiple TCP/IP
*              applications.
*
*   KEYWORDS:  TCP/IP, IUCVMULT, ISPEXITS
*   END
         EJECT
         ENTRY ISPEXIT1,ISPEXIT2
IUMTEXIT CSECT ,                  DEFINE CSECT
IUMTEXIT AMODE ANY
IUMTEXIT RMODE ANY
         CNOP  0,4
INITEXIT B     IUEXEXIT-INITEXIT(,R15)
ISPEXIT1 EQU   INITEXIT
         DC    AL1(17)
         DC    CL17'INITEXIT(IUMTEXIT)'     Eye-Catcher
         DC    X'0001'
         DC    A(INITEXIT-IUMTEXIT)
         DC    C'SAS/C 1992 SAS INSTITUTE INC.'
         DS    0H
TERMEXIT B     IUEXEXIT-TERMEXIT(,R15)
ISPEXIT2 EQU   TERMEXIT
         DC    AL1(17)
         DC    CL17'TERMEXIT(IUMTEXIT)'     Eye-Catcher
         DC    X'0002'
         DC    A(TERMEXIT-IUMTEXIT)
         DC    C'SAS/C 1992 SAS INSTITUTE INC.'
         DS    0H
         SPACE 3
IUEXEXIT STM   R14,R12,12(R13)
         LR    R7,R15             Save entry point
         LR    R9,R15             Set up base register
         S     R9,24(,R15)        Adjust entry point
         USING IUMTEXIT,R9
         USING DSA,R13
         LA    R0,DSALEN
         GETMAIN R,LV=(0)         Get register save and work area
         LR    R5,R13
         LR    R13,R1             Save parms
         LR    R0,R1
         LA    R1,DSALEN
         SLR   R2,R2
         SLR   R3,R3
         MVCL  R0,R2              Clear save and work
         ST    R13,8(,R5)         Chain save areas
         ST    R5,4(,R13)
*
* Set up the external interupt buffer and pick a name to identify us to
* TCP/IP.
*
         LA     R1,EXTBUF         Get address of External Int. Buffer
         ST     R1,IUCVDBFR       This must be in IUCVDBFR
         BAL    R8,INITPCN        Initialize PC numbers
         LTR    R15,R15           Did we find them?
         BNZ    IUEXDONE          No, return
         MVC    TCPNAME,IUCVNAME  Copy name to use for IUCVMINI
         SPACE
         CLI    23(R7),X'01'      Initialization exit call?
         BNE    IUEXTRM           No, must be termination exit call.
         SPACE
         IUCVMINI SET,            Initalize the IUCVMULT interface     X
               NAME=TCPNAME,      Chosen Name                          X
               EXIT=DUMMYXIT,     Dummy exit                           X
               UWORD=PREBUF,      16 Bytes before Ext. Int. Buffer     X
               ERROR=IUEXDONE     Well, we tried.
         B     IUEXDONE           Finished
         SPACE
IUEXTRM  EQU   *
         IUCVMINI CLR,NAME=TCPNAME Clear the IUCVMULT interface
         SPACE 2
IUEXDONE EQU   *
         LR    R1,R13             Addr our workarea
         LA    R0,DSALEN
         L     R13,4(,R13)        Load previous save
         FREEMAIN R,LV=(0),A=(1)  Free area
         LM    R14,R12,12(R13)    Restore Regs
         SLR   R15,R15            Return a 0
         BR    R14                and return
*
INITPCN  EQU   *
***********************************************************************
* Extract the PC (program call) numbers from the VMCF subsytem vector
* table and save it for later use.  Could consider using SNMPGPCN (the
* IBM TCP/IP supplied interface) but this would necessiate a V-con for
* it and complicate the link-edit and exit installation for something
* that is easy to do.
***********************************************************************
         USING PSA,R0
         L    R1,FLCCVT                Get address of CVT
         DROP R0
         USING CVT,R1
         L     R1,CVTJESCT             Get address of JES Control Table
         USING JESCT,R1
         ICM   R1,B'1111',JESSSCT      Addr of Subsystem Comm. Table
         BZ    IPCNOT                  Branch, VMCF/IUCV not Loaded
         USING SSCT,R1
IPCLOOP  CLC   SSCTSNAM,=C'VMCF'       Found correct entry?
         BE    IPCFOUND                Yes, leave loop
         ICM   R1,B'1111',SSCTSCTA     Get pointer to next entry
         BNZ   IPCLOOP                 and loop
IPCNOT   DS    0H                      Entry not found
         LA    R15,8                   Set failure return code
         B     IPCRET                  and return
IPCFOUND EQU   *
         L     R1,SSCTSUSE             Get address of VMCF CVT
*        ST    R1,IUCVCVT
         USING MVPXVMCV,R1
*                                      Copy PC numbers to SNMPPCN area
         MVC   IUCVPCN,PCIUCV          PC for IUCV
         MVC   CR0RPCN,PCREDCR0        Read CR0
         MVC   CR0SPCN,PCSETCR0        Set  CR0
         MVC   SSMPCN,PCSSM            Set  System Mask
         MVC   RSMPCN,PCREADSM         Read System Mask
         SLR   R15,R15                 Clear R15
IPCRET   EQU   *
         BR    R8                      Return
         SPACE 3
*----------------------------------------------------------------------
*  The following name can be changed (or generated) as needed.
*----------------------------------------------------------------------
         SPACE
IUCVNAME DC    CL8'L$U0E0X1'      semi-"Unique" Name ID for IUCVMINI
         SPACE
         LTORG
         EJECT
         DS     0D
DUMMYXIT BR     R14               Do nothing exit, except return
         EJECT
*
*        Register Equates
*
R0       EQU   0
R1       EQU   1
R2       EQU   2
R3       EQU   3
R4       EQU   4
R5       EQU   5
R6       EQU   6
R7       EQU   7
R8       EQU   8
R9       EQU   9
R10      EQU   10
R11      EQU   11
R12      EQU   12
R13      EQU   13
R14      EQU   14
R15      EQU   15
*
DSA      DSECT                    Workarea DSECT
DSARSAVE DS    18F                Register Save
         SNMPPCN SECT=CSECT       Map work area for use by IUCVMINI
**
TCPNAME  DS    D                  Place to store 8 char name
PREBUF   DS    XL16               16 bytes before interrupt buffer
EXTBUF   DS    XL40               External interrupt buffer
ECBOFF   EQU   *-PREBUF
IUCVECB  DC    A(0)
*
IUCVSAVE DS     0F                Register save required by IUCVMINI
IUCVSR14 DS     F
IUCVSR15 DS     F
IUCVSR0  DS     F
IUCVSR1  DS     F
IUCVSR2  DS     F
IUCVSR3  DS     F
IUCVSR4  DS     F
IUCVSR5  DS     F
IUCVSR6  DS     F
IUCVSR7  DS     F
IUCVSR8  DS     F
IUCVSR9  DS     F
IUCVSR10 DS     F
IUCVSR12 DS     F
DSALEN   EQU   *-DSA
         MVPXVMCV
         PUSH   PRINT
         PRINT  NOGEN
         COPY   IPARML
         IEFJESCT
         IEFJSCVT
         IHAPSA
         CVT    DSECT=YES
         POP    PRINT
         END

Copyright (c) 2000 SAS Institute Inc. All Rights Reserved.
Terms of Use & Legal Information | Privacy Statement