The INIT statement writes volume labels to magnet tapes or magnet tape cartridges. The volume type and either the VSN to be written or the initialization mode in which only tape marks are written are specified.
The user can also choose to define:
the number of volumes to be listed
a particular volume
a specific device
the code for the labels (ISO7 or EBCDIC)
the way in which the volume is handled after initialization
Before writing new labels, the INIT routine checks for existing labels. If labels can be read, they are output so that they can be checked. If OPTION CONS is set, the list is output to the console. If this option is not set, the list is output to SYSOUT.
Format
INIT |
[no] voltyp { ,VSN={ vsn / (vsn1,vsn2,...vsn16) / (initval) / *} [,OWN={ name / * }][,ZERO][,ISO7] / ,WTM } [,UNIT = mn] [,NEW / CHECK = vsn] [,REW / RUN] [,ERASE] [,FORMAT] |
Operands
no
Number of volumes to be listed with this statement.
Permissible values: 1, 2, ..., 16.
The operands “no” and “voltyp” must be separated by at least one blank.
voltyp
Defines the volume type. Defines the volume type, and thus also the recording mode.
You will find the volume types supported in the current in BS2000 version in the “System Installation” manual [7 (Related publications)]. For compatibility reasons, INIT also supports a few more volume types. You can ascertain the volume types accepted by INIT by means of the HELP statement (see "HELP - Outline description of INIT statements").
There is no default value for this operand; the value must always be specified by the user.
INIT 3 TAPE-C4,VSN=(VSN01,VSN02,VSN03),UNIT=A1
Volume serial number which is to be entered in the VOL1 label (no default).If two or more volumes are to be initialized with a single statement, the user must specify either a corresponding number of VSNs or an initial value.
VSN=vsn
Single volume serial number.
A single volume is to be initialized. Consequently, the “no” operand must be either 1 or not specified.
Permissible values: Max. 6 characters (A..Z, 0..9, #,$,@).
The special characters #, $, @ are permitted by INIT but must not be used in labels conforming to DIN 66029, DIN 66003. If OPTION DIN is active, these special characters are rejected.
VSN=(vsn1,vsn2,...,vsn16)
Two or more volumes are to be initialized with the specified VSNs. The number of VSNs must tally with the value specified for the “no” operand.
Permissible values: each value must be a valid VSN (see above).
VSN=(initval)
Two or more volumes, beginning with the VSN initval, are to be initialized. After every successful initialization, the VSN is automatically incremented by 1. The number of volumes must be specified in the “no” operand.
Permissible values:
initval must be a valid VSN and must contain at least one decimal digit. The number specified as the initial VSN is read from left to right. The initial value of the VSN to be generated is the first sequence of decimal digits found. If initval contains more than one sequence of digits separated by other characters (e.g. letters), only the string of digits furthest left is used as the initial value.
The number of digits in the initial value identified in this way must also be able to accept the highest VSN; if it cannot, the statement is rejected.
Examples
INIT 5 TAPE-C4,VSN=(A12B12)
The statement initializes volumes with the VSNs A12B12, A13B12, A14B12, A15B12 and A16B12.
INIT 16 TAPE-C4,VSN=(A1B)
The statement is rejected, because only single-digit decimal numbers can be formed.
VSN=*
The existing VSN is to be used.
If the volume does not have a readable VOL1 label with a valid VSN, a message to this effect is output and no new labels are written.
OWN
Valid only if WTM is not specified. Name of the owner to be entered in the VOL1 label.
OWN=name
Name to be entered in the VOL1 label.
Permissible values: Max. 8 characters (A...Z, 0...9, #, $, @, ., -) Default
value:Blanks are entered if nothing is specified.
OWN=*
If an owner’s name already exists in the VOL1 label, it is to be transferred to the new VOL1 label. If the volume does not have a legible VOL1 label with a valid owner’s name (blanks are also a valid name), a message to this effect is output and no new labels are written.
ZERO
In the VOL1 label (byte 11), the printable character 0 is entered as the access flag. If this operand is not specified, a blank is entered as the access flag.
ISO7
The labels are to be written in ISO 7-bit code.
WTM
Write two tape marks at the logical beginning of the volume. No labels are written.
UNIT=mn
Mnemonic device name for seizure of a particular device. A volume is to be mounted on the specified device.
Unsuitable devices, i.e. devices that cannot process volumes of the specified type, are rejected.
CHECK=vsn
Specifies a check volume serial number.
A volume is not processed unless the VSN in the VOL1 label tallies with the specified VSN. This mechanism prevents the wrong volume from being overwritten by mistake.
If the CHECK operand is specified and the requested volume is already mounted on the correct device, no MOUNT request is sent to the operator and the volume is initialized immediately.
Permissible values: Max. 6 characters (A..Z, 0..9, #,$,@).
The special characters #, $, @ are permitted by INIT but must not be used in labels conforming to DIN 66029, DIN 66003. If OPTION DIN is active, these special characters are rejected.
NEW
The effect of this operand depends on whether the volume already contains data or if it has been recognized as empty by the tape monitor of the operating system.
If the volume is empty, both the read-before-write check of the labels and the OVERWRITE query are suppressed.
If a volume already contains data, the read-before-write check of the labels is implemented without error handling.
If the NEW operand is not specified, INIT always attempts to read existing labels. This incorporates full error handling if the tape monitor of BS2000 has not already recognized the tape as empty during mounting. For safety’s sake, INIT attempts to read without error handling in this event.
REW
Specifies that the magnetic tape or magnetic tape cartridge is to be rewound after listing but not unloaded. If a single volume is listed, REW is set by default.
RUN
Specifies that the magnetic tape or magnetic tape cartridge is to be rewound and unloaded after listing. If two or more volumes are to be listed with a single statement (operand
no=2..16), RUN is set by default.
ERASE
All the data on the volume is to be erased before the labels are updated.
If this operand is not specified, only the new labels are written at the beginning of the volume and the logical end of volume is marked by means of two tape marks. The original contents of the volume behind these marks, however, is retained, and under certain circumstances it may still be readable (see note under “Security functions” on "INIT Initializing (emulated) magnetic tapes").
If INIT can read a valid VOL1 label, this label is retained after erasure. If not, everything from the beginning of the volume onward is erased.
FORMAT
The volume is formatted, if the volume type and the device permit this. If not, an explanatory message is displayed, the operand is ignored and the initialization procedure continues.
It may take several minutes to format a volume.
Examples for writing labels
Initializing a volume (specifying minimum parameters):
INIT TAPE-C4,VSN=VSN001
Initializing
three volumes
with one statement
with explicitly specified VSNs
with special characters in the VSNs:
INIT 3 TAPE-C4,VSN=(VSN#00,VSN$00,VSN@00)
Initializing
8 volumes
with one statement
with consecutive VSNs:
INIT 8 TAPE-C4,VSN=(VSN001)
The VSNs assigned to the volumes are VSN001, VSN002, ...,VSN008.
Initializing
a virgin volume
on a specified device (with mnemonic name M1):
INIT TAPE-C4,VSN=MBK01,UNIT=M1,NEW
Initializing
a particular volume (with volume serial number VSN001)
on a particular device (with mnemonic name T1)
in ISO7 bit code
unloading it after initialization
with entry of an owner identifier
with data security erase
with entry of “0” as access code:
INIT TAPE-C4,VSN=TAPE01,CHECK=VSN001,UNIT=T1,ISO7,RUN,-
OWN=RZ#A0001,ERASE,ZERO
Examples for writing two tape marks
Writing two tape marks at the beginning of a volume, specifying minimum parameters:
INIT TAPE-C4,WTM
Writing two tape marks at the start of
three virgin volumes
with one statement:
INIT 3 TAPE-C4,WTM,NEW
Writing two tape marks at the start of
a particular volume
on a particular device (with mnemonic name M1)
and with data security erase:
INIT TAPE-C4,WTM,UNIT=M1,ERASE
Writing two tape marks at the start of
a particular volume (with volume serial number VSN001)
on a particular device (with mnemonic name M1)
with data security erase
and remove after initialization:
INIT TAPE-C4,WTM,UNIT=M1,CHECK=VSN001,RUN