


The compiler must give a name to each ".xfd" file (data dictionary) that is built. The compiler attempts to build the name from your COBOL code, although there are some instances where the name in the code is nonspecific, and you must provide a name.
Each ".xfd" name is built from a starting name that is derived (if possible) from the SELECT statement in your COBOL code. The following paragraphs explain how that occurs.
ASSIGN name is a variable
If the SELECT for the file has a variable ASSIGN name (ASSIGN TO filename), you must specify a starting name for the ".xfd" file via a FILE directive in your code. (See section 3.7, "File Aliases" and section 6.3.7, "FILE Directive" for sample code and additional information .)
ASSIGN name is a constant
If the SELECT for the file has a constant ASSIGN name (such as ASSIGN TO "COMPFILE"), that name is used as the starting name for the ".xfd" file.
ASSIGN name is generic
If the ASSIGN phrase refers to a generic device (such as ASSIGN TO "DISK"), the compiler uses the SELECT name as the starting name.
Forming the final XFD name
From the starting name, the final name is formed as follows:
1. The compiler removes any extensions from the starting name.
2. It constructs a "universal" base name by stripping out directory information that fits any of the formats used by the operating systems that run ACUCOBOL-GT.
3. It converts the base name to lower case.
4. It appends the extension ".xfd" to the base name.
Examples of XFD names
| COBOL code | File name |
| ASSIGN TO "usr/ar/customer.dat"
| customer.xfd
|
| SELECT TESTFILE, ASSIGN TO DISK
| testfile.xfd
|
| ASSIGN TO "-D SYS$LIB:HELP"
| help.xfd
|