z/OS JES2 Commands
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


$P SPOOL - Drain a spool volume

z/OS JES2 Commands
SA32-0990-00

Function

To drain and delete an entire spool volume by processing all work on the volume and preventing any available space on the volume from being allocated.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-$P----------------------------------------------------------->

>--+-SPL---+--+----------------------------------------------+-->
   '-SPOOL-'  +-volser--+----------------+-------------------+   
              |         '- ---+-volser-+-'                   |   
              |               '-*------'                     |   
              +-'--volser--'---------------------------------+   
              |    .-,----------------------------------.    |   
              |    V                                    |    |   
              '-(----+-+-volser-+--+----------------+-+-+--)-'   
                     | '-*------'  '- ---+-volser-+-' |          
                     |                   '-*------'   |          
                     +-volser-------------------------+          
                     '-'--volser--'-------------------'          

>--+---------------------------------+-------------------------->
   '-| Selection limiting keywords |-'   

>--+---------------------------+-------------------------------><
   '-| Modification keywords |-'   

Modification keywords

|--+-----------+------------------------------------------------|
   '-,--Cancel-'   

Selection limiting keywords

|--+----------------------------------+-------------------------|
   '-,--+---+--Volume--+-=--+--volume-'   
        '-/-'          +-^=-+             
                       +->--+             
                       '-<--'             

Parameters

Cancel
JES2 cancels all jobs that have used the volume (those jobs that can be cancelled). If any of the jobs being cancelled have data sets residing on another volume, those jobs are also cancelled. JES2 cancels output for non-selectable jobs as well. For the jobs being cancelled, all track groups across all spool volumes are cancelled.

If you specify this parameter for an INACTIVE volume, JES2 deletes any work remaining on the volume. This could result in lost spool space on other volumes if the jobs on the volume being cancelled have allocated space on other volumes. All other job resources are recovered. JES2 is able to recover the lost spool space at an all-member warm start if you include SPOOL=VALIDATE as a restart option or automatically within 7 days as provided by the automatic spool reclamation function, whichever occurs first.

If the volume can be remounted, issue the start ($S SPOOL,CANCEL,P) command to prevent the loss of spool space.

Volume=volume
The volume serial number of the spool volume.

Authority Required

This command requires system authority. The description of the $T RDRnn command explains how to ensure that the authority of the appropriate MVS™ system command group is assigned.

This command requires control security access authority. For a description of assigning command input authority, see z/OS JES2 Initialization and Tuning Guide, SA32-0991.

Processing Considerations

During the draining process, JES2 moves any spooled messages or JESNEWS to an ACTIVE spool volume.

If a spool failure occurs, the operator should be instructed to issue a $Z SPL command for each volume that is in error. This will prevent JES2 from trying to allocate more space from that volume, and from being selected for work (i.e. conversion, execution, and printing).

If a member wide warm start is done without the volumes that had errors on them, then JES2 message $HASP424, VOLUME NOT MOUNTED, will be issued followed by JES2 message $HASP853, REPLY GO, QUIT, or PURGE. If the volume is thought to be recoverable at some time, reply GO. This will cause the volume to come up in an inactive state. The jobs that have space allocated from this volume will not be available for work. JES2 will not attempt to use any space from the volume until a $S SPL command is used.

If the volume is permanently damaged, reply PURGE to this message. Reply PURGE only if you are absolutely certain that all volumes cannot be recovered. Replying PURGE will cause all jobs with space allocated from that volume to be purged. No messages or warnings will be issued indicating that this happened.

You can use the FENCE parameter on the SPOOLDEF initialization statement to define the spooling environment by controlling the partitioning of the spool volumes. This can be a safeguard against spool failure. You use the FENCE parameter to tell JES2 how to partition spool volumes when performing I/O operations. If fencing is turned off, then jobs that have already obtained some spool space when fencing was active will not be fenced. The syntax of the FENCE= keyword is changed to FENCE=(ACTIVE=YES,VOLUMES=nnn) to indicate that all space that a job requires will be allocated from "nnn" volumes. (FENCE=(ACTIVE=YES,VOLUMES=1) is equivalent to FENCE=YES in prior releases.) These volumes are determined by JES2 as the first available volume from which this job can allocate space.

Although, FENCE=(ACTIVE=YES,VOLUMES=nnn) indicates that JES2 will fence to nnn volumes in most cases. However, more than nnn volumes may be used in certain situations (when spool volumes fill or if the job obtains spool space on different systems as it goes through different phases.) JES2 will allocate space from a subsequent volume(s) when, and if, the "nnn" becomes full. Refer to the FENCE= parameter on the SPOOLDEF statement in z/OS JES2 Initialization and Tuning Reference, SA32-0992 for how to use this parameter. You may also set the FENCE= parameter using the $T SPOOLDEF command.

JES2 exits 11 and 12 can be used as an alternative method for limiting the volumes from which a job may allocate space.

Scope

MAS-wide. This command has an effect across the entire MAS.

Messages

If the volume already has a status of DRAINING, JES2 issues the $HASP893 message indicating the status of the volume.

When all work on the volume is completed and the volume is deallocated, the $HASP806 message notifies the member on which this command is entered that the volume is drained.

Examples

 1   $pspl(spool1)

  $HASP893 VOLUME(SPOOL1)  STATUS=ACTIVE,COMMAND=(DRAIN)
  $HASP646 39.4285 PERCENT SPOOL UTILIZATION
JES2 drains spool volume SPOOL1 (which is currently active).
 2   $pspl(spool2),cancel

  $HASP893 VOLUME(SPOOL2)  STATUS=ACTIVE,COMMAND=(DRAIN)
  $HASP646 33.3333 PERCENT SPOOL UTILIZATION

JES2 cancels all work that can be cancelled on SPOOL2 and then drains the spool volume.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014