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


Example 3: Building and using session parameters in a BIND area

z/OS Communications Server: SNA Programming
SC27-3674-00

In this example, the application program initiates a session with an LU named LU2 in the same domain. A logon mode table is defined and was identified by the system programmer in the MODETAB operand of the LU definition statement for LU2. The application program wants to get the default-session parameters from the logon mode table, modify them, and then send the modified parameters to the LU in the BIND when it acquires the LU. Negotiable BIND is used. The coding could look like this:
                .
                .
                .
         INQUIRE RPL=RPL2,OPTCD=SESSPARM
                .
                .
                .
                (Test and modify the session parameters in SPAREA2.)
                .
                .
                .
         MODCB AM=VTAM,NIB=NIB2,BNDAREA=SPAREA2
         OPNDST RPL=RPL2,OPTCD=ACQUIRE,
               AAREA=NBNDAREA,AAREALN=L'NBNDAREA
                .
                .
                .
RPL2     RPL   AM=VTAM,NIB=NIB2,AREA=SPAREA2,AREALEN=L'SPAREA2
NIB2     NIB   NAME=LU2,LOGMODE=C' ',PROC=NEGBIND
SPAREA2  DS    XL(BINUSE-ISTDBIND)
NBNDAREA DS    XL256

Because the NIB's LOGMODE field contains blanks, the INQUIRE macroinstruction causes the default session parameters from the logon mode table to be moved into SPAREA2. The application program then modifies the session parameters to fit the way it wants to communicate with LU2. The MODCB macroinstruction puts the address of SPAREA2 into the NIB's BNDAREA field. When the OPNDST macroinstruction is executed, the modified session parameters are transmitted to LU2 in the BIND request. The response to the negotiable BIND is returned in NBNDAREA. Example 4 shows how the response might have been sent.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014