TOCPREVNEXTINDEX

AcuODBC User's Guide
Version 6.0

6.2.5 Naming the XFD File

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, but in some instances 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.5, "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

The final name is formed from the starting name 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


Acucorp, Inc.
Voice: (800) 262-6585 (U.S.A. and Canada)
Voice: (858) 689-4500
Fax: (858) 689-4550

Please share your comments on this manual
or on any Acucorp documentation with the
Acucorp Communications Department.
TOCPREVNEXTINDEX
1988-2003 Acucorp, Inc.
All rights reserved.