MAXLITERAL Default
Nulls
Program Units
Scope of Host
Variables
1 – 6 Pro*FORTRAN Supplement to the Oracle Precompilers Guide
With the MAXLITERAL precompiler option you can specify the
maximum length of string literals generated by the precompiler, so that
compiler limits are not exceeded. For Pro*FORTRAN, the default value
is 1000, but you might need to specify a lower value.
For example, if your FORTRAN compiler cannot handle string literals
longer than 512 characters, specify MAXLITERAL=512. Check your
FORTRAN compiler user’s guide.
In SQL, a null represents a missing, unknown, or inapplicable column
value; it equates neither to zero nor to a blank. Use the NVL function to
convert nulls to non–null values, use the IS [NOT] NULL comparison
operator to search for nulls, and use indicator variables to insert and
test for nulls.
In FORTRAN, a program unit is a function, subroutine, or main
program. In Pro*FORTRAN, an input file contains one or more
program units.
If a program unit contains SQL statements, it must
• define all local host variables in its Declare Section
• INCLUDE the SQLCA when MODE={ORACLE|ANSI13}
• declare a variable named SQLATA or SQLCOD inside or outside
the Declare Section when MODE={ANSI|ANSI14}
• INCLUDE the ORACA if you specify ORACA=YES
More than one program unit can contain SQL statements. For example,
you can DECLARE a cursor in one program unit, OPEN it in another,
FETCH from it in yet another, and CLOSE it in still another as long as
they are in the same file.
The scoping rules for FORTRAN identifiers apply to host variables.
Host variables declared in a program unit are local to that unit, and
host variables declared in the main program are not global. So, all host
variables used in a program unit must be declared in that unit in the
Declare Section.