The RES (Reserve) command enables an area of a disk to be cleared of all files and the spaces marked as unusable.
Syntax

<reserve options>

<segment range>

The number value specifies the following range of sectors to be reserved: the starting address number, the ending address number, and the length.
The hex number value specifies the range of the hex starting address and the hex ending address sectors to be reserved in hexadecimal form.
If the request is directed to the base unit of an online family, a segment range must be specified. You cannot reserve an entire base unit.
Explanation
RES DK <unit number> <reserve options>
RES PK <unit number> <reserve options>
Start an independent runner named RESERVEDISK that reserves the unit according to the reserve options. If insufficient target disk area exists when a RES request requiring copying is entered, then a message is displayed, and the RES action can be terminated by the DS (Discontinue) command. A RES request cannot be directed to the following:
-
Label areas (sectors 0 through 27)
-
Units whose base units are not online
If a RES request is directed to any of these areas, the request is terminated.
COPY ERRORS
Enables copying to continue despite errors if a RES request causes a file to be copied from the area to be reserved and I/O errors occur during copying. Code files, however, are removed.
REMOVE
Automatically removes all files except BADDISK files and special system files such as active directories, the active MCP code file, and the active JOBDESC file that occupy any space in the area being reserved.
These files are not copied or saved; therefore, great care should be exercised in the use of this option. |
System files such as the MCP code file, the JOBDESC file, and so forth are moved if encountered.
Active or queued WFL jobs can prevent job files from being successfully moved.
<reserve options>
The following table explains the reserve options.
Option |
Explanation |
---|---|
AS BADDISK |
The AS BADDISK option causes the entire pack to be covered by a BADDISK file. |
AS MAINT |
The AS MAINT option results in the CLOSE and SV (Save) operations being performed on the unit. It is the only option that can be applied to units that have been closed using the CLOSE (Close Pack) system command. For such units, its function is to mark the unit as saved. If the unit is ready, all files are either transferred from the unit before the CLOSE and SV (Save) operations are performed, or they are removed if the REMOVE option is specified. |
AS DELETED |
Valid for continuation packs but not for base packs in a family. The AS DELETED option causes all files to be moved from the specified continuation pack to the other packs in the same family. The reserve process marks the reserved disk as a SCRATCH disk, and deletes the entry for that family index from the list on the base pack. The next time you use an RC (Reconfigure Disk) command to add a continuation pack to the same family (with a base pack specification that omits a FAMILYINDEX number), the system assigns the family index of the deleted member to the reconfigured disk. |
Segment range |
If the SEGMENT clause is present in the RES command, the specified segment range is covered by a BADDISK file. |
<segment range>
Specifies an area of disk to be covered by a BADDISK file. This parameter is required when reserving the base unit of an online family.
The PHYSICAL option has meaning only for VSS disks. Refer to “Considerations for VSS Disks” later in this topic.
If you specify SEGMENT <starting address number> FOR <length number>, the area to be reserved begins at <starting address number> and is <length number> sectors long.
If you use the command SEGMENT <starting address number> THRU <ending address number>, the area to be reserved begins at <starting address number> and ends at <ending address number>.
If you do not specify either FOR or THRU, the system assumes THRU 1. To specify these numbers in hexadecimal form, use <hex starting address> or <hex ending address>. SEGMENT and ADDRESS are synonyms. The starting address must be greater than or equal to 28 (HEX 1C).
Example
This example removes an area from the tables of usable space for disk pack unit 96:
RES PK 96 SEGMENT 111111 FOR 25
A
---Mix-Pri-CPU Time------ 1 ACTIVE ENTRY -------------- 1281 99 14:17 JOB RESERVEDISK
MSG
--Mix--Time----------------- MESSAGES --------------------- 1281 16:26 PK96 BADDISK/FMLYINX1/UNIT96/AD01B207H CREATED ON DISK 1281 16:25 DATA MOVED IN *SYSTEM/MCP117
Note that all addresses in BADDISK file names are in hexadecimal format.
Considerations for Use
Mirrored Disk Considerations
If the specified pack is mirrored, any changes made to it are also made to the other members of its mirrored set. The AS DELETED and AS MAINT parameters are not allowed for mirrored sets.
Using RES, SQUASH, and XD Requests
Only one RES, SQUASH, or XD request can be active on a disk family at any given time.
Using the AS MAINT Option
For the AS MAINT option, the independent runner RESERVEDISK leaves the pack in the saved state. You can reconfigure or relabel saved packs and return them to a usable state by entering the RY (Ready) command. For more information, refer to the LB (Relabel Pack) command, the RC (Reconfigure Disk)command, and the RY (Ready) command.
Handling Files that Cannot Be Moved
If the independent runner RESERVEDISK encounters files that could not be moved in the area to be reserved, the system displays the following RSVP message:
PK <unit number> RESERVE INCOMPLETE: OK TO RETURN, QT FOR RESDISK
You can then enter one of the following commands.
Command |
Result |
---|---|
DS (Discontinue) |
Releases all space reserved during this run of RESERVEDISK. |
OK (Reactivate) |
Causes another pass through the permanent intersecting files. If any file is still blocking the reserve, it is displayed. If no blockage exists, RESERVEDISK then handles temporary files. |
QT (Quit) |
Causes creation of RESDISK files out of areas that would otherwise be released and then sends the RESERVE procedure to end-of-job (EOJ). You can use this option to cut off the RESERVEDISK overhead, while preventing the allocation to areas that later might be required by a RESERVE procedure. (A RESDISK file has the FILEKIND attribute set to XDISKFILE, and is titled in the same way as BADDISK.) If a RESDISK file is encountered by a subsequent RES command, it is removed. Any part of the old RESDISK that intersects with the new RESERVEDISK specification is then absorbed into the new set of reserved disk, and the remainder is released as available for system use. Old BADDISK files remain in the directory even if the areas were released by a later RESERVEDISK operation. In the display for a PD command, the total sectors for BADDISK are reported as 0 (zero): "TOTAL SECTORS 0." |
Considerations for VSS Disks
All disks (including disks using VSS formats) have 180-byte logical segments. Disks using VSS formats can also be referenced by physical segment size, which is 512 bytes for VSS-1 and VSS-2 disks, or 4096 bytes for VSS-3 disks. By default, the <segment range> for a VSS disks refers to logical segments. However, if you include the PHYSICAL option at the start of the <segment range>, then the <segment range> refers to physical segments.
If the RES command uses the physical segment address, the system converts the address into a range of logical segment addresses before processing the command. The range of logical segment addresses starts with the first logical segment address that is located within the first physical segment address to be reserved, through the last logical segment address located within the last physical segment address to be reserved.
Thus, any BADDISK files created by the RES command have boundaries corresponding to logical segments, regardless of whether the PHYSICAL option was used.
The following examples illustrate the effects of logical or physical segments specified in the RES command.
Note: | For the sake of simplicity, the following examples reference segments at the start of the disk. Actually, segments 0 through 27 are the label area and cannot be reserved. Nonetheless, the concepts illustrated by these examples are valid. |
Example 1: VSS-2 Disk
Suppose you enter the following command:
RES PK 96 SEGMENT 0 THRU 3
In this case, the system creates a BADDISK file that reserves logical segments 0 through 3. The BADDISK file name is BADDISK/FMLYINX1/UNIT96/AD0H.
Example 2: VSS-2 Disk
Suppose that the BADDISK file that was created in example 1 already exists, and you enter the command
RES PK 96 PHYSICAL SEGMENT 1 THRU 2
The system creates a second BADDISK file, with the name BADDISK/FMLYINX1/UNIT96/AD2H. The file reserves logical segments 2 through 5, because these correspond to physical segments 1 and 2, as shown in the following figure:

