Pro*Fortran Supplement to the Oracle Precompilers | Library |
Product |
Contents |
Index |
The Pro*FORTRAN Precompiler is not case-sensitive; however, some compilers are. If your compiler is case-sensitive, you must declare and reference variables in the same uppercase/lowercase format. Check your FORTRAN compiler user's guide.
On some systems, terminal format is supported; that is, entry is not restricted to certain columns. Check your Oracle system-specific documentation.
No more than one statement can appear on a single line.
* Retrieve employee data.
EXEC SQL SELECT EMPNO, ENAME, JOB, SAL
1 INTO :MYEMPNO, :MYENAME, :MYJOB, :MYSAL
2 FROM EMP
3 WHERE DEPTNO = :MYDEPTNO
You can also continue string literals from one line to the next. Code the literal through column 72, then, on the next line, code a continuation character and the rest of the literal. An example follows:
* Execute dynamic SQL statement.
EXEC SQL EXECUTE IMMEDIATE 'UPDATE EMP SET COMM = 500 WHERE
1 DEPTNO=20'
Most FORTRAN implementations allow up to 19 continuation lines. Check your FORTRAN language user's guide.
How you declare and name host variables depends on which FORTRAN compiler you use. Check your FORTRAN user's guide for details about declaring and naming host variables.
The host datatypes and pseudotypes you can specify in the Declare Section are shown in the table on page 1-10. However, your implementation might not include all of them. Check your FORTRAN language user's guide.
The size of FORTRAN numeric types is implementation-dependent. The sizes given in the table are typical but not universal. Check your FORTRAN language user's guide.
If your system uses file extensions but you do not specify one, the Pro*FORTRAN Precompiler assumes the default extension for source files (usually FOR or F). The default extension is system-dependent. Check your Oracle system-specific documentation.
If your system uses directories, you can set a directory path for INCLUDEd files by specifying the precompiler option INCLUDE=path. You must use INCLUDE to specify a directory path for nonstandard files unless they are stored in the current directory. The syntax for specifying a directory path is system-specific. Check your Oracle system-specific documentation.
For example, if your FORTRAN compiler cannot handle string literals longer than 512 characters, specify "MAXLITERAL=512." Check your FORTRAN compiler user's guide. For more information about the MAXLITERAL option, see the Programmer's Guide to the Oracle Precompilers.
You can, however, use (cautiously) SQLADR with CHARACTER variables if your compiler provides a built-in function to access the data address. For example, if the compiler provides a function named %REF, and X is a CHARACTER variable, you call SQLADR as follows:
* Use %REF built-in function.
CALL SQLADR (%REF(X), ...)
Prev | Copyright © 1996 Oracle Corporation. All Rights Reserved. |
Library |
Product |
Contents |
Index |