RLTABLEGEN Commands

The following commands can be used as input to RLTABLEGEN:

<rltablegen commands>

  ┌◄──────────────────────────┐
──┴─┬─<id command>──────────┬─┴────────────────────────────────────────┤
    ├─<recognition command>─┤
    ├─<field command>───────┤
    └─<record command>──────┘

ID Command

The ID command, which starts the ID division, identifies the character code and the recording mode to be used for the LABEL description.

<id command>

                   ┌◄──────────────────────────┐
── IDENTIFICATION ─┴─┬─<comment>─────────────┬─┴─ . ──────────────────
                     ├─ MODE ── = ── EBCDIC ─┤
                     ├─ NSUSASI ─────────────┤
                     └─ ( ─┬─ ALL ─┬─ ) ─────┘
                           └─ MT ──┘

Explanation

<comment>

Specifies an EBCDIC character string. It is used to document the program.

EBCDIC

Specifies that the EBCDIC mode is to be used for a tape label.

NSUSASI

Required for nonstandard ANSI tapes in which HDR2 and EOF2 LABEL records are omitted. (The first 4 characters of the second file header are HDR2, and the first 4 characters of the second end-of-file (EOF) LABEL are EOF2.) Most forms of the IBM disk operating systems (DOS) omit these LABEL records. If RLTABLEGEN is used for such tapes and this attribute is not specified, the tape file closes with a LABEL error because the MCP expects to find the nonpresent EOF2 record.

ALL MT

Identifies a tape label that can be used on any magnetic tape.

Example 1

The following ID command identifies the LABEL description as EBCDIC for a magnetic tape:

ID MODE = EBCDIC FOR (MT) TAPES. 

Example 2

The following ID command identifies the nonstandard USASI LABEL description for a magnetic tape as EBCDIC:

ID FOR NSUSASI LABELS (ALL) MODE = EBCDIC.

RECOGNITION Command

The RECOGNITION command, which belongs to the ID division, follows the ID command. It is used to describe the fields used to recognize this label. This command can appear as often as necessary.

<recognition command>

── @ ──<column>─┬─ = ────────┬─┬─  '<string>' ──┬─. ──────────────────┤
                └─ NOT ── = ─┘ ├─ 8'<string>' ──┤
                               ├─  "<string>"  ─┤
                               └─ 8"<string>"  ─┘

Explanation

<column>

An integer from 01 to 80 that specifies the column where the first character of the string appears.

'<string>' "<string>"

