|
The following information illustrates flowcharts and logic of nonstandard
label processing routines. The logic is shown separately for routines
receiving control from the open, close, EOV, or restart routines of
the control program. Each block in each of the flowcharts is numbered;
each number corresponds to an item in the lists of explanations that
follow the figures.
Figure 1. General Flow of a Nonstandard
Label Processing Routine After Receiving Control from the Open Routine.
Figure 2. General Flow of a Nonstandard
Label Processing Routine After Receiving Control from the Close Routine
Figure 3. General Flow of a Nonstandard Label Processing
Routine After Receiving Control from the EOV Routine
Explanation of Logic Blocks-Figures Figure 1, Figure 2, and Figure 3 - 1
- The entry is in the form of an XCTL macro instruction issued by
the control program.
- 2
- Use the GETMAIN or STORAGE macro instruction to obtain virtual
storage.
- 3
- Use the store multiple (STM) instruction and then set a register
to point 32 bytes past register 6 as described in Figure 1.
- 4
- To locate the address of the DCB, use the contents of register
5 ( Figure 1).
Set register 4 to the address of the work area pointed to by the table
entry described in Figure 1.
(For EOV, this register is already set.)
To determine if the DCB
is to be processed, test bits 6 and 7 of the DCBOFLGS field of the
DCB; if these bits are 1, the DCB is to be processed. (The symbolic
names of all fields in the DCB are defined by the DCBD macro instruction.)
The user's DCB is pointed to by the DXUDCBAD field on the combined
work and control block area.
If a DCB in the CLOSE parameter
list is not open at entry to CLOSE, it is not processed, and its entry
is all zeros in the table pointed to by register 6 at entry.
- 5
- To determine if a tape data set is being processed, test the UCB3TAPE
field of the UCB; this bit is 1 for a tape data set. The symbolic
names of all fields in the UCB are defined by the IEFUCBOB macro instruction. The address
of the UCB is contained in the DXDEBUCB field of the DEB as defined
by the IECDSECT macro instruction. Register 4 points to this IECDSECT
area. (The
IECDSECT macro is described in Mapping the Common Open, Close, EOV Work Area.)
- 6
- If nonstandard labels have been specified, the JFCBLTYP field
of the JFCB has a hexadecimal 04.
- 7
- The final DCB entry in the list of DCB addresses contains a 1
in its high-order bit position.
- 8
- Add 4 to the contents of register 5; add 8 to the contents of
the register set in Step 3.
- 9
- Set the high-order bit to 0 in the UCBDMCT field of the UCB.
- 10
- To determine the type of I/O operation specified in the OPEN macro
instruction, check the bit configuration of the high-order byte of
the the DCB entry in the list of DCB addresses. The bit configuration
for each type of I/O operation is shown below. (The high-order 4 bits
correspond to the disposition of the data set; the low-order 4 bits
correspond to the I/O operation itself. For example, the bit configuration
x0110000 indicates a data set opened for input whose disposition is
LEAVE.)
0 |
1 |
2 |
3 |
|
4 |
5 |
6 |
7 |
|
Bits |
---|
x |
0 |
0 |
1 |
|
x |
x |
x |
x |
|
REREAD |
x |
0 |
1 |
1 |
|
x |
x |
x |
x |
|
LEAVE |
x |
0 |
0 |
0 |
|
x |
x |
x |
x |
|
Neither REREAD nor LEAVE |
|
|
|
|
|
|
|
|
|
|
|
x |
x |
x |
x |
|
0 |
0 |
0 |
0 |
|
INPUT |
x |
x |
x |
x |
|
1 |
1 |
1 |
1 |
|
OUTPUT or EXTEND |
x |
x |
x |
x |
|
0 |
1 |
1 |
1 |
|
OUTIN or OUTINX |
x |
x |
x |
x |
|
0 |
1 |
0 |
0 |
|
UPDAT |
x |
x |
x |
x |
|
0 |
0 |
1 |
1 |
|
INOUT |
x |
x |
x |
x |
|
0 |
0 |
0 |
1 |
|
RDBACK |
- 11
- If the high-order bit of the DCBOFLGS field of the DCB is 1, the
data set mode is output; if this bit is 0, the data set mode is input.
(The symbolic names of all fields in the DCB are defined by the DCBD
macro instruction.)
- 12
- You can position the tape if you have closed an input data set
before all data has been read.
- 13
- Move your CCW into the channel program area of the control program's
work area. (The symbolic name of the first entry
in the channel program area is DXCCW.) You can use the first six entries.
- 14
- Issue an EXCP macro instruction specifying the address of the
control program's IOB. (The symbolic name of the IOB is DXIOB.)
- 15
- Techniques used to check for correct volume differ depending on
the label formats used in the installation.
- 16
- Label processing routines differ by label format.
- 17
- Use this block for a write operation.
- 18
- Issue an EXCP macro instruction specifying the address of the
control program's IOB. (The symbolic name of the IOB is DXIOB.)
If
the command is a rewind, use the compare and swap instructions to
set the rewind-issued bit in the UCB (UCBREW) before issuing the EXCP.
If
the command is a rewind-unload, use the compare and swap instructions
to set the unit-not-ready bit in the UCB (UCBNRY) and zero out the
UCB volume serial number field (UCBVOLI) after the channel program
is complete.
- 19
- Set the high-order bit to 1 in the UCBDMCT field of the UCB.
- 20
- Use the load multiple (LM) instruction.
- 21
- Use the FREEMAIN macro instruction to free the work area obtained
in step 2.
- 22
- Use the XCTL macro instruction, specifying the appropriate operand.
-
- This coding sequence illustrates an exit from your routine. At
entry to the module, register 4 contains the address of the control
program's work area for a DCB. The code below represents a generic
work area.
USING IECDSECT,4
LR 1,SAVEBASE put work area pointer in
* register 1 for FREEMAIN
LM 2,14,REGSAVE restore caller registers
FREEMAIN R,LV=size,A=(1)
BALR 15,0 use 15 as temporary base
USING *,15
MVC 0(8,6),MODNAME module name to
* open/close/EOV area
LA 15,DXCCW12 use open work area
XCTL EPLOC=(6),SF=(E,(15))
MODNAME DC C'IGGxxxxx'
Figure 4. General Flow
of a Nonstandard Label Processing Routine After Receiving Control
from the Restart Routine
Explanation
of Logic Blocks- Figure 4 - 1
- The entry is in the form of an XCTL macro instruction issued by
the control program.
- 2
- Use the GETMAIN macro instruction to obtain virtual storage.
- 3
- Use the store multiple (STM) instruction.
- 4
- Move your CCW into the channel program area of the control program's
work area. (The symbolic name of the first entry in the channel program
area is RSCCW1.)
The control program provides the device modifier
byte, RSDEBMOD, in the DEB portion of the restart work area. RSDEBMOD
contains the mode-set command for the data portion of the tape. If
your nonstandard labels are recorded in a mode different from the
data, your NSL routine must set the device modifier byte (RSDEBMOD)
to the density and recording technique of the labels. (See "Tape
Characteristics" in z/OS V2R1.0 DFSMS Using Magnetic Tapes.)
- 5
- Issue an EXCP macro instruction specifying the address of the
control program's IOB. (The symbolic name of the IOB is RSIOB.)
- 6
- Determine if an uncorrectable I/O error occurred. This can be
any type of error that you do not want to accept.
- 7
- Set the high-order bit to 1 in the TABTPLBL field of the table
entry to indicate the I/O error.
- 8
- Techniques used to check for correct volume differ depending on
the label formats used in the installation. The volume serial number
for the mounted volume is shown in the UCB.
- 9
- Perform any necessary label processing and tape positioning.
- 10
- Set the high-order bit to 1 in the UCBDMCT field of the UCB.
- 11
- Use the load multiple (LM) instruction.
- 12
- Use the FREEMAIN macro instruction to free the work area obtained
in step 2.
- 13
- Use the XCTL macro instruction. The following coding sequence
illustrates an exit from your routine.
LR 1,SAVEBASE put work area pointer in
register 1 for FREEMAIN
LM 2,14,REGSAVE restore caller registers
FREEMAIN R,LV=size,A=(1)
BALR 15,0 use 15 as temporary base
USING *,15
L 1,4(,9) put pointer to restart
work area into register 1
MVC 128(8,1),MODNAME put module name in
restart work area
LA 15,120(,1) set up XCTL
parameter pointers
LA 5,128(,1) set up XCTL
parameter pointers
XCTL EPLOC=(5),SF=(E,(15))
MODNAME DC C'IGC0K05B'
|