IBM OS/390 User Manual

Page of 673
as complete. This number may be less than or equal to the number of ECBs
specified in the macro.
13.2.2.3 RCB/ENQ/DEQ Macros
This set of macros enables you to protect data files or other resources when
processing a multitasking environment.
The VSE RCB macro generates an aligned doubleword resource control block
that functions much like an ECB. The VSE ENQ and DEQ macros test the status
of the resource through the RCB name.
MVS does not require or use an RCB macro. MVS generates an entry, within the
supervisor, which is used in a control area by the ENQ and DEQ macros to test
the resource status. Because the MVS entries are stored, tested, and modified
within the supervisor, you can protect resources across address spaces. VSE
can only protect resources within a partition because the area used to contain
the resource status is within the application program area.
┌─────┬─────┬───────────────────────────────────────┐
│ VSE │ ENQ │rcbname
│ │ │
(0)
├─────┼─────┼───────────────────────────────────────┤
│ │ │qname address
,
rname address,
E
│ │ │
(2-12)
(2-12)
S
│ │ │rname leng─h
,
SYSTEM ,...
│ MVS │ ENQ │(2-12)
STEP
│ │ │
SYSTEMS
└─────┴─────┴───────────────────────────────────────┘
Under VSE you can specify only one resource in each ENQ.
The MVS ENQ macro offers many additional facilities. The ENQ macro requests
the control program to assign control of one or more serially reusable resources
to the active task. If any of the resources are not available, the active task is
placed in the wait state until all of the requested resources are available. The
qname and rname parameters, roughly equivalent to the VSE rcb name,
represent names of a common resource to the control program. These names
may or may not have any relation to the actual name of the resources.
The control program does not associate the name with the actual resource. It
merely processes requests having the same qname and rname on a first-in,
first-out basis. It is your responsibility to associate these names with the actual
resource. These parameters may define a resource name pertaining to this step
only, or a resource name that may be denoted throughout the entire system.
┌─────┬─────┬──────────────────────────────────┐
│ VSE │ DEQ │ rcbname
│ │ │
(0)
├─────┼─────┼──────────────────────────────────┤
│ │ │ qname address
,
rname address
│ │ │
(2-12)
(2-12)
│ MVS │ DEQ │ rname leng─h
,
STEP ,...
│ │ │
(2-12)
SYSTEM
│ │ │
SYSTEMS
└─────┴─────┴──────────────────────────────────┘
The parameters and additional facilities available under MVS are similar to
those explained under the ENQ macro.
286
VSE to OS/390 Migration Workbook