Compiler File Options

Some file options (-Fa, -Fe, -Fx, and -F4) are used to generate XFD files (data dictionaries) that are used with Acu4GL, AcuXML, the alfred record editor, and with international character mapping for AcuXDBC and AcuServer. Other file options (-Fl, -Fs, -Ft) can simplify the addition of transaction management facilities to existing programs that use the Vision file system.

For more details regarding transaction management, see Transaction Management. For more details about international character mapping, see International Character Handling.

-Fa This option tells the compiler to build data dictionaries (XFD files) for every indexed, relative, and sequential data file in the FDs of the program. It is the only option that builds XFDs for relative and sequential files. This option is also used for AcuXML file translation and for international character mapping. See also the -Fo compile-time option, which specifies the directory in which the data dictionaries are placed.

The -Fa option generates the most current format for the XFD files (Version 6). (XFD versioning is distinct from Vision versioning.) Any version of Vision will work with any version of XFD, as long as the XFD version can store all the necessary precision of the Vision file. (For example, if you are using Vision Version 5 and you want to use a larger record size than what can be stored in 5 digits, then you will need to use Version 5 XFDs.)

An attempt to use the -Fa option with a backwards-compatibility switch results in a warning and the XFDs for RELATIVE and SEQUENTIAL files are not created. An attempt to use this option for records containing duplicate element names also results in a warning; however, if you are creating XFDs for AcuXML, you may disregard this warning. XFDs will be generated, and XML supports duplicate names.
-Fc This option causes the field names in generated XFD files to match exactly the source of the COBOL program that generated them.
-Fe This option causes XFD files to be generated in standard flat text format rather than XML format. Acu4GL, AcuXDBC, and alfred can all read XFD files in XML format. This option must be used in conjunction with the -Fx or -Fa options. The C$XML library routine can be used to parse the XML files if desired. This option will not work in combination with -F4 or -F3. Version 4 and 3 XFD files cannot be generated in XML format.
-Fl This option enables single locking rules rather than multiple locking rules as the lock mode default. Normally, WITH ROLLBACK causes multiple locking rules to be in effect for a file. When -Fl is used, the WITH ROLLBACK clause does not affect whether single or multiple record locking rules are followed. Single locking becomes the default. You may enable multiple locking either by specifying WITH LOCK ON MULTIPLE RECORDS in a file's SELECT statement or by using APPLY LOCK-HOLDING ON file in the I-O CONTROL paragraph.
-Fm This option causes LOCK MODE IS MANUAL to be applied when the LOCK clause is omitted from the SELECT statement in the FILE-CONTROL paragraph.
-Fn

This option specifies file locking as the default behavior for files that do not have locking or sharing already specified or implied from within the program. This option can improve batch processing times and make file access more restrictive for programs that do not specify any form of file locking.

This option implies a lock on any OPEN statement contained in the program. The implied lock is based on the OPEN format as follows:

  • OPEN INPUT - ALLOWING READERS
  • OPEN OUTPUT - ALLOWING NO OTHERS
  • OPEN EXTEND - ALLOWING NO OTHERS
  • OPEN-I-O ALLOWING NO OTHERS

If the following file locking or sharing methods are applied to a file, the -Fn has no effect:

  • SELECT contains a LOCK phrase. The specified or implied behavior of the LOCK phrase is used
  • The OPEN statement contains the EXCLUSIVE, LOCK, MASS-UPDATE, BULK-ADDITION, or ALLOWING phrases. The sharing attributes that these phrases set are used

See OPEN Statement for details on applying file locks and sharing.

-Fo

This option must be followed (as the next separate argument) by the directory that will hold the data dictionary files generated by the compiler with you use the -Fx option.

Type a space after the option and then give the name of the chosen directory. If this option is not used, the XFDs are placed into the current directory.

For example, to cause the data dictionaries to be stored in the directory /usr/inventory/dictionaries you would enter:

-Fo /usr/inventory/dictionaries

The acurfap syntax can be used to specify a location on a system being served by AcuServer or AcuConnect. For information about acurfap syntax, see Remote File Name Handling.

-Fp This option causes all files, except sort files, to be treated as if the OPTIONAL phrase is specified in the SELECT statement.
-Fs This option causes an implied START TRANSACTION verb before the first OPEN, CLOSE, WRITE, REWRITE, or DELETE and after each COMMIT or ROLLBACK. In effect, every file operation is part of a transaction. If this option is enabled, and the compiler encounters a START TRANSACTION verb, it reports a warning and does not generate any code for the START TRANSACTION. The -Fs option provides an alternate way to program transactions and is often useful when you are converting from other COBOL or SQL implementations. Transaction management is discussed in detail in Transaction Management.
-Ft This option causes implied transactions for every OPEN, CLOSE, WRITE, REWRITE, or DELETE that is not part of an explicit transaction. Single file operations that are not part of a transaction are preceded by an implied START TRANSACTION and followed by an implied COMMIT. This option makes converting existing applications to a transaction system easier. Note that unlike most COMMITs, which unlock all of the file's currently locked records, the implied COMMIT does not unlock any records. See Extended Locking Rules for details regarding file locking and the handling of implied transactions.
-Fx This option directs the compiler to build Version 6 data dictionaries (XFD files) for every indexed data file in the FDs of the program. If you need an older version of XFD files, specify the -F3, -F4 or -F5 option instead of -Fx. If you use relative, sequential, or XML data files, use the -Fa option instead. Use the -Fo option to specify the directory in which the data dictionaries should be placed.
Note: XFDs are required if you plan to use any Acu4GL interface, AcuXDBC, or AcuXML; these interfaces cannot operate without data dictionaries. XFDs are also required for international character mapping with AcuServer and they provide useful information to the alfred record editor. XFD files have tthree different formats: Version 4, Version 5 and Version 6. Database technologies in the extend6 Interoperability Series, including AcuXML, require Version 5 XFDs. Version 4 XFDs are required for previous versions of Acu4GL, alfred, and AcuODBC (Version 5.x and earlier).
-F4 This option tells the compiler to build Version 4 data dictionaries (XFD files) for every indexed data file in the FDs of the program. This older version of the XFD files is compatible with Acu4GL, AcuODBC, and Version 5.x and earlier. To build Version 4 XFDs for every indexed, relative, and sequential data file in your FDs, combine -F4 with -Fa, as in ccbl -F4 -Fa.
-Fxa Supported but obsolete. It produces the same result as -Fa.
--fileAssign=

This option allows you to specify how to assign a filename when neither DYNAMIC or EXTERNAL is part of the ASSIGN clause of the SELECT statement. The "=" must be followed by the keyword DYNAMIC or EXTERNAL. For example,

--fileAssign=external 

causes the compiler to treat SELECT statements that do not specify DYNAMIC or EXTERNAL in the ASSIGN clause, as if EXTERNAL were specified.

--fileIdSize=#        Specifies the size, in bytes, of file handles passed to COBOL programs. # is replaced by the value , 4, or 8 to specify the number of bytes in the passed integer. A four-byte native integer is passed by default. A two-byte native integer is used in HP COBOL compatibility mode (-Cp).