TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)
Chapter 6 287
Host Language Access
FORTRAN 77
FORTRAN 77
Portions of the model program presented at the beginning of this chapter are now shown
here in FORTRAN 77. The examples perform specific tasks to illustrate the use of
TurboIMAGE/XL intrinsics.
Data items are defined at the beginning of the sample program. Explicit declaration of
intrinsics is not required. Other global variables in this program are placed in a COMMON
file.
NOTE
Because the Schema Processor, DBSCHEMA, upshifts alphabetic characters,
programs must specify data set and data item names in all uppercase
characters. Take note of this if FORTRAN 77 does not require that you use
uppercase characters.
For information on TurboIMAGE/XL data item lengths and type designators, refer to
chapter 3. Tables 3-2 and 3-3 show the TurboIMAGE/XL type designators, sub-item
lengths, and data types typically used to process them in Pascal.
NOTE
All parameters must be on halfword boundaries.
Because FORTRAN 77 requires that the parameters be on halfword boundaries, they must
be integer arrays equivalent to character strings if necessary.
Defining Data Types, Variables, and Intrinsics
The following declarations are placed in a FORTRAN 77 COMMON file. This file enables
different subroutines to import all necessary declarations. In this program, the COMMON
file is called comon1 and is included with the directive $Include 'comon1'.
C**** TurboIMAGE/XL's Global Declaration
C**** Set up for the Database name parameter.
Integer*2 DBname(10)
Character BaseName*16
Equivalence(DBname(1),BaseName)
Common /Database_Name_Type / DBname
C**** Set up for the Password parameter.
Character Pass_Word*10
Integer*2 Password(5)
Equivalence (Password(1),Pass_Word)
Common /Database_password_type/ password
C**** Set up for the Mode parameter.
Integer In,Out,Not_Used_Parm
Integer*2 Mode
Integer*2 Mode1_SMA, Mode5_Unconditional, Mode1_Chained_Read