Five routines are invoked to perform OPEN functions, DftSOPL, DeSOR1, DMSOR3, and DMSBOP. DMSCLS perforas the CLOSE function.
Depending on the type ofOPEN .acro issued from a user program, one of
fiveCMS/DOS OPEN routines could be invoked. OPENR macros give control
toDMSOR1 and, depending on the DTF type specified, DMSOR2 or DMSOR3 .ay be invoked. These three routines (DMSOR1,DMSOR2, and DftSOR3) request
the relocation of a specified file.DMSOPL is invoked by the DOS/VS coapilers when they need access to a source statement library. These
routines aremainly interface routines to DMSBOP, which performs the
.ain function of opening the specified file. Each of the routines callsDMSBOP. DMSBOP is the eMS/DOS routine that simulates the DOS/VS OPEN function. The basic function of DMSBOP is the initialization of DTF
tables (that is, setting fields in specified DTFs for use by theDOS/VS LIOCS routines). When a DOS problem program is compiling, a list of DTFs and ACBs is
built. At execution time, this list is passed toDMSBOP. The logic
flow ofDMSBOP is as follows:
1.Scans the list of DTF and ACB addresses, handling each iteaa in the
list in line.When the OPEN macro expands, register i points to
thename of the SSB transient to receive control ($$BOPEN) and
register0 Foints to the list of DTF/ACB addresses to be opened.
2.When an ACB is encountered in the table, control is passed directly
to theVSAM OPEN routine, $$BOVSAM. The VSIM routine is
responsible for opening the file and returning control toDMSBOP. 3. When a DTF is encountered in the table, DMSBOP itself handles the OPEN: a. For reader/punch files (DTFCD), the OPEN bit in the DTF table
is turned on.
b. For printer files (DTFPR), if twoIOAREAs are specified, the IOREG is loaded with the address of the appropriate IOIREI. Next, the PUB index byte associated with the logical unit
specified in the DTF is checked to ensure that a physical
device has been assigned and thePUB device code is then
analyzed. TheOPEN bit in the DTF table is then turned on.
c. For console files (DTFCN), noOPEN logic is required.
d. For tape files(DTFMT), the PUB device type code must specify TAPE. If an IOREG is specified (for output tapes only), the
address of the appropriaterOAREI is placed in it. For input
files, there is separate processing for tapes with standard
label, nonstandard label, and no label. For output tapes, both
tape data files and work tape files are treated as no label
tapes.CMS Method of operation and Program Organization 2-141
Depending on the type of
five
to
the relocation of a specified file.
routines are
.ain function of opening the specified file. Each of the routines calls
tables (that is, setting fields in specified DTFs for use by the
built. At execution time, this list is passed to
flow of
1.
list in line.
the
register
2.
to the
responsible for opening the file and returning control to
is turned on.
b. For printer files (DTFPR), if two
specified in the DTF is checked to ensure that a physical
device has been assigned and the
analyzed. The
c. For console files (DTFCN), no
d. For tape files
address of the appropriate
files, there is separate processing for tapes with standard
label, nonstandard label, and no label. For output tapes, both
tape data files and work tape files are treated as no label
tapes.