Because two BADDISK files can not reserve the same logical segment, the system alters the BADDISK file from example 1 so that it no longer reserves logical segments 2 and 3. The file reserves only logical segments 0 and 1. The BADDISK file name remains unchanged: (BADDISK/FMLYINX1/UNIT96/AD0H).
At the conclusion of this example, two BADDISK files exist. The file names and segments reserved by each file are as follows:
-
BADDISK/FMLYINX1/UNIT96/AD0H corresponds to physical segment 0 and reserves logical segments 0 and 1.
-
BADDISK/FMLYINX1/UNIT96/AD2H corresponds to physical segment 1 and 2, reserving logical segments 2 through 5.
Example 3: VSS-1 Disk
Suppose you enter the following command:
RES PK 96 PHYSICAL SEGMENT 1
In this case, the system creates a file named BADDISK/FMLYINX1/UNIT96/AD2H that reserves logical segments 2 through 5. These are all the logical segments that are wholly or partly contained in physical segment 1, as the following figure shows:

This action reserves a little more than physical segment 1. The part of logical segment 2 that overlaps with physical segment 0 is also reserved, as is the part of logical segment 5 that overlaps with physical segment 2.
Example 4: VSS-1 Disk
It is possible for two seemingly unrelated REServe commands to affect the same logical segment. This is possible because a RES command can specify physical segments, but the system translates these physical segments into logical segments that might overlap adjoining physical segments.
Suppose that the BADDISK file from example 3 already exists, and you enter the following command:
RES PK 96 PHYSICAL SEGMENT 2
As a result of this command, the system creates a file named BADDISK/FMLYINX1/UNIT96/AD5H. This file reserves logical segments 5, 6, 7, and 8, because these all correspond to physical segment 2, as shown in the following figure:
As you can see from the following figure, physical segment 2 maps to logical segments 5, 6, 7, and 8:

