This configuration variable specifies a format for naming the data segments of Vision 4 and 5 files. (See filename_INDEX_FMT for details about naming the index segments, as both variables should be set to corresponding patterns). The configuration variable used is constructed from the file's base name and extension, with all letters converted to upper case and all non-alphanumeric characters converted to underscores, followed by the _DATA_FMT string. Note that by design, this variable does not modify the first specified data segment. The first data segment retains the originally specified name. The filenames of the additional segments of a Vision file are generated from the name of the initial data segment. The filename_DATA_FMT variable allows you to change the way the names of the following data segments are formed, but the names still originate from the name of the initial data segment. As long as the names are as expected (and you have set filename_DATA_FMT and filename_INDEX_FMT accordingly) the segments will be found properly.
Suppose that the regular name of your COBOL file is /usr1/gl.dat. The variable you would use to set the data segment naming format for this file is GL_DAT_DATA_FMT.
The variable must be set equal to a pattern that shows how to create the segment names. The pattern shows how to form the base name and extension for each segment. Part of this pattern is a special escape sequence (such as %d) that specifies how the segment number should be represented. Choices include %d (decimal segment numbers), %x (lowercase hexadecimal numbers), %X (uppercase hexadecimal numbers), and %o (octal numbers).
For example, setting the variable GL_DAT_DATA_FMT=gl%d.dat would result in data segments named /usr1/gl.dat (remember that the first data segment is not affected), /usr1/gl1.dat, /usr1/gl2.dat, and so forth.
The %d in the value of the filename_DATA_FMT above is a printf-style escape sequence. Most reference books on the C language contain an in-depth explanation of these escape sequences, and UNIX systems typically have a man page (man printf) that explains them in detail. Here are the basics:
The escape sequence can be positioned anywhere in the file name, including the extension.
The filename translation performed by this configuration variable is performed by Vision itself. The runtime can also perform filename translation. See File Name Assignments in the ACUCOBOL-GT User's Guide for more information.