INZDKT (Initialize Diskette)
Purpose
The Initialize Diskette (INZDKT) command initializes a diskette for use. This command writes identification information on a diskette and sets the format. Initializing a diskette includes the following:
- Checking for active files that should not be cleared.
- Testing each track for physical defects on the recording surface. A diskette is unusable if more than two defective cylinders are found, if cylinder 0 is defective, or if the track identifier of a defective track cannot be read.
- Formatting each track to a specified sector size (128, 256, 512 or 1024 bytes) and recording density (single density or double density). A diskette's format determines what the diskette may be used for in later processing. This is explained more fully in the FMT and SCTSIZ parameter.
- Defining a single (expired) file covering the entire diskette. The file is identified as DATA.
IBM-supplied diskettes are initialized before they are shipped to a customer. A diskette should be reinitialized when:
- Its format is changed.
- The sequence of the records on the diskette is changed (they can only be sequential).
- A defect has occurred in one or two tracks.
- The diskette has been exposed to a strong magnetic field.
One INZDKT command can initialize only one diskette at a time.
Note: When initializing diskettes with labels that are not IBM standard labels, specify CHECK(*NO).
Required Parameters
- DEV
- Specifies the name of the device in which the diskette being initialized is placed.
Optional Parameters
- NEWVOL
- Specifies the volume identifier for the diskette being initialized.
*NONE: No volume identifier is specified; only the system date is written in the volume identifier field of the volume label.
volume-identifier: Specify up to 6 characters for the volume identifier to identify the diskette being initialized; any combination of alphabetic characters (except $, #, or @) or numeric characters can be used.
- NEWOWNID
- Specifies the identification of the new diskette owner to write in the volume label. Any combination of alphabetic characters (except $, #, or @) or numeric characters can be used.
*BLANK: Text is not specified.
owner-identifier: Specify up to 14 uppercase alphabetic or numeric characters that identify the new owner of the diskette. Even if the value is enclosed in apostrophes, no lowercase letters, embedded blanks, or special characters can be used. If fewer than 14 characters are specified, the field is left-justified and padded on the right with blanks.
- FMT
- Specifies the format to use to initialize the diskette. Either *DATA, *DATA2, 1, 2, or 2D can be specified if the diskette will contain data files that are in the basic, H, I, or System/36 environment exchange formats. The basic exchange format has a set of requirements that ensures that a diskette can be exchanged between systems that are capable of using both the IBM diskette types 1 or 2. *SAVRST (type E general data exchange) must be specified if the diskette is used in the iSeries 400 or System/38 save and restore operations; that is, if their data files will contain saved objects. *SAVRST is also a valid format for the System/36 save and restore operations, and it is the preferred format to use.
*DATA: A one- or two-sided diskette is formatted with single-density recording.
1: A one-sided diskette is formatted with single-density recording.
2: A two-sided diskette is formatted with single-density recording.
2D: A two-sided diskette is formatted with double-density recording.
*DATA2: A two-sided diskette is formatted with double-density recording (as if 2D is specified).
*SAVRST: A two-sided diskette is formatted with double-density recording. This format is required if the diskette is used in a save and restore operation.
Notes
- Because *DATA2, *SAVRST, and 2D specify that the diskette is used for double-density recording, it is recommended that a type 2D diskette be used, rather than a type 2. A type 2D diskette is made for double-density recording, whereas a type 2 is made for single-density recording and is more prone to media errors if used for double-density recording.
- If FMT(*SAVRST) is specified, CODE(*ASCII) cannot be specified.
- SCTSIZ
- Specifies the number of bytes per sector with which each track is initialized.
*STD: A standard sector size, based on the value of the FMT parameter, is used. Such as the following:
FMT SCTSIZ
(*STD)*DATA 128 1 128 2 128 2D 256 *DATA2 256 *SAVRST 256 128: Each track is initialized with 128 bytes per sector.
256: Each track is initialized with 256 bytes per sector.
512: Each track is initialized with 512 bytes per sector.
1024: Each track is initialized with 1024 bytes per sector.
Table 1, at the end of this command description, shows the valid sector sizes.
Format for 8-inch diskette.
Table 2, at the end of this command description, shows the format for 5.25-inch diskette
The following chart shows which exchange types can be used for each sector size.
Exchange
Type128 256 512 1024 Basic X H X1 I X X X X SAVRST X S/36-S/R X X X X
- 1
- H is used only as the exchange type if the diskette is initialized with double-density recording (FMT(*DATA2) or FMT(2D)).
- CHECK
- Specifies whether a check is made for active files (files having an expiration date greater than the system date).
*YES: A check is performed on files whose labels are in cylinder 0 only. File labels in an extended file label area are not checked. If any active files are found, an operator message is sent. The operator can continue initialization (active files are destroyed), or end the initialization of that diskette.
*NO: Diskette initialization proceeds without a check for active files.
- CODE
- Specifies the character code used. The code can be either extended binary-coded decimal interchange code (*EBCDIC) or the American National Standard Code for Information Interchange (*ASCII).
*EBCDIC: The volume label is written in EBCDIC and is an IBM standard label; subsequent data must also be written in EBCDIC.
*ASCII: The volume label is written in ASCII and is an IBM standard label in the same format as the EBCDIC label; subsequent data must also be written in ASCII. If FMT(*SAVRST) is specified, *ASCII cannot be specified.
SCTSIZ *DATA 1 2 2D *DATA2 *SAVRST *STD X X X X X X 128 X X X 256 X X X X X 512 X X X X X 1024 X X X Table 2. Format for 5.25 Inch Diskette
SCTSIZ *DATA 1 2 2D *DATA2 *SAVRST *STD X X X 256 X X 512 X X 1024 X X X Examples for INZDKT
Example 1: Initializing a Diskette
INZDKT DEV(DKT1) NEWVOL(ORIGIN) NEWOWNID(DEPT504)This command initializes the diskette device DKT1. The diskette is checked for active files (CHECK(*YES) is assumed). The diskette is formatted for basic data exchange files (FMT(*DATA) is assumed). The volume label has ORIGIN written in the volume identifier field and DEPT504 written in the owner identifier field.
Example 2: Initializing a Diskette to the Save and Restore Format
INZDKT DEV(DKT2) NEWVOL(SAVE) NEWOWNID(DON) FMT(*SAVRST) CHECK(*NO)This command initializes the diskette in device DKT2 to the save and restore format. The diskette is initialized with the NEWVOL parameter of SAVE. The owner identifier field has DON written into it.
Error messages for INZDKT
*ESCAPE Messages
- CPF6156
- Cancel reply received for message &6.
- CPF6716
- Device &1 not a diskette device.
- CPF6717
- Initialize diskette ended; previous errors occurred.
- CPF6718
- Cannot allocate device &1.
- CPF6757
- Owner identifier &1 contains wrong characters.
- CPF6758
- Volume identifier &1 contains wrong characters.
- CPF6779
- Format (FMT) specified for diskette in device &1 not valid.
- CPF9814
- Device &1 not found.
- CPF9825
- Not authorized to device &1.