Program Functions

In processing nonstandard labels, the routines must perform many of the functions that the control program performs in processing standard labels. Use the EXCP (execute channel program) macro instruction to perform all input/output operations as reading labels, writing labels, and positioning volumes. Normally, to use EXCP you are required to build several control blocks in your work area. However, you can save coding effort and virtual storage space by using control blocks already established by the control program.
Figure 1. Status of Control Information and Pointers
REQTEXT

Register 5 contains the starting address of a list of DCB addresses. Each DCB specified in the OPEN or CLOSE macro instruction has a 4-byte entry in the list. The DCBs to which the entries point are copies in protection key 5 storage. The list might also include one or more ACB addresses. The list, the DCBs, and any ACBs reside below the 16 MB line.

For each DCB specified in the OPEN or CLOSE macro instruction, a combined work and control block area is built unless OPEN or CLOSE has determined that the DCB or ACB cannot be processed. Register 6 contains the starting address of a table that contains an address for each work and control block area. The addresses of the areas are contained in the low-order 3 bytes of 8-byte entries. The list of 8-byte entries begins 32 bytes from the starting address on the table. The format of the combined work and control block area is shown in Figure 2.

Figure 2. Format of Combined Work and Control Block Area
REQTEXT

Your nonstandard label processing routines can address each of the fields within the work and control block area. The IECDSECT macro instruction defines the symbolic names of all these fields. Write this macro instruction (with a null operand field and immediately preceded by a DSECT statement) in the list of constants for each of your nonstandard label processing routines. Using the starting address of the work area as a base, you are able to address any field symbolically.

When your nonstandard label processing routine receives control from the close or EOV routine, some of the information shown in the work area DEB is not the same as contained in the actual DEB. If you need actual DEB information at these times, you can get the address of the DEB from the DCBDEBAD field in the DCB.

Figure 3. Status of Control Information and Pointers from the Control Program's Restart Routine
REQTEXT

Register 9 contains the starting address of a 48-byte table entry. Five bytes from the starting address of this table entry, a 3-byte field (TABSEGAD) contains the starting address of a work and control block area that is associated with the data set.