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


Example 3

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

A storage management technique is used whereby, for each LU, the program obtains a storage area to contain an RPL, an LU work area, and a data area. It issues GETMAIN to get storage for the entire area. Then, using a DSECT to map the area, it issues a GENCB to build an RPL.

The WAREA operand of the GENCB macroinstruction uses an S-type constant to point to a real storage area using the DSECT as a map:
         GETMAIN R,LV=LEN
         LR    2,1
         USING TWA,2
         GENCB BLK=RPL,AM=VTAM,WAREA=(S,XRPL),               C
         LENGTH=XRPLLEN
         .
         .
         .
TWA      DSECT
CHAIN    DS    F                   CHAINING POINTER
XRPL     DS    0F
         IFGRPL AM=VTAM,DSECT=NO
XRPLEND  EQU   *
WORKAREA DS    10F                 LOGICAL UNIT WORK-AREA
DATA     DS    CL100               DATA AREA
END      EQU   *
LEN      EQU   END-TWA             LENGTH OF ELEMENT
XRPLLEN  EQU   XRPLEND-XRPL        LENGTH OF RPL

The SHOWCB macroinstruction can be used to examine the fields of this RPL:
          SHOWCB      AREA=SHOWAREA,RPL=(S,XRPL),            C
               FIELDS=FDBK2,LENGTH=4,AM=VTAM
          .
          .
          .
SHOWAREA  DS   F

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014