contents.gifindex.gifprev1.gifnext1.gif

6.1 Handling Files

Managing files forms the central focus of most COBOL applications. This section discusses the implementation and special features of the three types of files: sequential, relative, and indexed.

ACUCOBOL-GT supports variable-length records in accordance with ANSI standards for all file types. A file's records are variable-length whenever any one of these conditions is true:

gt490000.gif The RECORD CONTAINS clause contains the VARYING phrase.

gt490000.gif The RECORD CONTAINS clause contains both a minimum and maximum size.

gt490000.gif There is no RECORD CONTAINS clause but the file's FD specifies more than one record, and those records have different sizes.

A file's records are fixed-length whenever:

gt490000.gif The RECORD CONTAINS clause specifies only a maximum record size.

gt490000.gif There is no RECORD CONTAINS clause, and the file's FD does not specify multiple records having different sizes.


Note that ACUCOBOL-GT automatically closes all of its files if it is killed by the user. However, a power failure, turning off the computer, or issuing a "kill -9" from the console are catastrophic exits--in these cases ACUCOBOL-GT cannot close its files.