SET CACHE

Read syntax diagramSkip visual syntax diagram Set CACHE DEVICEONOFFSUBSYStemONOFFFORCEOFF FOR rdevrdev1-rdev2

Authorization

Privilege Class: B

Purpose

Use SET CACHE to activate or deactivate the cache function by device or by subsystem. The subsystems are IBM® DASD subsystems.

Operands

DEVICE ON
indicates that caching is to be activated for the specified devices. DEVICE is the default.
DEVICE OFF
indicates that caching is to be deactivated for the specified devices. Any user to whom the device was attached bypasses the cache.
SUBSYStem ON
indicates that caching is to be made available for the entire subsystem to which the device is attached.
SUBSYStem OFF
indicates that caching is to be made unavailable for the entire subsystem to which the device is attached.
SUBSYStem FORCEOFF
indicates that the cache is to be forced to be unavailable to subsystems to which the devices are attached.
rdev
rdev1-rdev2
is the real device number, a list of real device numbers, or a range of real device numbers of devices in the subsystem.

Usage Notes

  1. All SET CACHE operands are nonpositional except that if FOR is specified, it must precede the device list.
  2. Device caching and subsystem cache availability are both required for the caching function to be used, but they are controlled independently. Caching can be turned on for a device, but unless the subsystem cache is available, caching does not occur. The subsystem remembers the caching state of each device even when the subsystem cache is not available.
  3. The caching function is always enabled on RAID (Redundant Array of Independent Disks) technology DASD such as an IBM DASD subsystem. For these types of DASD, the device accepts but ignores this command; the caching function cannot be modified by the user. The caching function for these types will always appear as ON in related query commands.
  4. Error message HCP296E appears if the subsystem is not in the correct mode to accept the QUERY CACHE command.
  5. SET CACHE SUBSYSTEM FORCEOFF is a recovery command. It can be issued only after a SET CACHE SUBSYSTEM OFF has been issued and the subsystem could not make the cache unavailable because of internal errors.
  6. If SET CACHE SUBSYSTEM FORCEOFF is issued, the subsystem causes all current channel programs operating on caching devices to fail.
  7. SET CACHE SUBSYSTEM OFF and SET CACHE SUBSYSTEM FORCEOFF halt, but do not end, Concurrent Copy (CONCOPY) sessions on the subsystem. Because the CONCOPY function requires that caching be available for the subsystem, applications that had active CONCOPY sessions on the subsystem must end and then restart the CONCOPY function after a SET CACHE SUBSYSTEM OFF or SET CACHE SUBSYSTEM FORCEOFF command has been issued.
  8. This command may produce delayed responses. See Delayed Responses to CP Commands for more information.
  9. This command may be issued to offline devices.
  10. When specifying a real device number (rdev), do not use the secondary device in a duplex pair. The QUERY DUPLEX and QUERY DASD DETAILS commands can be issued to determine if a device is a secondary device in a duplex pair.
  11. Error message HCP263E appears if too many devices are specified.

Examples

To activate device 340 for caching, enter SET CACHE DEVICE ON 340.

Responses

Response 1:
rdev CACHE activated for device
If the originator of the command is not the system operator, the following response is issued to the system operator and is also repeated for each device specified on the command line.
rdev CACHE was activated for device by userid.
rdev
is the real device number of the device that had been given access to the cache.
userid
is the ID of the user who issued the command.

Response 2:

Immediate Response: If the cache was deactivated immediately, the following response is displayed for each specified device when you enter SET CACHE DEVICE OFF:
rdev CACHE deactivated for device
Delayed Response: If the cache is not deactivated immediately, the following response is displayed when you enter SET CACHE DEVICE OFF:
Command started:  SET CACHE DEVICE OFF rdev.
When the cache is deactivated, the following response is issued:
rdev CACHE deactivated for device
Under certain circumstances, it is possible that a cache storage subsystem does not notify CP when it has completed deactivating the cache. When this occurs, the appropriate command response cannot be generated. Under these circumstances, command processing ends after generating the following response:
Command results lost:  SET CACHE DEVICE OFF rdev.
In this case the QUERY CACHE command can be issued to determine the state of the cache.
If errors occur during the asynchronous processing of the command which prevent the successful completion of the command, the following response is displayed:
Command failed:  SET CACHE DEVICE OFF rdev.
rdev
is the real device number of a specified device for which the subsystem cache is available.
Response to System Operator: If the originator of the command is not the system operator, the following response is issued to the system operator and is also repeated for each device specified on the command line.
rdev CACHE was deactivated for device by userid.
rdev
is the real device number of a device for which caching has been deactivated.
userid
is the ID of the user who issued the command.

