$BUFFER heading information
| Common name: | HASP Buffer |
|---|---|
| Macro ID: | $BUFFER |
| DSECT name: | BFPDSECT, SPBRECD, BFD |
| Owning component: | JES2 (SC1BH) |
| Eye-catcher ID: |
'BUF ' Offset: BFPID-BFPDSECT Length: 4 |
| Storage attributes: |
Subpool: BSC buffers are in subpool 6. VTAM buffers are in subpool 16. HASP buffers are in subpool 8. UBUF, PBUF, HBUF, GBUF and SUBST buffers are in subpool 229. CB buffers in the JES2 main task environment are in subpool 7. CB buffers in the USER environment are in subpool 230. PAGE buffers are in subpool 14. PP buffers are in subpool 15. Key: BSC, VTAM, HASP, CB, HBUF, GBUF, PAGE and PP buffers are in key 1. UBUF buffers are in the key of the associated TCB. PBUF buffers are in key 5. Residency: Virtual and real storage for BSC, HASP, PAGE and PP buffers are below 16M in the private storage of the JES2 address space. Virtual and real storage for VTAM and CB (main task) buffers are anywhere (above or below 16M) in the private storage of the JES2 address space. Virtual and real storage for UBUF, PBUF, HBUF and GBUF buffers are above or below 16M in the address space of the application for which the I/O is being done. Virtual storage for CB buffers (USER environment) is anywhere (above or below 16M) except for CB buffers used for JCTs which must be below 16M. Real storage for CB buffers in the USER environment is anywhere. |
| Size: |
The size varies depending on the type of buffer. The size of BSC buffers is specified by the initialization statement TPDEF BELOWBUF= SIZE=. The size of VTAM buffers is specified by the initialization statement TPDEF EXTBUF= SIZE. PAGE, PBUF, UBUF, HBUF and GBUF buffers are 4096 bytes. The size of HASP and CB buffers is specified by the initialization statement SPOOLDEF BUFSIZE=. The following formula gives the size for PP buffers: - 2X + (BUFFER PREFIX AREA) - WHERE X = MAX ($NOPRCCW*8+PCIESIZE+JOESIZE, - $NOPUCCW*8+PCIESIZE+JOESIZE, - ($TCELSIZ*4-3)*4) |
| Created by: |
In environments other than the USER environment, the storage is obtained by the $CPOOL services called during JES2 initialization, or by the $GETBUF service. In the USER environment, storage is obtained via $GETBUF. The control block is filled in by: bi-synch processing for BSC buffers, SNA processing for VTAM buffers, print/punch processing for PAGE and PP buffers, HASP Access Method (HAM) for PBUF, UBUF, HBUF and GBUF buffers, $CBIO services for CB buffers, and various JES2 processors for HASP buffers. |
| Pointed to by: |
BATBUF field of the $BAT data area BUFCHAIN field of the $BUFFER data area BUFCHEQ field of the $BUFFER data area DCTBUFAD field of the $DCT data area MDCTOBUF field of the $DCT data area RIDUBF field of the $DCT data area RIDPBF field of the $DCT data area DSSABUF field of the $DSSCB data area DSSNBUF field of the $DSSCB data area GCBMBUF field of the $GCB data area $ASYNCQ field of the $HCT data area $MIGRIOQ field of the $HCT data area $BSCCHEQ field of the $HCT data area $MCONMSG field of the $HCT data area $RPLCOMQ field of the $HCT data area $XFRBEND field of the $HCT data area HFCTBUFS field of the $HFCT data area ICEINHD field of the $ICE data area ICEINTL field of the $ICE data area ICEOUTBF field of the $ICE data area ICEOUTHD field of the $ICE data area ICEOUTTL field of the $ICE data area ICEBUFAD field of the $ICE data area JIBCPBUF field of the $JIB data area MLMRLPQ field of the $MLMWORK data area MLMBSCQ field of the $MLMWORK data area PCEBUFAD field of the $PCE data area PCIBUFAD field of the $PCIE data area PCTINQ field of the $PCT data area PCTVINQ field of the $PCT data area PCTSINQ field of the $PCT data area SDBUBF field of the $SDB data area SDBPBF field of the $SDB data area SDBCBF field of the $SDB data area SDBCBFC field of the $SDB data area SDBCBF1 field of the $SDB data area SDBGBF field of the $SDB data area SDBHBF field of the $SDB data area SJBSWBUF field of the $SJB data area Some pointers within control blocks in buffers point to other control blocks in buffers (for example, $JCT and $IOT). Various fields in the processor work areas, parameter lists and exit parameter lists (XPL). |
| Serialization: |
Compare and swap logic is used to chain and dechain buffers. Buffers are used in JES2 and application tasks as well as in asynchronous I/O processing (IRBs, SRBs, appendages). Implicit additional serialization is provided by the SJB lock and/or the Local lock in the USER environment and JES2 reentrancy techniques in the JES2 main task environment. |
| Function: |
Buffers are used to buffer data as part of the JES2 processing for spool data sets or devices. They are used to hold data, channel programs and parameter lists for interfacing with MVS IOS, VTAM and other I/O access methods. There are multiple types of buffers mapped by $BUFFER. Many types of buffers have control blocks associated with them that contain additional information required to use the buffer for I/O (for example, channel programs). A HASP buffer is a local buffer used to read or write SYSIN or SYSOUT data. A BSC buffer is a teleprocessing buffer used for BSC NJE and RJE. A VTAM buffer is a teleprocessing buffer used for SNA NJE and RJE. A PAGE buffer is a local 4096-byte buffer used for I/O to local non-impact printers supported directly by JES2. PAGE buffers are also used for BSAM spool offload I/O. A PP buffer is a local print/punch buffer that contains an IOB and the CCWs required to do I/O from PAGE buffers to local non-impact printers. A PROT buffer (PBUF) is a protected buffer used for spool I/O by the HASP Access Method (HAM). An UNPROT buffer (UBUF) is an unprotected buffer used as a staging area for HAM. No I/O is actually done using this buffer. When a UBUF being used for output is full or input needs to be replenished, an associated PBUF is used. A CB buffer is a control block buffer used by the $CBIO service for I/O. A HOLD buffer (HBUF) is an unprotected buffer which is used for GET/UPDATE by HAM. A GBUF is a protected HOLD buffer used for GET/UPDATE. For additional information see $GETBUF, $CBIO and $EXCP in "JES2 Customization". |