Placing an I/O device or a range of I/O devices online or offline

Use the following form of the VARY command to place I/O devices online or offline.
 
V {(devspec[,devspec]...)},{ONLINE[,UNCOND][,FORCE]}
  {devspec               }         |,SHR           
                                   |,RESET         
                         
                           {OFFLINE[,FORCE]        }

In a JES2 environment, use this command to specify that a cartridge tape device (such as a 3490) is to be shared among more than one system.

Use this form of the VARY command with care in a JES3 environment. For devices managed by JES3, issue a *VARY command instead of the MVS™ VARY command to change online or offline status. See “Placing Devices Online or Offline to JES3” in z/OS JES3 Commands.

devspec
devspec is one of the following:
[/]devnum
The device number of an I/O device.
O-[/]devnum
The device number of a console device preceded by the literal ‘O-’ to designate a device with output-only capability.
nnnnnnnn
The name of a console device as specified in the CONSOLxx Parmlib member CONSOLE statement.
O-nnnnnnnn
The name of a console device as specified in the CONSOLxx Parmlib member CONSOLE statement preceded by the literal ‘O-’ to designate an output-only device.
[/]lowdevnum-[/]highdevnum
lowdevnum is the device number of an I/O device that is the lower bound of a range of device numbers. highdevnum is the device number of an I/O device that is the upper bound of the range.

The various types of devspec can be specified in any combination, either a valid console name or a valid device number. The console name check will be made first and valid console names accepted. If you specify only one devspec, you do not need to enter the parentheses.

A device number is 3 or 4 hexadecimal digits, optionally preceded by a slash (/). You can precede the device number with a slash to prevent ambiguity between the device number and a console name.

RESET, UNCOND and SHR keywords are ignored for console-capable devices. VARY of a range of devices is supported for console-capable devices.

ONLINE
The system is to bring the specified devices or ranges of devices online, that is, make the devices or ranges of devices available for allocation to problem programs and system tasks, if there is an online path to the devices. In a system-managed tape library, if the file tape drives within the library were placed offline with both the VARY device and VARY SMS commands, then you must issue both commands to place those devices online. If you bring a device online and you want the system to recognize a volume mounted while the device was offline, enter a MOUNT command for the device.
Note:
  1. Varying an UNAVAILABLE device online will cause it to be marked both AVAILABLE and ONLINE.
  2. If you specify a device that is not physically attached to its control unit, the system might consider the device operational and online. If an attempt is later made to allocate the device to a job, the attempt might fail, in which case the job would have to be canceled.
  3. Bringing a device online cannot bring online I/O paths that have been taken offline with a VARY PATH command.
  4. Switch actions that restrict a channel's access to devices or control units might cause the command to be unsuccessful. If this is the case, adjust your switch configuration to make sure there is an online path to the device.
  5. If you issue a VARY device ONLINE command for a device whose last path has been taken offline with a VARY PATH OFFLINE command, the system issues the following message:
    IEE025I UNIT ddd HAS NO LOGICAL PATHS
  6. If you specify a range of devices and any or all of them are not valid, you receive message IEE313I indicating the device numbers that are not valid.
  7. For an automatically switchable tape device, the VARY ONLINE command brings the device online to the issuing system. This makes the device available to be allocated to that system. The device will be assigned when it is allocated.
UNCOND
The system is to bring the specified devices or range(s) of devices online, even if there are no paths to the devices or if the devices are pending offline and boxed. The system ignores this operand if you specify it for a tape or direct access device that does not have a path. Use the UNCOND operand carefully because it causes inaccessible devices to appear accessible to some system components.

You can use the VARY bbbb,ONLINE,UNCOND command to correct problems when HyperPAV aliases are not properly used. Such an error condition occurs when non-FICON channels are configured online to a HyperPAV-capable control unit. Because MVS operates on base devices within that logical subsystem in base only mode, MVS cannot use alias devices for bases in the logical control unit. You can detect this condition by outstanding message IOS166E or by using the D M=DEV(bbbb) command, where bbbb is a base device in the logical control unit. MVS can use the HyperPAV aliases only after the non-FICON channels are removed from the HyperPAV configuration or these channels are configuring offline. However, it may be necessary under this or other conditions to force MVS to rediscover aliases that were not discovered previously. Use the VARY bbbb,ONLINE,UNCOND command where bbbb is an online base device in the logical control unit.

SHR
The system permits the sharable tape device you bring online to be shared among other processors. The system ignores the SHR keyword when specified for a device that is not assign capable. Share a tape device between processors only at the direction of the system programmer.
Do not use this keyword:
  • For devices managed by JES3. JES3-managed devices are automatically sharable within the JES3 complex.
  • For automatically switchable devices. If you use the SHR keyword, the system rejects the command because it is incompatible with automatic tape switching.

Do not confuse the sharing of tape devices (through the SHR keyword) with automatically switchable tape devices. The SHR keyword allows many systems sharing a key to access a single tape device at one time. Although automatically switchable devices are varied online to many systems at one time, only one system can actually access a device at one time.