Response 3:

Immediate Response: If the subsystem cache is made available immediately, the following response is repeated for each unique subsystem that is associated with the devices specified when you enter SET CACHE SUBSYSTEM ON:
rdev CACHE available for subsystem
rdev
is the real device number of a specified device for which the subsystem cache has been activated.
Delayed Response: If the cache is not made available immediately, the following response is displayed when you enter SET CACHE SUBSYSTEM ON:
Command started:  SET CACHE SUBSYSTEM ON rdev.
When the cache is made available, the following responses are issued:
rdev CACHE available for subsystem
Under certain circumstances, it is possible that a cache storage subsystem does not notify CP when it has completed making the cache available. When this occurs, the appropriate command response cannot be generated. Under these circumstances, command processing is ended after generating the following response:
Command results lost:  SET CACHE SUBSYSTEM ON rdev.
In this case, the QUERY CACHE command can be issued to determine the state of the cache.
If errors occur during the asynchronous processing of the command preventing the successful completion of the command, the following response is displayed:
Command failed:  SET CACHE SUBSYSTEM ON rdev.
rdev
is the real device number of a specified device for which the subsystem cache has been made available.
Response to System Operator: If the originator of the command is not the system operator, the following response is issued to the system operator when the subsystem cache has been made available. This response is also repeated for each unique subsystem identified by the devices specified on the command line.
rdev CACHE was made available for subsystem by userid.
rdev
is the real device number of one of the specified devices in a subsystem for which the cache has been made available.
userid
is the ID of the user who issued the command.

Response 4:

Immediate Response: If you enter SET CACHE SUBSYSTEM FORCEOFF, or if the cache is made unavailable immediately when you enter SET CACHE SUBSYSTEM OFF, the following response is repeated for each unique subsystem that is associated with the devices specified.
rdev CACHE unavailable for subsystem
rdev
is the real device number of a specified device for which the subsystem cache has been made unavailable.
Delayed Response: If the cache is not made unavailable immediately, the following response is displayed when you enter SET CACHE SUBSYSTEM OFF:
Command started:  SET CACHE SUBSYSTEM OFF rdev.
When the cache is made unavailable, the following responses are issued:
rdev CACHE unavailable for subsystem
Under certain circumstances, it is possible that a cache storage subsystem does not notify CP when it has completed making the cache unavailable. When this occurs, the appropriate command response cannot be generated. Under these circumstances, command processing ends after generating the following response:
Command results lost:  SET CACHE SUBSYSTEM OFF rdev.
In this case, the QUERY CACHE command can be issued to determine the state of the cache.
If errors occur during the asynchronous processing of the command that prevent the successful completion of the command, the following response is displayed:
Command failed:  SET CACHE SUBSYSTEM OFF rdev.
rdev
is the real device number of a specified device for which the subsystem cache has been made unavailable.
Response to System Operator: If the originator of the command is not the system operator, the following response is issued to the system operator when the subsystem cache has been made unavailable. This response is also repeated for each unique subsystem identified by the devices specified on the command line.
rdev CACHE was made unavailable for subsystem by userid.
rdev
is the real device number of one of the specified devices in a subsystem for which the cache has been made unavailable.
userid
is the ID of the user who issued the command.

Messages

  • HCP006E Invalid device type - {rdev|vdev|ldev}
  • HCP009E Invalid range - range
  • HCP021E A real device number was not supplied or it is invalid.
  • HCP026E Operand missing or invalid
  • HCP040E Device {rdev|vdev|ldev} does not exist
  • HCP046E type rdev offline
  • HCP263E Too many operands were specified for this command.
  • HCP296E Status is not as required - rdev; text
  • HCP319E Error processing subsystem command - cmd for DASD rdev
  • HCP332E Invalid control unit type - rdev
  • HCP1109E The command command cannot be processed for device rdev because the device is the secondary in a duplex pair.
  • HCP1120E The requested [command|DETACH|GIVE] for device [ldev|rdev] did not complete in the allotted time.