The SN (Serial Number) command purges and assigns serial numbers to tape volumes and specifies their scratch pool and whether they are to be compressed.
The tape drive unit where the tape volume is mounted must be ready, not in use, and write-enabled.
If you created the tape with the LOCKEDFILE file attribute set to TRUE, 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 using <mix number> OK, the tape is purged. To cancel the purge operation, enter DS.
If you try to purge a library maintenance tape for which there is a LIBMAINTDIR disk file resident 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 and continue to purge the tape or not. To locate the LIBMAINTDIR file, use the OL MT <unit number> system command to find the name of the LIBMAINTDIR disk file. If you respond to this message by using <mix number> OK, the system removes the LIBMAINTDIR file and purges the tape. To cancel the purge operation, enter <mix number> DS.
Syntax
─┬─SN──┬──MT──<SN option list>─┬───────────────────────────────┬──────────┤ └─SNL─┘ │ ┌◄──────────────────────────┐ │ └─┴┬─/1\───<scratch pool>───┬─┴─┘ ├─/1\───UNLOAD───────────┤ └─/1\─┬─COMPRESSED─────┬─┘ └─NONCOMPRESSED──┘
<SN option list>

<scratch pool>
── POOL ─── SCRATCHPOOL ─┬─────┬─┬─<scratch pool name>─┬───────┤ └─ = ─┘ └─ . ─────────────────┘
<scratch pool name>

Explanation
SN MT <SN option list>
Purges and assigns a serial number to the tapes mounted on the designated tape units. The serial number consists of up to six alphanumeric characters. If a number is used, it is right-justified with leading zeros added. Any serial number containing alphabetic characters or any quoted alphanumeric string is left-justified with trailing blanks.
If you attempt to assign a serial number to a locked tape, the following response appears:
UNIT LOCKED
SN MT <SN option list> <scratch pool>
Purges the tape and assigns the specified serial number and scratch pool name. Refer to the File Attributes Programming Reference Manual for more information.
SN MT <SN option list> UNLOAD
Purges the volume or volumes mounted on the specified tape unit or units with the specified serial number or numbers and unloads each volume listed from its respective drive.
Use the UNLOAD option to cause the tape to be unloaded after the tape is purged with the specified serial number.
Note: | The UNLOAD option is only allowed for SN and is not allowed
for the SNL command and results in the following error message:MTnnn CANNOT USE 'UNLOAD' OPTION WITH LOCK (PGL/SNL) |
SN MT <SN option list> COMPRESSED
If the tape is mounted on a drive that supports compression, purges the tape, assigns the specified serial number, and marks the label to indicate that compression was requested. If the tape is mounted on a device that does not support compression, the system does not perform the purge request and displays the following message:
MTnnn UNIT DOES NOT SUPPORT COMPRESSION
For more information about this option, refer to “Considerations for Use” later in this topic.
SN MT <SN option list> NONCOMPRESSED
Purges the tape mounted on the designated tape unit, assigns a serial number to the tape, and marks the tape label to indicate that compression was not requested.
SNL MT <SN option list>
SNL MT <SN option list> <scratch pool>
SNL MT <SN option list> COMPRESSED
SNL MT <SN option list> NONCOMPRESSED
Purge and lock the specified tape unit, so that no job can automatically acquire the tapes as scratch tapes. You can assign the tape to a specific scratch pool and designate that the tape be either compressed or noncompressed. To unlock the unit, you ready the units with the RY (Ready) command. The locked status of a tape drive is not preserved over a halt/load of the system.
Examples
Example 1
In this example, the tape on unit 115 is purged and is assigned the serial number X232.
SN MT 115 X232
MT 115 WILL BE SN-ED
PER MT
115*L [X232 ] LTO #1:0 S C R A T C H
Example 2
In this example, the tape on unit 116 is purged and is assigned a serial number of 000565. The tape is then locked.
SNL MT116 565
PER MT
116*L [000565] LTO LOCKED
Example 3
In this example, the tape on unit 116 is purged, assigned a serial number of 000565, and assigned to a scratch pool named XYZ.
SN MT116 565 POOL = XYZ MT 116 WILL BE SN-ED
Example 4
In this example, the tape on unit 55 is purged, assigned a serial number of 000444, and has a tape label written to indicate that compression was requested.
SN MT55 444 COMPRESSED MT 55 WILL BE SN-ED COMPRESSED
Example 5
In this example, the tape on unit 45 is purged, assigned a serial number of 000875, and has a tape label written to indicate that compression was not requested.
SN MT45 875 NONCOMPRESSED MT 45 WILL BE SN-ED NONCOMPRESSED
Example 6
In this example, the tape on unit 55 is purged, assigned a serial number of 000334, assigned to a scratch pool named ABC, and has a tape label written to indicate that compression was not requested.
SN MT55 334 NONCOMPRESSED SCRATCHPOOL = ABC MT 55 WILL BE SN-ED NONCOMPRESSED
Example 7
In this example, the tape on unit 118 is purged, assigned a serial number of 24680, has a tape label written to indicate that compression was requested and the tape is unloaded from the tape drive.
SN MT 118 24680 COMPRESSED UNLOAD MT 118 WILL BE SN-ED COMPRESSED & UNLOADED
Considerations for Use
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 SN (Serial Number) command, which does not include a compression keyword, to a device that does not support compression, and the original label on the tape indicates compression 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 on the tape. If the tape is unlabeled, the system purges the tape with compression.