Executing a VSAM Function for an OS User
as user requests for services are handled by DOS/VS code that
resides in the DCSS. To access this code, as VSAM requests are
intercepted by the module DMSVIP, the interface between the as VSAM requests and the CMS/DOS and DOS/VS VSAM routines.
Because DMSVIP is in the CMSVSAM segment, it is available only when
that segment is loaded. Module DMSVIB, which resides in the CMS nucleus, is a bootstrap routine to load the CMSVSAM segment and pass
control to DMSVIP. DMSVIP receives control fro. VSAM request macros in three ways: via SVC (e.g. OPEN and CLOSE), via a direct branch using the address of DMSVIP in the ACB, and via a direct branch to the location of DMSVIP whose address is 256 bytes into the CMSCVT (CMSCVT is a CMS control
block that simulates the as CVT control block) This last technique is used by the code generated fro. the as VSAM control block 1I<=lnip111<=ltion SHOVCE
i
TFSTCE. Tnat is, the address at 256 into CVT is assumed to be that of a control block
that is at displacement 1'12' has the address of the VSAM control block
manipulation routine. To ensure that DMSVIP receives control fro. these
requests, the address of DMSVIP is stored at 256 bytes into CMSCVT. However, until the segment is loaded, the address at CMSCVT+256 is the address of module DMSVIB rather than the address of DMSVIP. The
address of DMSVIP replaces that of DeSVIB when CMSVSAM is loaded. Both DMSiIB and DMSVIP have pointers to themselves at 12 'bytes into themselves to ensure that this technique works.
Figure 21 shows the relationships in storage between
program, the os simulation and interface routines, and the CMSVSAM DCSSs. the user CMSDOS and OS VSAM Program OPEN ACBl CLOSE ACBl Figure 21. CMS Module oMSSOP DMSVIP oMSSOP19 oOSOPEN BALR 14,15 DMSSOP20 DOSCLOSE BALR 14,15 Relationship in
Simulation and CMSVSAM DCSSs DOS Transient CMSDOS DCSS DMSDOS DMSBOP DMSCLS Storage between the User Interface Routines, and
B-disk
for OS or DOS User Program, the
the CMSDOS CS and
The following description illustrates the overall logic of that
control flow.
2-118 IBM System Logic and Program Determination--Volume 2
DMSVIP gains control from DMSSOP when an OS SVC 19, 20 or 23 (CLOSE TYPE=T) is issued. It also gains control on return from execution of a VSAM function, as described below. DMSVIP performs five main functions: Initializes the CMS/DOS environment for OS VSAM processing. Simulates an OS VSAM OPEN macro. Simulates an OS VSAM CLOSE macro. Simulates an OS VSAM control block manipulation macro· (GENCB, MODCB, SHOWCB, or TESTCB). Processes as VSAM I/O macros. DMSVIP gets control when the first VSAM macro is encountered in the user
program. Initialization processing begins at this time. The CMSDCS ncss is loaded by issuing the command SET DOS ON (VSAM) ASSGN commands
are also issued at this time according to the user-issued DLBL's as
indicated in the DOSCB chain. Once this initialization completes, DMSVIP processes the VSAM request.
After the initialization, DMSVIP first checks to determine which VSAM function is being requested, OPEN, CLOSE, or a control block
manipulation macro.
For OPEN processing, the DOSSVC bit in NUCON is set on and control
passes to DMSBOP via SVC 2. Once the CMSjDOS reutines are in control,
execution of the VSAM function is the same as for the DOS VSAM functions
described abeve. On return from executing the OPEN routine, the address of another
entry point to DMSVIP, at label DMSVIP2, is placed in the ACB for the
data set just opened, the Dassvc bit is turned and control is
passed to DMSSOP, which returns to the user program. DMSVIP2 is the
entry point fer code that performs linkage to the VSAM data management
phase IKQVSM. This is done after the first OPEN because "it is assumed
that, once opened, the user performs I/O for the phase, e.g., a GET or PUT operation. When the linkage routine is entered, the Dassvc bit is set on and
control is given to the VSAM data management routine IKQVSM. On return
from IKQVSM DMSVIP turns off the DOSSVC bit and returns control to the
user program. (Refer to Simulate OS VSAM I/O Macros in this section.)
For CLOSE processing, the DOSSVC bit is set on and centrol is passed to
the CMS/DOS routine DMSCLS via SVC 2. As in the case of OPEN, once
centrol passes to the CMS/DOS routine, execution of the VSAM function is
the same as for the DOS VSAM functions described above. CMS Method of Operation and Program Organization 2-119
Previous Page Next Page