PG (Purge)

The PG (Purge) command purges tape or disk pack, and erases CD-RW media. The disk pack and tape units must be ready and not in use, and the units must be write enabled.

A locking mechanism prevents multiple copies of programs from attempting to use the ACQUIRE (Acquire Resource), CLOSE (Close Pack), FREE (Free Resource), INITIALIZE (Initialize Disk), LB (Relabel Pack), PG (Purge), PG (Purge), and UR (Unit Reserved) commands to access the same device simultaneously. If one of these operations is already in progress when another command is issued to the same device, the command is rejected and the following message is displayed:

PK <unit> <command entered> COMMAND REJECTED BECAUSE ANOTHER
COMMAND IS USING THIS UNIT.

If the command is rejected, wait for the current command to complete and enter the command again.

Syntax

──┬─PG─────┬──────────────────────────────────────────────────────────────►
  ├─PURGE──┤
  └─PGL────┘
►─┬─CD──<unit number>─┬────────────────────────────────────────────────┬───┤
  │                   └─OLDNAME─┬───┬─<name>───────────────────────────┤
  │                             └ = ┘                                  │
  ├─MT──<unit number list>─┬───────────────────────────────────────────┤
  │                        │ ┌◄─────────────────────────┐              │
  │                        └─┴┬─/1\───(<density>)──────┬┴──────────────┤
  │                           ├─/1\───<scratch pool>───┤               │
  │                           ├─/1\───UNLOAD───────────┤               │
  │                           └─/1\─┬─COMPRESSED─────┬─┘               │
  │                                 └─NONCOMPRESSED──┘                 │
  └─PK──<unit number list>─┬───────────────────────────────────────────┤
                           │ ┌◄──────────────────────────────────────┐ │
                           ├─┴─┬─ERASE─┬───┬─┬─ZEROS───────────────┬─┴─┤
                           │   │       └ = ┘ ├─TRIPLE──────────────┤   │
                           │   │             └─TRIPLEVERIFY────────┤   │
                           │   ├─INIT──VSS─┬───┬─┬─NATIVE──────────┤   │
                           │   │           └ = ┘ ├─VSS1────────────┤   │
                           │   │                 ├─VSS2────────────┤   │
                           │   │                 └─VSS3────────────┤   │
                           │   ├─OLDNAME─┬───┬─<oldname list>──────┤   │
                           │   │         └ = ┘                     │   │
                           │   ├─OWNER─┬───┬─<name>────────────────┤   │
                           │   │       └ = ┘                       │   │
                           │   └─SERIAL─┬───┬─<serial list>────────┘   │
                           │            └ = ┘                          │
                           │ ┌◄──────────────────────────────────────┐ │
                           └─┴─┬─ERASE─┬───┬─┬─ZEROS───────────────┬─┴─┘
                               │       └ = ┘ ├─TRIPLE──────────────┤
                               │             └─TRIPLEVERIFY────────┤
                               ├─OLDNAME─┬───┬─<oldname list>──────┤
                               │         └ = ┘                     │
                               └─NOLABEL───────────────────────────┘

<scratch pool>

<scratch pool name>

<oldname list>

<serial list>

 ────┬─── <serial number> ───────────────────────────────────┬───────┤
     │   ┌─◄────────────────────,────────────────────────┐   │
     └─(─┴─┬──────────────────────────────────────────┬──┴─)─┘
           └─ <serial number> ─┬──────────────────────┤
                               └─ - <serial number> ──┘

Explanation

PG CD <unit number list>

You can use this command to erase CD-RW media that is mounted on a CD-RW drive.

Notes:
  • If the CD-RW media was previously written successfully, the OLDNAME form of the command must be used and the specified <name> must match the name the of the previously written CD.

  • If the CD-RW media was previously written unsuccessfully, you cannot specify an OLDNAME.

  • DVD-RW and DVD+RW media are not supported. Use PG CD only with CD-RW media.

PG MT <unit number list>

Purges the volumes mounted on the tape units in the unit number list. That is, the command names the tape units S C R A T C H, a name that prevents any programs from retrieving data from that volume. The PG command requires that the tape is labeled and has a serial number; however, this serial number is not affected by the command. To assign serial numbers to tapes, use the SN (Serial Number) command.

PG MT <unit number list> <scratch pool>

Purges the volume or volumes mounted on the specified tape unit or units and assigns it or them to the designated scratch pool. Refer to the File Attributes Programming Reference Manual for more information.

