Embedded QUEL Companion Guide
1. About This Guide
Overview
Purpose of This Manual
Audience
Contents
Conventions
Statements and Commands
Terminology
Syntax
System-specific Text
Related Manuals
2. Embedded QUEL for C
EQUEL Statement Syntax for C
Margin
Terminator
Line Continuation
Comments
String Literals
C Variables and Data Types
Variable and Type Declarations
EQUEL Variable Declaration Procedures
Reserved Words in Declarations
Data Types
C Data Types and Corresponding Ingres Types
The Integer Data Type
The Floating-point Data Type
The Character String Data Type
## Define Declaration
Variable Declarations Syntax
Type Declarations Syntax
Array Declarations Syntax
Pointer Declarations Syntax
Structure Declarations Syntax
A Structure with a Tag and a Body
A Structure with a Body and No Tag
A Structure with a Tag and No Body
Enumerated Integer Types
The Varying Length String Type
Indicator Variables
Assembling and Declaring External Compiled Forms - VMS only
Compiling and Declaring External Compiled Forms -UNIX only
Concluding Example
The Scope of Variables
Variable Usage
Simple Variables
Array Variables
Pointer Variables
Structure Variables
Using a Structure Member
Using an Enumerated Variable (Enum)
Using a Varying Length String Variable (Varchar)
Using Indicator Variables
Data Type Conversion
Ingres and C Data Type Compatibility
Runtime Numeric Conversion
Runtime Character Conversion
Using Varchar to Receive and Set Character Data
Dynamically Built Param Statements
Syntax of Param Statements
Practical Uses of Param Statements
Indicator Variables in Param Statements
Using the Sort Clause in Param Retrieves
Param Versions of Cursor Statements
Runtime Error Processing
Programming for Error Message Output
Precompiling, Compiling, and Linking an EQUEL Program
Generating an Executable Program
The EQUEL Preprocessor Command
Eqc Command Examples
The C Compiler
Linking an EQUEL Program—UNIX
Programs without Embedded Forms
Compiling and Linking Precompiled Forms
Linking an EQUEL Program—VMS
Assembling and Linking Precompiled Forms
Linking an EQUEL Program without Shared Libraries
Include File Processing
Including Source Code with Labels
Coding Requirements for Writing EQUEL Programs
Comments Embedded in C Output
Embedding Statements Inside C If Blocks
An EQUEL Statement that Does Not Generate Code
EQUEL/C Preprocessor Errors
Preprocessor Error Messages
Sample Applications
The Department-Employee Master/Detail Application
The Employee Query Interactive Forms Application
The Table Editor Table Field Application
The Professor-Student Mixed Form Application
An Interactive Database Browser Using Param Statements
3. Embedded QUEL for COBOL
EQUEL Statement Syntax for COBOL
Margin
Terminator
Line Continuation
Comments
String Literals
The Param Function
COBOL Variables and Data Types
Variable and Type Declarations
EQUEL Variable Declaration Procedures
The Declare Statement
Data Item Declaration Syntax
Reserved Words in Declarations
Data Types
The Numeric Data Category - UNIX
Numeric Data Items with Usage COMP-5 - UNIX
The Numeric Data Category - VMS
The Numeric Edited Data Category
The Alphabetic, Alphanumeric, and Alphanumeric Edited Categories
Declaring Records
Indicator Data Items
Compiling and Declaring External Compiled Forms - UNIX
Assembling and Declaring External Compiled Forms -VMS
Concluding Examples
The Scope of Variables
Variable Usage
Elementary Data Items
COBOL Tables
Record Data Items
Using Indicator Data Items
Data Type Conversion
Ingres Types and Corresponding COBOL Data Types
Decimal Type Conversion
Runtime Numeric Type Conversion
Numeric DISPLAY Items and Temporary Data Items
Runtime Character Conversion
Dynamically Built Param Statements
Runtime Error Processing
Programming for Error Message Output
Set_ingres Constant Values
Precompiling, Compiling, and Linking an EQUEL Program
Generating an Executable Program
The EQUEL Preprocessor Command
Eqcbl Command Options
Source Code Format
Format Considerations—UNIX
Format Considerations—VMS
The COBOL Compiler—VMS
Linking an EQUEL Program
Assembling and Linking Precompiled Forms
Linking an EQUEL Program without Shared Libraries
Incorporating Ingres into the Micro Focus RTS—UNIX
The COBOL Runtime System
Building an Ingres RTS Without the Ingres FRS
Building an RTS with the Ingres FRS
Including External Compiled Forms in the RTS
Procedure 1
Procedure 2
Include File Processing
Including Source Code with Labels
Coding Requirements for Writing EQUEL Programs
Comments Embedded in COBOL Output
Embedding Statements In IF and PERFORM Blocks
COBOL Periods and EQUEL Statements
An EQUEL Statement that Does Not Generate Code
Efficient Code Generation
COBOL Strings and EQUEL Strings
COBOL IF-THEN-ELSE Blocks
COBOL Function Calls
EQUEL/COBOL Preprocessor Errors
Preprocessor Error Messages
Sample Applications
UNIX and VMS—The Department-Employee Master/Detail Application
UNIX and VMS—The Employee Query Interactive Forms Application
UNIX and VMS—The Table Editor Table Field Application
UNIX and VMS—The Professor-Student Mixed Form Application
4. Embedded QUEL for Fortran
EQUEL Statement Syntax for Fortran
Margin
Terminator
Line Continuation
Comments
String Literals
Fortran Variables and Data Types
Variable and Type Declarations
EQUEL Variable Declaration Procedures
The Declare and Declare Forms Statements
Reserved Words in Declarations
Typed Data Declarations
Constant Declarations
Data Types
The Integer Data Type
The Real Data Type
The Character Data Type
Structure and Record Declarations
Indicator Variables
Assembling and Declaring External Compiled Forms - VMS
Compiling and Declaring External Compiled Forms - UNIX
Compiling and Declaring External Compiled Forms - Windows
Concluding Example
The Scope of Variables
Variable Usage
Simple Variables
Array Variables
Structure Variables - VMS only
Using a Structure Member
Using Indicator Variables
Data Type Conversion
Ingres and Fortran Data Type Compatibility
Runtime Numeric Type Conversion
Runtime Character Conversion
Dynamically Built Param Statements
Syntax of Param Statements
Practical Uses of Param Statements
Indicator Variables in Param Statements
Using the Sort Clause in Param Retrieves
Param Versions of Cursor Statements
Runtime Error Processing
Programming for Error Message Output
Precompiling, Compiling, and Linking an EQUEL Program
Generating an Executable Program
The EQUEL Preprocessor Command
Eqf Command Examples
The Fortran Compiler
Linking an EQUEL Program - UNIX
Programs Without Embedded Forms
Programs with Embedded Forms
Compiling and Linking Precompiled Forms
Linking an EQUEL Program - VMS
Assembling and Linking Precompiled Forms
Linking an EQUEL Program without Shared Libraries
Linking an EQUEL Program - Windows
Include File Processing
Including Source Code with Labels
Coding Requirements for Writing EQUEL Programs
Comments Embedded in Fortran Output
EQUEL Statements and Fortran If Blocks
EQUEL Statements that Generate Labels
An EQUEL Statement that Does Not Generate Code
EQUEL/Fortran Preprocessor Errors
Preprocessor Error Messages
Sample Applications
UNIX and VMS—The Department-Employee Master/Detail Application
UNIX and VMS—The Employee Query Interactive Forms Application
UNIX and VMS—The Table Editor Table Field Application
UNIX and VMS—The Professor-Student Mixed Form Application
UNIX, VMS, Windows—An Interactive Database Browser Using Param Statements
5. Embedded QUEL for Ada
EQUEL Statement Syntax for Ada
Margin
Terminator
Line Continuation
Comments
String Literals
Block Delimiters
Ada Variables and Data Types
Variable and Type Declarations
EQUEL Variable Declarations Procedures
The With Equel and With Equel_Forms Statements
Reserved Words in Declarations and Program Units
Data Types and Constants
Ada Data Types and Corresponding Ingres Types
Ada Constants and Corresponding Ingres Types
The Integer Data Type
The Float Data Type
The Long Float Storage Format
The Character and String Data Types
Variable and Number Declaration Syntax
Simple Variable Declarations
Type Constraints
The Range Constraint
The Discriminant and Index Constraints
Formal Parameter Declarations
Number Declarations
Renaming Variables
Type Declaration Syntax
Type Definition
Subtype Definition
Integer Type Definitions
Floating-point Type Definitions
Enumerated Type Definitions
Array Type Definitions
Record Type Definitions
Incomplete Type Declarations and Access Types
Derived Types
Private Types
Representation Clauses
Indicator Variables
Assembling and Declaring External Compiled Forms
Concluding Example
Compilation Units and the Scope of Variables
The Package Specification
The Package Body
The Procedure
The Function
The Declaration Block
Variable and Type Scope
Variable Usage
Simple Variables
Array Variables
Record Components
Access Variables
Using Indicator Variables
Data Type Conversion
Ingres TYPES and Corresponding Ada Data Types
Runtime Numeric Type Conversion
Runtime Character Type Conversion
Dynamically Built Param Statements
Runtime Error Processing
Programming for Error Message Output
Precompiling, Compiling and Linking an EQUEL Program
Generating an Executable Program
The EQUEL Preprocessor Command
Eqa Command Examples
The ACS Environment and the Ada Compiler
Entering EQUEL Package Specifications
Defining Long Floating-point Storage
The Ada Compiler
Linking an EQUEL Program
Assembling and Linking Precompiled Forms
Linking an EQUEL Program without Shared Libraries
Include File Processing
Including and Processing EQUEL/Ada Package Specifications
Including EQUEL/Ada Source Code
Coding Requirements for Writing EQUEL Programs
Comments Embedded in Ada Output
Ada Blocks Generated by EQUEL
An EQUEL Statement that Does Not Generate Code
EQUEL/Ada Preprocessor Errors
Preprocessor Error Messages
Sample Applications
The Department-Employee Master/Detail Application
The Employee Query Interactive Forms Application
The Table Editor Table Field Application
The Professor-Student Mixed Form Application
6. Embedded QUEL for BASIC
EQUEL Statement Syntax for BASIC
BASIC Line Numbers and the EQUEL Mark
Terminator
Line Continuation
Comments
String Literals
Integer Literals
BASIC Variables and Data Types
Variable and Type Declarations
EQUEL Variable Declarations Procedures
The Declare Ingres Statement
Reserved Words in Declarations
Data Types
BASIC Data Types and Corresponding Ingres Type
The String Data Type
The Integer Data Type
The Real Data Type
The Record Data Type
Variable and Constant Declaration Syntax
The Declare Statement
The Dimension Statement
Static Storage Variable Declarations
The External Statement
Parameter Variables
Record Type Definitions
The Indicator Variable
Assembling and Declaring External Compiled Forms
Concluding Example
The Scope of Variables
Variable Usage
Simple Variables
Array Variables
Record Components
Using Indicator Variables
Data Type Conversion
Ingres Data Types and Corresponding BASIC Types
Runtime Numeric Type Conversion
Runtime Character Type Conversion
Dynamically Built Param Statements
Runtime Error Processing
Programming for Error Message Output
Precompiling, Compiling, and Linking an EQUEL Program
Generating an Executable Program
The EQUEL Preprocessor Command
Eqb Command Examples
The BASIC Compiler
Linking an EQUEL Program
Assembling and Linking Precompiled Forms
Linking an EQUEL Program without Shared Libraries
Include File Processing
Including Source Code with Labels
Coding Requirements for Writing EQUEL Programs
Comments Embedded in BASIC Output
Embedding Statements Inside BASIC If Blocks
An EQUEL Statement that Does Not Generate Code
EQUEL/BASIC Preprocessor Errors
Preprocessor Error Messages
Sample Applications
The Department-Employee Master/Detail Application
The Employee Query Interactive Forms Application
The Table Editor Table Field Application
The Professor-Student Mixed Form Application
7. Embedded QUEL for Pascal
EQUEL Statement Syntax for Pascal
Margin
Terminator
Line Continuation
Comments
String Literals
Block Delimiters
Pascal Variables and Data Types
Variable and Type Declarations
Declaring the EQUEL Runtime Routines
The Declare Statement
The Inherit Attribute
Declaring Types and Variables to EQUEL
Reserved Words in Declarations and Program Units
Data Types and Constants
Pascal Data Types and Corresponding Ingres Types
Pascal Constants and Corresponding Ingres Types
The Integer Data Types
Pascal Integer Types
The Indicator Type
The Floating-point Data Types
The Double Storage Format
The Character Data Types
Declaration Syntax
Attributes
Label Declarations
The Syntax of Label Declarations
Constant Declarations
Type Declarations
Type Definitions
Renaming Type Definition
Enumeration Type Definition
Subrange Type Definition
Pointer Type Definition
Varying Length String Type Definition
Array Type Definition
Record Type Definition
File Type Definition
Set Type Definition
Variable Declarations
Formal Parameter Declarations
Assembling and Declaring External Compiled Forms
Concluding Example
Compilation Units and the Scope of Objects
Predeclared Identifiers
Compilation Unit Syntax
The Program Unit
The Module Unit
The Procedure
The Function
The Scope of Objects
Variable Usage
Simple Variables
Array Variables
Record Components
The With Statement
Pointer Variables
Indicator Variables
Data Type Conversion
Ingres and Pascal Data Type Compatibility
Runtime Numeric Type Conversion
Runtime Character Type Conversion
Dynamically Built Param Statements
Runtime Error Processing
Programming for Error Message Output
Precompiling, Compiling, and Linking an EQUEL Program
Generating an Executable Program
The EQUEL Preprocessor Command
Eqp Command Examples
The Pascal Compiler
Installing the EQUEL/Pascal Environment File
Linking an EQUEL Program
Assembling and Linking Precompiled Forms
Linking an EQUEL Program without Shared Libraries
Include File Processing
Including Source Code with Labels
Coding Requirements for Writing EQUEL Programs
Comments Embedded in Pascal Output
The Pascal Semicolon and EQUEL Statements
Pascal Blocks Generated by EQUEL
An EQUEL Statement that Does Not Generate Code
EQUEL/Pascal Preprocessor Errors
Preprocessor Error Messages
Sample Applications
The Department-Employee Master/Detail Application
The Employee Query Interactive Forms Application
The Table Editor Table Field Application
The Professor-Student Mixed Form Application
Ingres 10S
The Professor-Student Mixed Form Application