| United States-English |
|
|
|
![]() |
ALLBASE/SQL FORTRAN Application Programming Guide: HP 3000 MPE/iX Computer Systems > Chapter 3 Embedding SQL CommandsGeneral Rules for Embedding SQL |
|
Embedded SQL commands must appear in certain locations within the FORTRAN program. Each embedded SQL command must be accompanied by the prefix EXEC SQL. Comments may be placed within an embedded command, and an embedded SQL command may continue for several lines. An embedded SQL command has no maximum length. A dynamic SQL command can be no longer than 2048 bytes. Put SQL commands, including their prefix, within columns 7 through 72 of either the main program unit or a subprogram unit:
Precede each SQL command with the prefix EXEC SQL. Minimally the prefix must be specified on the same line. For example, the following are legal:
However, the following is not legal:
You may insert FORTRAN comment lines within or between embedded SQL commands. Denote comment lines by placing the letter C in column 1 and entering the comment in columns 7 through 72:
SQL comments can be inserted in any line of an SQL statement, except the last line, by prefixing the comment character with at least one space followed by two hyphens followed by one space:
The comment terminates at the end of the current line. (The decimal point in the 500 improves performance when being compared to SalesPrice, which also has a decimal; no data type conversion is necessary.) The FORTRAN preprocessor allows you to continue a non-numeric literal from one line to the next. Enter any character other than the digit 0 or a blank in column 6, and do not enter the character C, *, or $ in column 1. The FORTRAN preprocessor supports up to 19 continuation lines. The the FORTRAN/XL compiler allows you to extend the number of continuation lines, the FORTRAN compiler on other systems where the preprocessor is used does not allow more than 19 contination lines. Therefore, for consistency, the preprocessor only allows 19 contination lines.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||