PG MT <unit number list> UNLOAD

Purges the volume or volumes mounted on the specified tape unit or units and unloads each volume listed from its drive.

Use the UNLOAD option to cause the tape to be unloaded after the tape is purged.

Note: The UNLOAD option is only allowed for PG and PURGE of MT devices. The UNLOAD option is not allowed for the PGL command and results in the following error message:
MTnnn CANNOT USE 'UNLOAD' OPTION WITH LOCK (PGL/SNL)    
Use of the UNLOAD option with devices other than MT results in the following error:
INVALID OPTION SCANNING UNLOAD

PG MT <unit number list> COMPRESSED

Specifies that the system is to write a label that indicates compression was requested. If the tape is mounted on a device that does not support compression, the system displays the following message:

MTnnn UNIT DOES NOT SUPPORT COMPRESSION

For more information about this option, refer to “Considerations for Use.”

PG MT <unit number list> NONCOMPRESSED

Specifies that the system is to write a tape label that indicates compression was not requested.

PGL MT <unit number list>

PGL MT <unit number list> SCRATCHPOOL = <scratch pool name>

PGL MT <unit number list> COMPRESSED

PGL MT <unit number list> NONCOMPRESSED

Have the same effect as the PG command except that they lock the tape units after purging them so that no job can automatically acquire them as scratch tapes. To unlock the units, you must ready them by using the PG (Purge) command. The locked status of a tape unit is not preserved over a halt/load operation.

PG PK <unit number list>

Labels the disk packs identified by the unit numbers as scratch packs that are available only to maintenance programs.

The following attributes are inherited from the current values of the disk unless you specify new values or you specify INIT:

  • CAPACITY

  • GAPS

  • INIT VSS

  • OWNER

  • SERIAL

If the disk packs have OWNER identification, you must verify purge permission through an OK response to an RSVP message.

If you enter a W (Waiting Mix Entries) command, or have previously requested automatic display of current system status information by entering an ADM (Automatic Display Mode) command, the system displays the waiting entries. For example:

<mix number> PK <pack number> IS [<serial number>] , 
  OWNER=<owner>; OK TO RC 

Reply as follows:

<mix number> OK

For labeled disk packs, the process checks their family names. If you specified names with the OLDNAME option, the process checks to see if each disk family name matches one of those names; if not, it terminates with an error message. If you did not use the OLDNAME option, you must verify that you are purging the correct disks by replying as follows for each labeled, nonscratch disk:

<mix number> AX OLDNAME = <family name>

If you enter a W (Waiting Mix Entries) command, or have previously requested automatic display of current system status information by entering an ADM (Automatic Display Mode) command, the system displays the waiting entries. For example:

<mix number> PK <pack number> IS : SERIAL=[<serial number>]
  PACKNAME=<pack name>
<mix number> ACCEPT: OLDNAME = <pack name>

Reply as follows:

<mix number> AX OLDNAME = <pack name>

The <pack name> entered is compared with the pack name in the pack label. If there is a mismatch, the task is terminated with the following error message:

PKnn INCORRECT OLDNAME ENTERED - COMMAND NOT DONE

PG PK <unit number list> ERASE = ZEROS

PG PK <unit number list> ERASE = TRIPLE

PG PK <unit number list> ERASE = TRIPLEVERIFY

Erases all but the first 28 sectors of the disks specified in the unit number list by using the specified erase algorithm, and then marks the disks as scratch. The first 28 sectors of the disks contain label information.

The erase algorithms work as follows:

  • ZEROS – The system writes binary zeros to the disk.

  • TRIPLE – The system writes a random character to the disk and then writes the complement of that random character to the disk. Finally, the system writes another random character to the disk.

  • TRIPLEVERIFY – The system writes a random character to the disk and then writes the complement of that random character to the disk. The system then writes another random character to the disk. Finally, the system reads the disk to check the random character.

PG PK <unit number list> OLDNAME = <oldname list>

Labels the disks identified by the unit number list as scratch disks after checking that the old names of the disk match one of the names in the oldname list.

PG PK <unit number> OWNER = <name>

Labels the disk pack identified by the unit as a scratch pack and sets the OWNER identification to the specified name.

PG PK <unit number list> SERIAL = <serial number list>

