Was this helpful?
Generating an Executable Program
The following sections describe command line operations that you can use to turn your EQUEL source code program into an executable program. These commands preprocess, compile, and link your program.
The EQUEL Preprocessor Command
Use the following command line to invoke the Fortran preprocessor:
eqf {flags} {filename}
where flags are as follows:
-d
Adds debugging information to the runtime database error messages EQUEL generates. The source file name, line number, and the erroneous statement itself are printed with the error message.
-f[filename]
Writes preprocessor output to the named file. If the -f flag is specified without a filename, the output is sent to standard output, one screen at a time. If the -f flag is omitted, output is given the basename of the input file, suffixed ".f" (UNIX) or ".for" (VMS and Windows).
-iN
Sets the default size of integers to N bytes. N is 2 or 4. The default is 4. If 2 is used, the -12 flag (UNIX), the noi4 qualifier (VMS), or the /integer_size:16 flag (Windows) must be used with the Fortran compiler.
-l
Writes preprocessor error messages to the preprocessor's listing file, as well as to the terminal. The listing file includes preprocessor error messages and your source text in a file named filename.lis, where filename is the name of the input file.
-lo
Like -l, but the generated Fortran code also appears in the listing file
-n. ext
Specifies the extension used for filenames in ## include and ## include inline statements in the source code. If -n is omitted, include filenames in the source code must be given the extension ".qf".
-o. ext
Specifies the extension the preprocessor gives to both the translated include statements in the main program and the generated output files. If this flag is not provided, the default extension is ".f"
If you use this flag in combination with the -o flag, then the preprocessor generates the specified extension for the translated include statements, but does not generate new output files for the include statements.
-o
Directs the preprocessor not to generate output files for include files
This flag does not affect the translated include statements in the main program. The preprocessor generates a default extension for the translated include file statements unless you use the -o. ext flag.
-s
Reads input from standard input and generate Fortran code to standard output. This is useful for testing statements you are not familiar with. If the -l option is specified with this flag, the listing file is called "stdin.lis." To terminate the interactive session, type Ctrl D (UNIX) or Ctrl Z (VMS and Windows).
-w
Prints warning messages
-?
Shows the available command line options for eqf
The EQUEL/Fortran preprocessor assumes that input files are named with the extension ".qf". To override this default, specify the file extension of the input file(s) on the command line. The output of the preprocessor is a file of generated Fortran statements with the same name and the extension ".f" (UNIX) or ".for" (VMS and Windows).
If you enter the command without specifying any flags or a filename, a list of available flags for the command is displayed.
The following table presents a range of the options available with eqf.
Eqf Command Examples
The following are examples of eqf commands:
eqf file1
Preprocesses "file1.qf" to "file1.for"
eqf -l file2.xf
Preprocesses "file2.xf" to "file2.for" and creates listing "file2.lis"
eqf -s
Accept input from standard input and write generated code to standard output
eqf -ffile4.out file4
Preprocesses "file4.qf" to "file4.out"
eqf
Displays a list of available flags for this command.
The Fortran Compiler
The preprocessor generates Fortran code. The generated code is in tab format, in which each Fortran statement follows an initial tab. (For information on the EQUEL format acceptable as input to the preprocessor, see EQUEL Statement Syntax for Fortran.)
UNIX: You must use the f77 command to compile this code. You can use most of the f77 command line options. If you use the -i2 flag to interpret integer and logical declarations as 2-byte objects, you must have run the EQUEL/Fortran preprocessor with the -i2 flag.
The following example preprocesses and compiles the file "test1". The EQUEL/Fortran preprocessor assumes the default file extension ".qf".
$ eqf test1
$ f77 test1l.f 
VMS: You should use the VMS fortran command to compile this code. You can use most of the fortran command line options. If you use the noi4 qualifier to interpret integer and logical declarations as 2-byte objects, you must have run the EQUEL/Fortran preprocessor with the -i2 flag. You must not use the g_floating qualifier if floating-point values in the file are interacting with Ingres floating-point objects. Note, too, that many of the statements that the preprocessor generates are nonstandard extensions provided by VAX/VMS. You should not attempt to compile with the nof77 qualifier, which requires compatibility with Fortran-66.
The following example preprocesses and compiles the file "test1". The EQUEL/Fortran preprocessor assumes the default file extension ".qf".
$ eqf test1
$ fortran/list testl 
Windows: Use the Windows df command to compile this code. The following compile options are required for Windows:
/name:as_is
Treats uppercase and lowercase letters as different
/iface:nomixed_str_len_arg
Requests that the hidden lengths be placed in sequential order at the end of the argument list
/iface:cref
Specifies that names are not decorated, the caller cleans the call stack and var args are supported
If you use the /integer_size:16 qualifier to interpret integer and logical declarations as 2-byte objects, you must have run the Fortran preprocessor with the -i2 flag.
The following example preprocesses and compiles the file "test1." The Embedded SQL preprocessor assumes the default extension:
esqlf test1
df /compile_only /name:as_is /iface:nomixed_str_len_arg /iface:cref test1 
Note:  Check the Readme file for any operating system specific information on compiling and linking EQUEL/Fortran programs.
Last modified date: 06/10/2024