VARY SUBCHANNEL
Authorization
Privilege Class: B
Purpose
Use VARY SUBCHANNEL to enable or disable one or more subchannels.
Operands
- ONline
- tells CP to enable the specified subchannel, subchannels, or range of subchannels.
- OFFline
- tells CP to disable the specified subchannel, subchannels, or range of subchannels.
- SUBchannel rdev
- SUBchannel rdev1-rdev2
- is the number of the real device whose associated subchannel is to be enabled or disabled. You may specify a list or range of devices. If you specify a range of real device numbers, all valid devices in the range, including the first and last devices you specify, will have their designated subchannels enabled or disabled. The maximum number of devices allowed in a range is 256. For a device in the active configuration, the device number entered can be a 4-digit hexadecimal number between X'0000' and X'FFFF'. For a device in the active or standby configuration, the device can be a 5-digit hexadecimal number between X'00000' and X'3FFFF' with the leading digit specifying the subchannel set where the device is configured. A range of devices cannot span subchannel sets.
Usage Notes
- Each RDEV has only one associated subchannel which defines this device to the hardware I/O configuration. Through this command CP will either set or reset the ENABLED bit in the associated subchannel for the given device.
- Once you have successfully disabled the subchannel for the given device, no further I/O requests and I/O interrupts will be accepted for the device.
- You must use the VARY command to take a device offline before you can disable its subchannel. Before you can VARY the device back online, you must enable the subchannel through the use of VARY SUBCHANNEL.
Upon completion of a VARY OFFLINE SUBCHANNEL command,
the specified device is no longer enabled for HyperSwap.

Responses
Response 1:
To VARY a subchannel online, enter the following VARY SUBCHANNEL command:
vary on sub 701
0701 subchannel varied online
1 device(s) specified; 1 device(s) successfully varied subchannel online
Ready;Response 2:
To VARY a range of subchannels offline, enter the following VARY SUBCHANNEL command:
vary off sub 701-703
0701 subchannel varied offline
0702 subchannel varied offline
0703 subchannel varied offline
3 device(s) specified; 3 device(s) successfully varied subchannel offline
Ready;Response 3:
If the subchannel is already enabled:
vary on sub 702
0702 subchannel is already online
1 device(s) specified; 0 device(s) successfully varied subchannel online
Ready;Response 4:
If the subchannel is already disabled:
vary off sub 701
0701 subchannel is already offline
1 device(s) specified; 0 device(s) successfully varied subchannel offline
Ready;Messages
- HCP009E Invalid range - range
- HCP0026E Operand missing or invalid
- HCP0040E Device rdev does not exist
- HCP0267E A subchannel number was not supplied or is invalid
- HCP1150E DASD rdev is not a valid base exposure.
- HCP1249I Device rdev cannot be varied subchannel {disable|enable} because a time-out condition occurred
- HCP6760E Device rdev is not offline.