Labels the disks identified by the unit number list as scratch disks and gives them the serial numbers specified in the serial number list. Each serial number in the list must be in the range from 1 through 999999. If any of the serial numbers are left out (if there is a double comma or if there are fewer serial numbers than unit numbers), the PG process leaves the serial number of the corresponding disks as they are.

PG PK <unit number list> INIT VSS = NATIVE

PG PK <unit number list> INIT VSS = VSS1

PG PK <unit number list> INIT VSS = VSS2

PG PK <unit number list> INIT VSS = VSS3

Initializes the disks identified by the unit number list in the format specified by the VSS option and marks the disks as scratch.

Notes:
  • NATIVE is valid only for emulated disk units.

  • VSS1 is valid only for 512-byte/sector MCP physical disk units.

  • VSS2 is valid for both 512-byte/sector MCP physical disk units and emulated disk units.

  • VSS3 is valid for both 4096-byte/sector MCP physical disk units and emulated disk units.

The initialization process clears the disk serial number and family name. See the INITIALIZE (Initialize Disk) command for more information. If you do not specify the SERIAL = <serial number list> option in the command, then the system marks the disk as unlabelled; and if you specified more than one unit number, the system only processes the first disk.

PG PK <unit number list> NOLABEL

Erases the first 28 sectors of the disk specified in the unit number list with binary zeros. When ERASE is also specified, all sectors are erased using the algorithm specified. The first 28 sectors of the disk are erased after the rest of the disk is erased.

Examples

Example 1

This example shows a command that purges a tape:

PG MT 66
  MT 66 WILL BE PURGED

Example 2

This example shows a command that purges a tape and assigns it to a scratch pool named ACCOUNTING:

PG MT 55 SCRATCHPOOL = ACCOUNTING
  MT 55 WILL BE PURGED

Example 3

This example shows a command that purges a tape on a compression-capable device and writes a label that indicates compression was requested:

PG MT 55 COMPRESSED
  MT 55 WILL BE PURGED COMPRESSED

Example 4

This example shows a command that purges a tape and writes a label that indicates compression was not requested:

PG MT 55 NONCOMPRESSED
  MT 55 WILL BE PURGED NONCOMPRESSED

Example 5

This example purges a labeled disk pack:

PG PK 47 OLDNAME = DMSIITEST
PK 47 WILL BE PURGED

After you have purged the disk pack, you can enter a PER (Peripheral Status) command to verify the results:

PER PK 47
  ----------------------PK STATUS --------------------
  44*B      [000444] #1 PACK (10)
  45*B      [380003] #1 DISK (94)
  47*B      [380047:000000] #1 S C R A T C H

Example 6

This example purges disks 80, 81, 836, and 837. Disks 80 and 81 have the name TEST. Disks 836 and 837 have the name ALPHA. Disk 81 receives a new serial number: 818181. Disk 836 receives the new serial number 836836.

PG PK 80-81, 836-837 OLDNAME = (ALPHA, TEST)
                        SERIAL = (,818181, 836836)

Example 7

This example initializes disks 100 through 107 in VSS1 format, gives them the serial numbers 555100 through 555107, and marks them as scratch disks in use:

PG PK 100-107 INIT VSS = VSS1 SERIAL = (555100-555107)

Example 8

This example erases disk 86 with the three-pass erase algorithm and then marks the disk as a scratch disk.

PG PK 86 OLDNAME = DATAPACK  ERASE = TRIPLE

Considerations for Use

CONFIRM PURGE Message for Locked Files

If the first file written to a tape has the LOCKEDFILE attribute set to TRUE, when you try to purge that tape, the system displays the following message before it performs the purge operation:

MT nn CONFIRM PURGE <tape name> [<serialno>] OK OR DS

If you respond to this message by entering <mix number> OK, the tape is purged. To cancel the purge operation, enter DS.

A purged pack can no longer be labeled. Once a pack has been purged, it must be reconfigured with the RC (Reconfigure Disk) command prior to its being allowed online.

LIBMAINTDIR Tape Directory Disk Files and Associated Disk Files

If you try to purge a library maintenance tape for which a LIBMAINTDIR disk file (or associated disk file) resides on the DL LIBMAINTDIR disk family, the system displays the following message and RSVP message and then waits for your response:

MT<unit number> THIS TAPE VOLUME HAS A RESIDENT 'LIBMAINTDIR'
TAPE DIRECTORY DISK FILE: <file name>
MT<unit number> TO LEAVE THIS TAPE AS IS REPLY 'DS'; TO PURGE
IT REMOVE THE 'LIBMAINTDIR' FILE OR REPLY 'OK'