RESET
The system is to bring online a device that is being kept offline because of a control-unit-initiated reconfiguration (C.U.I.R.).
OFFLINE
The system is to take the specified device(s) or range(s) of devices offline, that is, make the device(s) or range(s) of devices unavailable for allocation to application programs or system tasks. The system takes offline any device that is currently in use only after all the tasks to which it is allocated terminate.
Note:
  1. When you issue a VARY OFFLINE command, the system immediately places the specified device(s) in the "pending offline" state. A device in the pending offline state cannot be allocated — even if the job specifically requests the volume mounted on the device — unless the allocated/offline device installation exit is used to allow allocation or the operator selects the device in response to message IEF238D.
  2. If a WTOR message IEF238D is outstanding, that is, has not yet been replied to, VARY OFFLINE activity cannot take place.
  3. Also, while a message IEF238D remains outstanding, no other allocations can proceed for any devices in the same group as the device(s) waiting for the IEF238D response. For example, if a job is in allocation recovery trying to allocate a 3490 device (UNIT=3490), no other D/T3490 allocation will take place until the message IEF238D is satisfied. Similarly, if a job is trying to allocate a device in a device group named, say, CARTNY (UNIT=CARTNY), then no devices in CARTNY will be allocated until message IEF238D is satisfied.

The VARY device OFFLINE command takes effect immediately if the resources are available and the device is not allocated or when a system task starts.

When the specified device(s) is offline, you receive message IEF281I and, if you have not specified FORCE, the system rewinds and unloads all specified tape drives except for JES3-managed tape drives. All devices taken offline remain offline until you enter VARY device ONLINE commands for them or specify them in response to a system request for devices.

Note: When you specify VARY OFFLINE for a range of devices:
  • If some or all of the devices are valid, you receive a status display of those devices in each range.
  • If some or all of the devices are valid and are alternate path device numbers, or do not have device names assigned to their UCBs, you receive message IEE712I, stating that VARY processing has finished.
  • If any of the devices are not syntactically valid, you receive message IEE313I indicating the device numbers that are invalid.

Make sure, when you specify a range of devices to be taken offline, that the range does not include any console device numbers.

CAUTION:
Never take any device offline if that device holds SYS1.DUMPxx data sets unless you first remove the SYS1.DUMPxx data sets from the system’s list of SYS1.DUMPxx data sets with a DUMPDS DEL,DSN= command.
FORCE
You can specify FORCE with ONLINE or OFFLINE. The effect on the system is quite different, as described in the following.

FORCE specified with OFFLINE: When specified with the OFFLINE keyword, FORCE puts the specified device or devices immediately in pending offline status, even if they are currently active, allocated, reserved or assigned. The system stops I/O in progress on the devices and rejects future I/O requests to the devices as permanent I/O errors.

You can issue VARY device,OFFLINE,FORCE only from the master authority console.

If JES3 manages a device, VARY device,OFFLINE with FORCE still marks the device as pending offline to MVS. Any allocated device put into pending offline status with FORCE remains allocated to the user who owns it when you issue the VARY command. The system actually takes the device offline when all users have deallocated it. (The system does not allocate a device put into pending offline status with FORCE to any new job, regardless of how the job requests the device.)

You can also use VARY device,OFFLINE,FORCE to take any console.

When the system takes a device offline as a result of a VARY device,OFFLINE,FORCE command, you can usually bring the device online and make it available for I/O again by issuing a VARY device,ONLINE command. If, however, there are no physical paths to the device or the device is non-operational, you can place the device online only with a VARY device,ONLINE,UNCOND command. (Note that the system ignores the UNCOND operand if you specify it for a tape or direct access device.) A device brought online with UNCOND remains unavailable for I/O until you either supply it with a physical I/O path or make it fully operational again.
Note:
  1. Use VARY device,OFFLINE,FORCE only with great care in situations where the system is in serious trouble. Even if a specified device is already offline, the command immediately terminates all I/O in progress on the device; future I/O requests to the device are rejected as permanent I/O errors. Thus, the command might cause the loss of data, as well as a data integrity problem if the command prematurely releases a reserved device or unassigns an assigned device.
  2. If you issue VARY device,OFFLINE,FORCE for a CTC adapter used by global resource serialization, be sure that you issue the command from both of the systems attached to that CTC adapter.
  3. When you issue VARY ctc,OFFLINE,FORCE for a CTC adapter used by global resource serialization, you will be prompted by message ISG186D. Reply KEEP to take the CTC offline normally, allowing GRS to use the CTC when it is brought back online. Reply FREE to take the CTC away from GRS permanently. This will allow the installation to allocate the CTC to XCF signalling. See MVS System Messages for more information about message ISG186D.

FORCE specified with ONLINE: When specified with the ONLINE keyword, FORCE places the specified device or devices online even if they are being kept offline by a configuration manager.

Example 1:

To make devices 282, 283, and 287 available for system use, enter:
vary (282,283,287),online

Example 2:

To take offline any devices in the range 283 through 287 and the range 130 through 135, enter:
V (283-287,130-135),OFFLINE

Example 3:

To make device 282 available for system use even if there is no path to the device, enter:
V 282,ONLINE,UNCOND

Example 4:

To terminate I/O to device 282, enter:
V 282,OFFLINE,FORCE

Message IEE800D asks you to confirm this command, which would cause the system to stop I/O in progress on device 282 and reject future I/O requests to the device as permanent I/O errors. Reply NO to message IEE800D to terminate the command and leave the status of the device unchanged. Reply YES to have the system stop I/O on the device, reject future I/O requests to the device, and mark the device pending offline (if device 282 is not already offline).