User's Guide

ALLOC

DITTO command ---- Allocate a DITTO device

Function:

Allocates a DITTO input/output device. The device may be a magnetic tape or a disk file.

Parameters:

Subcommand -DISK:
Allocates a disk file. If a disk file is allocated to the input DITTO device, error checking is done to ensure that the disk file exists.

DITTO allows single or multiple disk files to be allocated to the input/output device. A single disk file is denoted by specifying the full disk file name. Multiple disk files are denoted by a file name appended with "_x" and then the extension (e.g. NY_x.IMG), where x is an ascending file number.

DEVTYPE
Device type. Specifies which input/output device is to be allocated. Valid values are:


  = INPUT :  Input device
  = OUTPUT:  Output device

INFILE
Input file. File name of the disk file that is to be allocated to the DITTO input/output device.

RECTYPE(--)
Record type. Specifies the type of records the file contains. If the file consists of variable length records, it is assumed that the file is not blocked, i.e., logical record size is equal to physical record size. Valid values are:


  = --:   Defaults to whatever current file is
  = FIX:  Fixed length logical records
  = VAR:  Variable length logical records

RECSIZ(--)
Record size. The number of bytes in one logical record. If the file consists of variable length records, the parameter RECSIZ represents the maximum record size within the file. The default value depends on parameter DEVTYPE:


DEVTYPE = INPUT -- RECSIZ is assigned to the logical 
                   record size of the existing disk 
                   file.

DEVTYPE = OUTPUT-- RECSIZ is assigned to be a no 
                   value.  Then when a DITTO command 
                   (such as COPY) is executed, the 
                   logical record size from the input 
                   device is assigned.

BLKSIZ(--)
Block size. The number of bytes in one physical record. Each physical record may contain more than one logical record. The use of blocked records serves to utilize as much tape and/or disk as possible and also to minimize access time. The default value depends on parameter DEVTYPE:


DEVTYPE = INPUT  -- BLKSIZ is assigned to the block size 
                    of the existing disk file.

DEVTYPE = OUTPUT -- BLKSIZ is assigned to be a no 
                    value.  Then when a DITTO command 
                    (such as COPY) is executed, the 
                    block size from the input device 
                    is assigned.

CCFORM(--)
Carriage control format. The default allows the operating system to determine what type of carriage control is associated with the file. On VMS systems, this parameter may be ignored. However, UNIX systems may not be able to determine the type of carriage control correctly. Valid values are:


  =--:        Defaults to whatever current file is
  =CARRIAGE:  Records terminated by a new line 
              character
  =NONE:      Records terminated as specified by 
              record size
Subcommand -TAPE:
Allocates a magnetic tape. A tape mount message is sent to the operator's console to mount the tape. If the tape is allocated to the output DITTO device, the user should ensure that the write ring is in the tape.

DEVTYPE
Device type. Specifies which input/output device is to be allocated. Valid values are:


  = INPUT :  Input device
  = OUTPUT:  Output device

COMMENT
Description of tape. A text string sent to the operator's terminal. COMMENT consists of two pieces of information:


   1.  Tape library storage location ID number
   2.  Short description of the tape

The operator uses this text to find the tape to be mounted; therefore, COMMENT should be as descriptive as possible. Including both the ID number and a short description gives the operator a double check to ensure the correct tape gets mounted.

TAPEDENS(&$TPDENS)
Tape density. The density of the tape in bytes per inch. Note that on input, the density defaults to the value of the tape being read.

RECTYPE(--)
Record type. Specifies the type of records the file contains. If the file consists of variable length records, it is assumed that the file is not blocked, i.e., logical record size is equal to physical record size. Valid values are:


  = --:   Defaults to whatever current file is
  = FIX:  Fixed length logical records
  = VAR:  Variable length logical records

RECSIZ(--)
Record size. The number of bytes in one logical record. If the file consists of variable length records, the parameter RECSIZ represents the maximum record size within the file. The default value depends on parameter DEVTYPE:


DEVTYPE = INPUT -- RECSIZ is assigned to the logical 
                   record size of the existing disk 
                   file.

DEVTYPE = OUTPUT-- RECSIZ is assigned to be a no 
                   value.  Then when a DITTO command 
                   (such as COPY) is executed, the 
                   logical record size from the input 
                   device is assigned.

BLKSIZ(--)
Block size. The number of bytes in one physical record. Each physical record may contain more than one logical record. The use of blocked records serves to utilize as much tape and/or disk as possible and also to minimize access time. The default value depends on parameter DEVTYPE:


DEVTYPE = INPUT  -- BLKSIZ is assigned to the block size 
                    of the existing disk file.

DEVTYPE = OUTPUT -- BLKSIZ is assigned to be a no 
                    value.  Then when a DITTO command 
                    (such as COPY) is executed, the 
                    block size from the input device 
                    is assigned.

CCFORM(--)
Carriage control format. The default allows the operating system to determine what type of carriage control is associated with the file. On VMS systems, this parameter may be ignored. However, UNIX systems may not be able to determine the type of carriage control correctly. Valid values are:


  =--:        Defaults to whatever current file is
  =CARRIAGE:  Records terminated by a new line 
              character
  =NONE:      Records terminated as specified by 
              record size

Examples:

  1. DITTO> alloc-disk devtype=input infile=ny.dat rectype=fix

    The user has requested to allocate the input DITTO device to the disk file "NY.DAT." If the file "NY.DAT" exists on disk, the single file is allocated. If "NY.DAT" does not exist and "NY_1.DAT" does exist, all disk files with the format "NY_x.DAT" are allocated to the input device. The block size and record size are assigned to whatever the existing file is.

  2. DITTO> alloc-disk devtype=output infile=ny.dat rectype=fix recsiz=80 blksiz=512

    The user has requested to allocate the output DITTO device to the disk file "NY.DAT" with a block size of 512 bytes and fixed length record size of 80 bytes.

  3. DITTO> alloc-disk devtype=output infile=ny.dat rectype=var recsiz=100

    The user has requested to allocate the output DITTO device to the disk file "NY.DAT" with variable length records with a maximum length of 100 bytes. Note that the block size is also assigned a value of 100 bytes.

  4. DITTO> alloc-tape devtype=input comment="please mount tape m0055 ditto tape"

    The user has requested to allocate the input DITTO device to the tape identified by M0055. The tape is mounted onto a tape drive. The record size and block size are assigned to whatever the current file on tape is.

Description/Algorithm:

From the input parameters it is determined which input/output DITTO device is to be allocated and whether the device is to be assigned to a disk file or a magnetic tape.

DITTO allows single or multiple disk files to be allocated to the input/output device. A single disk file is denoted by specifying the full disk file name. Multiple disk files are denoted by a file name appended with "_x" and then the extension (e.g. NY_x.IMG), where x is an ascending file number. The DITTO device is allocated with one of the following methods.

  1.  Disk file assigned to input DITTO device:
      Error checking is done to ensure the disk file exists and 
      has the correct file attributes.  The global variables for 
      the input device are assigned appropriately.

  2.  Disk file assigned to output DITTO device:
      The global variables for the output device are assigned 
      appropriately.

  3.  Tape assigned to input DITTO device:  
      The input tape identified by the tape label is mounted onto 
      a tape drive.  The global variables for the input device are 
      assigned appropriately.

  4.  Tape assigned to output DITTO device:  
      The output tape identified by the tape label is mounted onto 
      a tape drive.  The global variables for the output device 
      are assigned appropriately.

Nonfatal Error Message:

    None.

Fatal Error Message:

    None.

User Note:

    None.