Note, however, that the BADDISK file created by example 3 also reserved logical segment 5. Because two BADDISK files can not reserve the same logical segment, the system alters the BADDISK file from example 3 so that the file no longer reserves logical segment 5. The file reserves only logical segments 2, 3, and 4. The BADDISK file name remains unchanged (BADDISK/FMLYINX1/UNIT96/AD2H).
Example 5: VSS-1 Disk
Suppose that the two BADDISK files from example 4 already exist, and you enter the following command:
RES PK 96 PHYSICAL SEGMENT 0
Where physical segment 0 maps to logical segments 0, 1, and 2 as shown in the following figure:

In this case, the system
-
Creates a third BADDISK file, named BADDISK/FMLYINX1/UNIT96/AD0H. The file reserves logical segments 0 through 2.
-
Alters the previously created BADDISK file that reserves logical segments 2 through 4. The system removes logical segment 2 from this file, so it now reserves only logical segments 3 and 4.
Note that the system also renames the BADDISK file in this case, because the file name is based in part on the first segment that the file reserves, and this file now starts at logical segment 3 instead of logical segment 2. The resulting BADDISK file name is BADDISK/FMLYINX1/UNIT96/AD3H.
At the conclusion of this example, the following BADDISK files exist.
File Name |
Description |
---|---|
BADDISK/FMLYINX1/UNIT96/AD0H |
Corresponds to physical segment 0 and reserves logical segments 0 through 2. |
BADDISK/FMLYINX1/UNIT96/AD3H |
Corresponds to physical segment 1 and reserves logical segments 3 and 4. |
BADDISK/FMLYINX1/UNIT96/AD5H |
Corresponds to physical segment 2 and reserves logical segments 5 through 8. |
If you remove BADDISK/FMLYINX1/UNIT96/AD0H, the system makes logical segments 0 through 2 available for use. This means that all of logical segment 2 becomes available even though it overlaps into physical segment 1 (previously reserved). Later, when a program attempts to read or write logical segment 2, the system attempts to access all of physical segment 1. An error can result if physical segment 1 is defective.