Decide if you want the system to remove the LIBMAINTDIR file or associated disk file and continue to purge the tape. To locate the LIBMAINTDIR file or associated disk file, use the OL MT <unit number> command to find the name of the LIBMAINTDIR disk file or associated disk file. If you respond to this message by entering <mix number> OK, the system removes the LIBMAINTDIR disk file or associated disk file and purges the tape. To cancel the purge operation, enter <mix number> DS.

Scratch Pool Considerations

Unlabeled tapes are treated as though they were from the default (no name) pool.

Expired tapes are treated as though they were scratch tapes from the pool specified in the nonscratch label.

Tape Compression

If you enter a simple PG command, which does not include a compression keyword, to a device that does not support compression, and the original label indicates compression was requested, the system processes the command with the following results:

  • The system writes the label to tape as if you had specified the NONCOMPRESSED option.

  • The system issues the following messages to serve as an operator warning:

     MT<unit number> [<serial number>] UNABLE TO SET COMPRESSION
     MT<unit number> [<serial number>] PURGED

If you do not specify a compression keyword and the drive is compression-capable, the system retains the original compression specification.

Disk Packs and Labels

For disk packs, the PG command does not actually purge any data from the unit. Instead, the PG command simply changes the name to S C R A T C H, which is a special name that cannot be used by programs.

Once a pack has been purged, it must be reconfigured with the RC (Reconfigure Disk) command prior to its being allowed online.

The PG command does not remove the family index number. This number continues to appear in PER PK command displays. For example, if a pack is the second member of a disk family, and you purge that pack, the resulting PER PK display includes the family index #2, as in the following example:

PK 526*C   L  [000526:000000: NO BP] #2 S C R A T C H

Online Mirrored Packs

The PG command is not valid for use with online mirrored packs. Before using the PG command, you must release the pack with the MIRROR RELEASE command. The PG command is valid for closed mirrored packs, and packs assigned to the spare disk pool for the Mirrored Disk Pooling Facility (MDPF), provided you respond OK to the RSVP message that appears.

Bad Disk Information

The PG command deletes any bad disk information by removing the BADDISK files.

Spare Disk Pool Considerations

If you attempt to purge a disk assigned as a free spare in the spare disk pool for the Mirrored Disk Pooling Facility (MDPF), the following RSVP message appears:

 PK<pack number> IS CURRENTLY DESIGNATED AS A SPARE
 FOR MIRROR REPLACEMENT. ENTER OK TO CONTINUE WITH
 PG,DS TO QUIT. OK WILL REMOVE THE PACK FROM THE
 SPARE DISK POOL.
 REPLY: OK,DS

If you respond OK, the pack is purged, the pack label remains SCRATCH, a system message states that the disk is no longer a free spare disk in the spare disk pool, and a status change message is issued. The status change message is defined in the MCP System Interfaces Programming Reference Manual. The system message is

PK <unit number> UNIT PG'ED AND REMOVED FROM THE SPARE DISK POOL

If you respond DS, the command is rejected and a system message states that the pack remains a free spare disk in the spare disk pool. The message is

PK<pack number> IS A SPARE FOR MIRROR REPLACEMENT,
RC/LB/PG NOT DONE

When a disk previously assigned to the spare disk pool has been moved to a system that supports MDPF but does not have MDPF installed, if you attempt to purge that disk, the following RSVP message appears:

PK<pack number> IS CURRENTLY DESIGNATED AS A SPARE
FOR MIRROR REPLACEMENT, A FEATURE NOT ENABLED ON THIS
MACHINE. ENTER OK TO CONTINUE WITH PG, DS TO QUIT.
OK WILL REMOVE THE PACK FROM THE SPARE DISK POOL.
ACCEPT: OK, DS

If you respond OK, the pack is purged, the pack label remains SCRATCH, a system message states that the disk is no longer a free spare disk in the spare disk pool, and a status change message is issued. The status change message is defined in the MCP System Interfaces Programming Reference Manual.

If you respond DS, the command is rejected and a system message states that the pack remains a free spare disk in the spare disk pool.

When a disk previously assigned to the spare disk pool has been moved to a system that does not support MDPF, the PG command clears the FREE SPARE attribute from the pack label with no operator notification.