EasyMT is a program product that uses a variable-length blocked tape such as in E.2 Creating an input file on variable-length blocked tape and provides tape management by means of volume names and file names.
/dev/dat/vdat010 (internal DAT),
/dev/cgmt/vcgmt160 (cartridge magnetic tape),
/dev/omt/vomt055 (open reel magnetic tape)
To install a variable-length blocked device, the file name must first be created.
The super user then executes the following command:
/etc/mknod /dev/dat/vdat010 c 119 0x010001 /bin/chmod 0666 /dev/dat/vdat010 |
EasyMT has the following header formats:
Symbol | Description |
---|---|
EMTVOL_EL | EasyMT label |
EMTVOL_SL | Standard label |
EMTVOL_JL | JIS code label |
EMTVOL_NL | No label |
The header is read first by the database load utility (pdload), and then items in a recognizable format are read. An error results if the format is not recognizable or there is no label.
EasyMT has the following record formats:
Symbol | Description | Block specification | Record specification | Label specification |
---|---|---|---|---|
F | Fixed-length non-blocked records | N | F | SL or EL |
FB | Fixed-length blocked records | B | ||
V | Variable-length non-blocked records | N | V | |
VB | Variable-length blocked records | B | ||
U | Unspecified-length records | N | U |
The database load utility (pdload) can support all the above formats. However, the maximum of the set containing the block length, record length, or data length is as follows:
Model where file is created | Maximum value |
---|---|
3050RX Group | 32KB (32,768 bytes) |
3500 Series | |
HITAC-M Series | 32KB-8 (32,760 bytes) |
Because the length of one record in the F and FB record formats is fixed, only FIX tables and tables in which the column structures of all rows are fixed-length and which are input as a binary file can use these formats. If the input is an ASCII file, these formats can be used only when all data lengths are the same.
The database load utility (pdload) can handle the following two types of files as input files:
Binary-format files have the record formats shown as follows.
F (Fixed-length non-blocked records)
FB (Fixed-length blocked records)
One row is specified as the data length (record length).
F or FB can be specified only for FIX tables or tables in which the column structures of all rows are fixed in length.
V (Variable-length non-blocked records)
VB (Variable-length blocked records)
U (Unspecified-length records)
DAT-format files have one record per row (up to NL characters). The normal record formats are V, VB, or U. The F and FB formats can be used only if the data lengths are all the same.
The data length includes NL (LF: 0x0a, '\n'). Records that do not include NL result in an error.
The maximum and minimum values for the data length, record length, and block length above are as follows:
Record Format | Data length | Record length | Block length | |||
---|---|---|---|---|---|---|
min | max | min | max | min | max | |
F/FB | 1 | 32,768 | 1 | 32,768 | 1 | 32,768 |
V/VB | 1 | 32,760 | 5 | 32,764 | 9 | 32,768 |
U | 1 | 32,768 | -- | -- | 1 | 32,768 |
Record Format | Data length | Record length | Block length | |||
---|---|---|---|---|---|---|
min | max | min | max | min | max | |
F/FB | 1 | 32,760 | 1 | 32,760 | 1 | 32,760 |
V/VB | 1 | 32,752 | 5 | 32,756 | 9 | 32,760 |
U | 1 | 32,760 | -- | -- | 1 | 32,760 |
Following is an example of creating an input file on the 3050RX Group or the 3500 Series for the database load utility (pdload) using the functions provided by EasyMT.
The EasyMT definition is specified in the MT attributes definition file.
The MT attributes definition file is specified in the first argument (argv[1]).
Specify error processing as required.
#include <stdio.h> |
In the definition file, a blank immediately following an equals sign (=) means that the corresponding value is omitted.
The following entries in the MT attributes definition file correspond to pdload control information file source statement entries:
MT Attributes definition file entry | pdload control information file source statement entry | Maximum number of characters |
---|---|---|
volname= | vol= | 6 |
filename= | file= | 17# |
An example definition for creating the above file is as follows:
#/*------------------------------------------------------- |