Specifies a string of characters that fills the designated columns. These characters can include any alphanumeric or graphic character except the double quotation mark ("). However, if "<string>" contains an apostrophe ('), it must be enclosed in double quotations marks.

8'<string>' 8"<string>"

Specifies a string of 8-bit (EBCDIC) characters. These characters can include any alphanumeric or graphic character except the double quotation mark ("). If 8"<string>" contains an apostrophe ('), it must be enclosed in double quotation marks.

Examples

The following recognition command indicates VOL1 should be found in columns 1 through 4 of the tape label:

@ 01 = "VOL1".

The following recognition command indicates that a blank should be found in column 29 of the tape label:

@ 29 = " ".

FIELD Command

The FIELD command starts the FIELD division, which contains descriptions of the various fields found in the tape label. This command also denotes the beginning of the LABEL description and marks the end of the RECOGNITION command and the ID division.

<field command>

── FIELDS ─┬───────────┬─ . ───────────────────────────────────────────┤
           └─<comment>─┘

Explanation

<comment>

Specifies an EBCDIC character string.

Example

In the following example, the FIELD division is specified:

FIELDS BEGINNING OF LABEL DESCRIPTION.

RECORD Command

The RECORD command describes the various fields found in the label. Each field is used to store file attribute information. The file attributes BLOCKSIZE, CREATIONDATE, CYCLE, DENSITY, FILESECTION, MAXRECSIZE, MFID, FID, SERIALNO, MINRECSIZE, PARITY, UNITS, and VERSION are all discussed at length in the File Attributes Programming Reference Manual.

The RECORD command, which belongs to the FIELD division, must follow the FIELD command. Label fields can be specified as bit, string, or number fields. Each field is used to store file attribute information.

Each attribute value is of an assumed type. The character type (EBCDIC) is assumed to be the type specified by the MODE clause in the ID statement. Attributes of STRING type can be requalified to override the expressed mode but cannot be changed to type BINARY or NUMBER.

NUMBER or BINARY attributes can be requalified to any mode or type except STRING.

<record command>

  ┌◄───────────────────────────────────────────────────────────────┐
──┴─┬─ RECORD ── ; ──<record number>─────────────────────────────┬─┴───►
    └─<attribute field>── @ ──<column>── FOR ──<length>─┬────────┤
                                                        └─<mode>─┘
►─. ──────────────────────────────────────────────────────────────────┤

<attribute field>

──┬─ BLOCKSIZE ────┬───────────────────────────────────────────────────┤
  ├─ CREATIONDATE ─┤
  ├─ CYCLE ────────┤
  ├─ DENSITY ──────┤
  ├─ FID ──────────┤
  ├─ MFID ─────────┤
  ├─ FILESECTION ──┤
  ├─ MAXRECSIZE ───┤
  ├─ MINRECSIZE ───┤
  ├─ PARITY ───────┤
  ├─ RCDFRMT ──────┤
  ├─ SERIAL ───────┤
  ├─ UNITS ────────┤
  └─ VERSION ──────┘

<mode>

──┬────────────────────────────────┬───────────────────────────────────┤
  └─ ( ─┬──────────┬─ EBCDIC ── ) ─┘
        ├─ STRING ─┤
        ├─ NUMBER ─┤
        └─ BINARY ─┘

Explanation

RECORD; <record number>

Groups attribute fields according to the records in which they appear. Counting within records of columns and lengths begins at 1. Each record number must reference a higher record than the previous one.

<attribute field>

Specifies the file attribute with which the value in the field is associated. The file attributes are explained later in this section.

<column>

An integer from 01 through 80 that represents the starting column location within the current record.

<length>

An integer that represents the length of the field being described.

<mode>

Specifies the mode that is to be used.

EBCDIC

Specifies that EBCDIC mode is to be used. Information is in 8-bit characters.

STRING

Indicates that the attribute field contains a string of characters. Any alphanumeric or graphic character except the double quotation mark (") can be included.

The STRING attributes can be requalified to override the expressed <mode>; however, they cannot be changed to NUMBER or BINARY.

NUMBER

Indicates that the attribute field contains an integer—a digit string of no more than 11 digits.

The value of these attributes can be changed to any mode or type except STRING.

BINARY

Indicates that the attribute field contains a binary number.

The value of these attributes can be changed to any mode or type except STRING.

File Attributes

The following file attributes can be specified with the RECORD command:

BLOCKSIZE

Indicates the block length of the file. BLOCKSIZE is type NUMBER. The value of BLOCKSIZE is assumed to be an integer of no more than 11 digits and is significant only if FILETYPE 7 or 8 is specified when the file is opened.

CREATIONDATE

Returns the date a file was created. CREATIONDATE is type NUMBER. The value of CREATIONDATE is assumed to be an integer of no more than 11 digits and is significant only if FILETYPE 7 or 8 is specified when the file is opened.

CYCLE

Denotes the different generations of a permanent file. CYCLE is used in conjunction with the VERSION attribute to determine the genealogy of a file. CYCLE is type NUMBER. The value of CYCLE is assumed to be an integer of no more than 11 digits and is significant only if FILETYPE 7 or 8 is specified when the file is opened.

DENSITY

Automatically sets the field based on the density of the LABEL records. DENSITY is type BINARY. If this attribute is specified, it must reflect the density in its low-order 2 bits.

FID MFID

FID is the last and MFID is the first identifier in the TITLE of a logical file on a tape containing multiple files. MFID and FID are used in the external name of that physical tape file.

Both FID and MFID are type STRING. The maximum length is 17 characters. Either field is optional. If both fields are missing or if both referenced fields are blank, the tape is labeled “untitled”. All leading and trailing blanks are deleted from the two fields.

FILESECTION

Specifies the ISO, BSI, and ANSI file section number of the first header LABEL record. FILESECTION is type NUMBER. The value of FILESECTION is assumed to be an integer of no more than 11 digits and is significant only if FILETYPE 7 or 8 is specified when the file is opened.

MAXRECSIZE

Specifies the maximum size of records in the logical file. MAXRECSIZE is type NUMBER. The value of MAXRECSIZE is assumed to be an integer of no more than 11 digits and is significant only if FILETYPE 7 or 8 is specified when the file is opened.

MINRECSIZE

Specifies the minimum size of records in the logical file. MINRECSIZE is type NUMBER. The value of MINRECSIZE is assumed to be an integer of no more than 11 digits and is significant only if FILETYPE 7 or 8 is specified when the file is opened.

PARITY

This field is automatically set to the parity of the LABEL records; but if it is specified, the field must be in accordance with the manner in which this LABEL attribute works on MCP/AS standard labels. PARITY is type BINARY. (If the low-order bit of the field is equal to one, standard parity is implied.)

RCDFRMT

Indicates the FILETYPE of the file. RCDFRMT is type BINARY. The low-order 8 bits of the field are assumed to be an EBCDIC letter. The following demonstrates the conversion from EBCDIC letter to FILETYPE value:

Letter

FILETYPE

F

0

D

1

V

2

I

4

Z

6

Any other letter

3

SERIAL

Indicates the SERIALNO value of the file. SERIAL is type STRING. The maximum length of the field is 6 characters. If no field is specified for SERIAL, the SERIALNO is assumed to be all zeros.

UNITS

Indicates whether or not the transfer of data in the file is word- or character-oriented. UNITS is type BINARY.

VERSION

Distinguishes successive iterations of the same generation of a permanent file. VERSION is used in conjunction with the CYCLE attribute. VERSION is type NUMBER. The value of VERSION is assumed to be an integer of no more than 11 digits and is significant only if FILETYPE 7 or 8 is specified when the file is opened.

Examples

The following RECORD command specifies the first record:

RECORD ; 1.

The following RECORD command specifies that the block length of a file is found in columns 6 through 10. It also declares the mode to be NUMBER and the character type to be EBCDIC.

BLOCKSIZE      06 FOR 5 (NUMBER EBCDIC).

The following RECORD command specifies that the creation date of a file is found in columns 43 through 47:

CREATIONDATE   43 FOR 5.

The following RECORD command specifies that the generation of a permanent file is found in columns 36 through 39:

CYCLE          36 FOR 4.

The following RECORD command specifies that the FID title is found in columns 5 through 21:

FID            05 FOR 17.

The following RECORD command specifies that the MFID title is found in columns 12 through 28:

MFID           12 FOR 17.

The following RECORD command specifies that the ISO, BSI, and ANSI file section number of the first header LABEL record is found in columns 32 through 35:

FILESECTION    32 FOR 4.

The following RECORD command specifies that the maximum record size of a logical file is found in columns 11 through 15:

MAXRECSIZE     11 FOR 5.

The following RECORD command specifies that the minimum record size of a logical file is found in columns 16 through 19:

MINRECSIZE     16 FOR 4.

The following RECORD command specifies that the parity that is used on a file is found in column 18:

PARITY         18 FOR 1.

The following RECORD command specifies that the record format of a file is found in column 5:

RCDFRMT        05 FOR 1.

The following RECORD command specifies that the transfer of data in a file is word- or character-oriented in column 24:

UNITS          24 FOR 1.

The following RECORD command specifies that the distinguishing of successive iterations of the same generation of a permanent file is found in columns 40 and 41:

VERSION        40 FOR 2.