Back|Forward
DCL:MISC£±:FIOLIB: File Input/Output #
           
11.1 Summary
This is a subroutine package for reading and writing fixed-length character 
string data and binary data. It is intended for use by file transfer software 
such as ftp, and attempts to unify file manipulation operations and to remove 
any system-dependencies. Therefore, although the file itself is not interchangeable, 
the contents of the file will be retained by some appropriate transfer 
procedure, and so it will able characters to be handled on the character level 
and binaries on binary level.
This package is designed based on the following specifications. 
- 1.
- Handles the input/output of fixed-length files.
- 2.
- Input and output will not be performed simultaneously.
  
- 3.
- Output will be performed sequentially.
  
- 4.
- For input, random access by specification of the record number will be 
  allowed.
  
- 5.
- The user may specify whether or not to make line-feed control at the end of 
  the line.
  
- 6.
- When a file is opened for writing, the existing file will be deleted.
These specifications arose from the following requirements.             
- Direct reference input/output is intended for UNIX computers, and so 1 is 
  required.
- Sequential reference input/output is intended for mainframe-system computers 
  (access by sequential reference input/output is faster than direct reference 
  input/output due to the difference in file system), and so 2 and 3 are 
  required.              
- Random access must be allowed utilizing the advantages of the direct 
  reference input/output performed on UNIX computers. However, since it is not 
  practical to specify the record number for sequential reference input/output 
  on mainframe-system computers, and since sequential reference will be the type 
  of usage in most cases, pseudo-random access will only be required on input. 
  Thus, 4 is required.             
- The character input/output for UNIX systems require 5.
- When the direct reference input/output being performed involves a smaller 
  file size for overwriting compared to the existing file, a portion of the old 
  file will remain. Thus, 6 is required.
When using the subroutines in this package, keep the following in mind.
- The validity of the input/output unit number is not checked.
- The validity of the record length is not checked.
- The validity of the record number is not checked.
- The input/output unit number that can be specified is from 1 to 99.
The condition code that appears in all of the explanations of the subroutines in 
this package will return an integral value of 1 for normal termination and 0 in 
all other cases.