Professional Documents
Culture Documents
Quick Syntax
Version 6.0
April 1994
Part No. 000-7609
2
The following are worldwide trademarks of Informix Software, Inc., or its subsidiaries, registered in the United States of
America as indicated by an “®,” and in numerous other countries worldwide:
The following are worldwide trademarks of the indicated owners or their subsidiaries, registered in the United States of
America as indicated by an “®,” and in numerous other countries worldwide:
Some of the products or services mentioned in this document are provided by companies other than Informix. These
products or services are identified by the trademark or servicemark of the appropriate company. If you have a question
about one of those products or services, please call the company in question directly.
ACKNOWLEDGMENTS
The following people contributed to this version of INFORMIX-4GL Quick Syntax:
Documentation Team: Adam Barnett, Kaye Bonney, Lisa Braz, Tom Houston, Liz Knittel, Jerry Pope
Technical Contributors: Jonathan Leffler, Sally Cox
No part of this work covered by the copyright hereon may be reproduced or used in any form or by any means—graphic,
electronic, or mechanical, including photocopying, recording, taping, or information storage and retrieval systems—
without permission of the publisher.
Software and accompanying materials acquired with United States Federal Government funds or intended for use within
or for any United States federal agency are provided with “Restricted Rights” as defined in DFARS 252.227-7013(c)(1)(ii) or
FAR 52.227-19.
Table of
Contents
INFORMIX-4GL
Quick Syntax
Introduction 5
Syntax Conventions 6
Basics 9
Data Types 10
4GL Arithmetic Operators 10
Boolean Operators 10
4GL Relational Operators 10
Global Constants and Variables 11
Built-In Functions 11
Operators 11
Library Functions 12
Display Attributes 15
Command-Line Syntax 16
4GL Statements 19
Types of SQL Statements 20
Other Types of 4GL Statements 21
4GL Statement Segments 37
4GL Forms 47
Form Specification Syntax 48
Attributes 50
Reports 55
Report Specification Syntax 56
Report Execution Statements 59
SQL Statements 61
SQL Segments 91
Stored Procedure Language Statements 105
4
This Guide presents a quick reference to the material listed in the following table. For
a full discussion of each topic, refer to the corresponding documentation.
This Guide shows syntax that must be prepared before you can include it in a 4GL
program. You must prepare any SQL statement introduced later than the 4.1 server
release. These statements are indicated in this manual by the following icon:
6.0
SE
Syntax Syntax diagrams describe the format of SQL, SPL, and 4GL statements and Debugger
Conventions commands, including alternative forms of them, required and optional parts of
them, and so forth. Syntax diagrams have their own conventions, which are defined
in detail and illustrated in this section.
Each syntax diagram displays the sequences of required and optional elements that
are valid in a statement or command. Briefly:
• All keywords are shown in uppercase letters for ease of identification, though
you need not enter them that way.
• Words for which you must supply values are in italics.
• All boldface characters are literals.
Syntax Conventions 7
Each diagram begins at the upper left with a keyword and ends at the upper
right with a vertical line. Between these points, you can trace any path that does
not stop or back up. Each path describes a valid form of the statement. Except
for separators in loops (see page 8), which the path approaches counterclock-
wise from the right, the path always approaches elements from the left and con-
tinues to the right.
Along a path, you may encounter the following elements:
KEYWORD You must spell a word in uppercase letters exactly as shown;
however, you can use either uppercase or lowercase letters when you
enter it.
(.,;+*-/) All other characters are literal symbols that you must enter exactly as
shown.
' ' " " Single and double quotes are literal symbols that you must enter as
shown.
variable A word in italics represents a value that you must supply. The nature
of the value is explained fully in the appropriate reference manual.
ALL A shaded option is the default. Even if you do not explicitly type the
option, it will be in effect unless you choose another option.
Syntax enclosed in a pair of arrows indicates that this is a subdiagram.
The vertical line is a terminator and indicates that the statement is com-
plete.
IN
A branch below the main line indicates an optional path.
NOT
,
A loop indicates a path that can be repeated. Punctuation included in the
variable loop indicates the separator symbol for items in a list; when no symbol is
shown in the loop, as in the example below, a blank space or LINEFEED is
the separator.
A gate ( 3 ) in an option indicates that you can only use that option the
number of times indicated, even though it is within a larger loop.
3 column key
The grey labels and arrows in the following illustration identify the elements of
a syntax diagram for the INITIALIZE statement of 4GL.
, ,
INITIALIZE variable LIKE Column
name List
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
10 Data Types
Boolean AND
OR
Operators
NOT
Color numbers and their meanings that can be used in FGL_DRAWBOX( ) are:
Number Color Number Color Number Color
0 White 3 Red 6 Blue
1 Yellow 4 Cyan 7 Black
2 Magenta 5 Green
Popping Numbers
Library
Functions extern void popint(int *iv)
extern void popshort(short *siv)
Calling extern void poplong(long *liv)
C Functions extern void popflo(float *fv)
from 4GL extern void popdub(double *dfv)
extern void popdec(dec_t *decv)
Popping Characters
extern void popquote(char *qv, int len)
extern void popvchar(char *qv, int len)
Returning Values
extern void retint(int iv)
extern void retshort(short siv)
extern void retlong(long lv)
extern void retflo(float fv)
extern void retdub(double dfv)
extern void retdec(dec_t *decv)
Pushing Values
extern void pushint(int iv)
extern void pushshort(short siv)
extern void pushlong(long liv)
extern void pushflo(float fv)
extern void pushdub(double dfv)
extern void pushdec(dec_t *decv, unsigned decp)
Calling 4GL Functions from C 13
Calling fgl_start(filename, argc, argv) initialize resources for the 4GL environment
4GL Functions char *filename;
from C int argc;
char *argv[];
fgl_call(funcname, nparams) call the 4GL function
char *funcname;
int nparams;
fgl_exitfm( ) reset terminal to character mode
fgl_end( ) free 4GL resources
Display
Attributes
ATTRIBUTE ,
Clause
ATTRIBUTE ( REVERSE )
BLACK BLINK
BLUE UNDERLINE
CYAN
GREEN
MAGENTA
BOLD
RED
WHITE DIM
YELLOW INVISIBLE
NORMAL
The ATTRIBUTE clause is used in these 4GL statements:
For all ATTRIBUTE clauses and field attributes the following table shows the
effects of the color attributes on a monochrome monitor, as well as the effects
of the intensity attributes on a color monitor:
Command-
Line Syntax
c4gl
-ansi -e -a -anyerr
source.4gl
-V
.c
.o
-V cfile
-a -anyerr .4go
.4gi
-V
fglpc source
-V
finderr msg_num
Command-Line Syntax 17
form4gl form-name
-q -l lines -c characters -V
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
18 Command-Line Syntax
4GL Statements
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
20 Types of SQL Statements
Note: Not all of these SQL statements listed on this and the next page are directly supported by
4GL. If the statement or any part of its syntax is preceded by a 6.0 icon in its syntax diagram
later in this chapter, the statement must be prepared (by using the PREPARE statement). Prepar-
ing SQL statements is described in Chapter 3 of the INFORMIX-4GL Reference.
Note: The data integrity statements marked with the SE symbol are supported
only by the INFORMIX-SE engine. Statements marked OL can only be used with the
INFORMIX-OnLine Dynamic Server engine.
Other Types of 4GL Statements 21
CALL function ( )
, ,
4GL Expression RETURNING Receiving
p. 39 Variable
p. 29
OTHERWISE
Block
Case II: (multiple criteria)
OTHERWISE Block
OTHERWISE statement
EXIT CASE
CLEAR FORM
WINDOW window
SCREEN
,
Field Clause
p. 46
CONSTRUCT CONSTRUCT
Variable
Clause ATTRIBUTE HELP
Clause number
p. 37
CONSTRUCT END
Form CONSTRUCT
Management
Block
CONSTRUCT ,
Variable Clause
variable ON Column List FROM Field Clause
p. 46
,
Column List
column
Table Qualifier table .
p. 46
table . *
Table Qualifier
p. 46
CONSTRUCT
Form Management
Block
1 BEFORE CONSTRUCT statement
DEFER INTERRUPT
QUIT
,
DEFINE variable Data Type Declaration
p. 37
DISPLAY Value
value
CLIPPED
ON KEY Block
,
ON KEY ( key name ) statement
EXIT DISPLAY
ATTRIBUTE Clause
p. 37
END keyword
,
ERROR "string"
variable ATTRIBUTE
Clause
p. 37
( exit code )
exit code
Case II: (terminating a statement)
keyword
EXIT FOR
Variable List
,
variable
. .*
record . first THROUGH record . last
, THRU
array [ 3 Integer ]
Expression
p. 41
"filename"
GOTO 27
,
INITIALIZE Variable LIKE table .column
List
Table
Qualifier
.*
p. 46
TO NULL
,
Variable List
variable
. .*
record . first THROUGH record . last
, THRU
array [ 3 Integer ]
Expression
p. 41
INPUT Binding
Clause
p. 28 ATTRIBUTE HELP number
Clause INPUT Form END INPUT
p. 37 Management
Block
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
28 INPUT ARRAY
, ,
Binding Clause
variable FROM Field Clause
field
(subset)
, WITHOUT DEFAULTS p. 46
BY NAME variable
WITHOUT DEFAULTS
INPUT Form ,
Management Block
Acceptable values of key (in lowercase or uppercase letters) for the ON KEY block are:
Binding Clause
program array FROM screen array .*
WITHOUT DEFAULTS
LABEL 29
INPUT ARRAY
Form Management ,
Block
BEFORE FIELD Field Clause statement
p. 46
AFTER INPUT NEXT FIELD Field Clause
field
p. 46
DELETE
NEXT
INSERT EXIT
PREVIOUS
ROW
CONTINUE INPUT
,
ON KEY ( key )
For acceptable values of key, see p. 28. For built-in functions that access field buffers
and keystroke buffers, see p. 28.
Built-in functions that keep track of the relative states of the screen cursor, the pro-
gram array, and the screen array:
Function Description
ARR_CURR( ) Returns the number of the current record of the program array.
ARR_COUNT( ) Returns the current number of records in the program array.
SCR_LINE( ) Returns the number of the current line within the screen array.
SET_COUNT(filled-rows) Sets the initial value of ARR_COUNT( ) to filled-rows.
,
LET Receiving = 4GL Expression
Variable p. 39
blob = NULL
destination .* = source . *
INSERT Clause
INSERT INTO table
Table Qualifier ,
p.46
( column )
,
LOCATE BYTE or TEXT IN MEMORY
Variable
FILE "filename"
variable
BYTE or TEXT
Variable
variable
. .*
record .first THROUGH record . last
, THRU
array [ 3 integer ]
EXIT PROGRAM
DEFINE DATABASE
Statement Statement
p. 72 DEFER Statement
p. 24 p. 24
variable
MESSAGE 31
MENU Control
Block
BEFORE MENU statement
COMMAND Block
,
MESSAGE "string"
variable ATTRIBUTE
Clause
p. 37
OPEN WINDOW window AT top-line , left-offset WITH height ROWS , width COLUMNS
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
32 OPEN WINDOW
OPEN WINDOW ,
Attribute Clause
ATTRIBUTE ( REVERSE )
WHITE BORDER
BLUE
BLACK NORMAL
BOLD
DIM
Reserved Line
Position
FIRST
+
integer
-
LAST
OPTIONS 33
,
OPTIONS COMMENT LINE FIRST
ERROR +
FORM number
MENU
-
MESSAGE
LAST
PROMPT
DELETE
INSERT
NEXT
PREVIOUS
NO WRAP
CONSTRAINED ON
Clause Default
COMMENT LAST - 1 for the 4GL screen
LINE LAST for all other 4GL windows
ERROR LINE LAST line of the 4GL screen
FORM LINE FIRST + 2 or line 3 of the current 4GL window
MENU LINE FIRST line of the 4GL window
MESSAGE LINE FIRST + 1 or line 2 of the current 4GL window
Basics
PROMPT LINE FIRST line of the 4GL window
4GL
ACCEPT KEY ESCAPE
Forms
DELETE KEY F2
Reports
INSERT KEY F1
SQL
NEXT KEY F3
SQLCA
PREVIOUS KEY F4
Debugger
HELP KEY CONTROL-W
Variables
HELP FILE None
Keys
34 OUTPUT TO REPORT
OPTIONS ,
ATTRIBUTE Clause
ATTRIBUTE ( BLINK )
BLACK REVERSE
BLUE UNDERLINE
CYAN
GREEN BOLD
MAGENTA DIM
RED INVISIBLE
WHITE NORMAL
YELLOW FORM
WINDOW
,
OUTPUT TO REPORT report ( 4GL Expression )
p. 39
blob
,
PROMPT "string" FOR response
ATTRIBUTE
Clause
p. 37 ,
ON KEY ( key ) statement END PROMPT
For values for key, see p. 28.
REPORT 35
OUTPUT ORDER BY
Section Section
p. 56 p. 57
RETURN
,
4GL Expression
p. 39
WITHOUT WAITING
,
SCROLL Field Clause DOWN
p. 46
UP BY lines
SLEEP Integer
Expression
p. 41
TO "filename"
PRINTER
,
VALIDATE Variable LIKE table .column
List
Table .*
Qualifier
p. 46
,
Variable List
variable
. .*
record . first THROUGH record . last
, THRU
array [ 3 Integer ]
Expression
p. 41
SQLERROR GO TO : label
+ + + +
ANY ERROR GOTO label
SQLWARNING STOP
CONTINUE WHILE
ATTRIBUTE Clause 37
4GL
Statement
Segments
ATTRIBUTE ,
Clause
ATTRIBUTE ( REVERSE )
BLACK BLINK
BLUE UNDERLINE
CYAN
GREEN
MAGENTA
BOLD
RED
WHITE DIM
YELLOW INVISIBLE
NORMAL
Data Type
Declaration
LIKE table . column
Table Qualifier
p. 46
4GL Data Type
4GL Simple
Data Type
INTEGER
INT
SMALLINT
DECIMAL (16)
DEC ( precision ) , scale
NUMERIC , scale ( precision ,2 )
MONEY (16, 2)
FLOAT
REAL
DATE
CHARACTER (1)
CHAR ( size ) , reserve size
VARCHAR ( maximum size ,0 )
LIKE table .*
Table Qualifier
p. 46
4GL Expression
Time Expression
p. 43
Character Expression
p. 42
Number Expression
p. 42.
Integer Expression
p. 41
4GL Boolean
Expression
p. 40
( 4GL Expression )
Named Value
variable
record .
,
array [ 3 Integer ]
Expression
p. 41
constant
Basics
4GL
Function Call Forms
function ( ) Reports
, SQL
SQLCA
4GL Debugger
Expression
p. 39 Variables
Keys
40 4GL Boolean Expression
Function Call
p. 39
TRUE
FALSE
Boolean
Comparison
String Comparison
NULL Test
p. 41
Relational Comparison
Relational
Comparison
4GL Expression = 4GL Expression
p. 39 p. 39
<
>
<=
>=
<>
!=
String Comparison
Character MATCHES criterion
Expression
p. 42 NOT LIKE ESCAPE "char"
NULL Test 41
MATCHES
Wildcard Effect
* Matches a string of zero or more characters.
? Matches any single character.
[] Matches any of the enclosed characters.
- Between characters in brackets means a range in the ASCII collating
sequence.
^ As the first character in the brackets, matches any character that is not listed.
\ Treats the next character as a literal.
LIKE
Wildcard Effect
% Matches a string of zero or more characters.
_ Matches any single character.
\ Treats the next character as a literal.
NULL Test
4GL Expression IS NULL
p. 39
NOT
blob variable
Set Membership ,
Test
4GL Expression IN ( 4GL Expression )
p. 39 p. 39
NOT
Literal Integer
digit
+
-
Number
Expression
Literal Number +
+ Named Value -
p. 39
- *
Function Call / Integer
p. 39 Expression
MOD p. 41
4GL Boolean
Expression **
p. 40
Literal Number
digit
+ . -
- . digit E digit
e +
Character
Expression
" character "
Function Call CLIPPED USING "format-string"
p. 39
Time Expression
INTERVAL Value
p. 43
DATETIME Value
p. 43
DATE Value
p. 43
DATE Value
" Numeric Date "
p. 44
Function Call USING "format string"
p. 39
Named Value
p. 39
TODAY
DATETIME Value
" Numeric Date and Time "
p. 44
DATETIME Literal
p. 44
Function Call
p. 39
Named Value
p. 39
EXTEND ( DATETIME )
Value
, DATETIME Qualifier
DATE Value p. 44
INTERVAL Value
" Numeric Time Interval "
p. 46
+ INTERVAL Literal Basics
p. 45 4GL
- Function Call Forms
p. 39
Reports
Named Value SQL
p. 39
SQLCA
Integer Expression UNITS keyword
p. 41 Debugger
Variables
Keys
44 Numeric Date
Numeric Date
mo yy
DATETIME
Qualifier
YEAR
MONTH TO YEAR
DAY TO MONTH
HOUR TO DAY
MINUTE TO HOUR
SECOND TO MINUTE
FRACTION TO SECOND
TO FRACTION
(3)
( scale )
DATETIME Literal
DATETIME ( Numeric Date
and Time
) DATETIME Qualifier
INTERVAL
Qualifier Case I: Time units smaller than MONTH
DAY
(precision) TO DAY
( 2)
HOUR
(precision) TO HOUR
( 2)
MINUTE
(precision) TO MINUTE
( 2)
SECOND
(precision) TO SECOND
( 2)
FRACTION TO FRACTION
( scale )
Case II: Time units greater than DAY ( 3)
YEAR
(y-precision) TO YEAR
( 4)
MONTH
(precision) TO MONTH
( 2)
INTERVAL Literal
INTERVAL ( Numeric Time Interval ) INTERVAL
Qualifier
p. 46
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
46 Numeric Time Interval
Numeric Time
Interval Case I: Time units smaller than MONTH
dd
space
-
hh
:
mi
:
ss
.
fffff
- -
mo
,
Field Clause
field
table reference
screen record . *
screen array [ line ]
[1] THRU
Notation
FORMONLY
Table Qualifier
OL
owner.
database : "owner."
@server
THRU Notation
first THROUGH same.last
THRU
4GL Forms
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
48 DATABASE Section
Form
Specification
Syntax DATABASE SCREEN ATTRIBUTES
Section Section Section
TABLES p. 49 INSTRUCTIONS
Section Section
p. 49 p. 49
DATABASE
Section
DATABASE FORMONLY
DATABASE Section
database WITHOUT NULL INPUT
Database Reference
DATABASE Section
Database
Reference
database
database @server
SCREEN
Section
Screen Layout
[ field-tag ]
TABLES
Section
TABLES table
ATTRIBUTES
Section
Field Description
column
,
, Attributes
p. 50
INSTRUCTIONS
Section
,
Field List
table . *
reference
last
Attributes
AUTONEXT
Attribute
AUTONEXT
COLOR Attribute
COLOR = display mode
WHERE Boolean
Expressions
for 4GL Forms
p. 51
Values for display mode consists of zero or one color and zero or more intensities:
Boolean
Expressions for AND
4GL Forms
OR
4GL Expression
(Subset)
NOT p. 39 = 4GL Expression
(Subset)
< p. 39
field-tag >
<= field-tag
>=
<> TRUE
!= FALSE
IS NULL
field-tag
( Boolean Expression )
for 4GL Forms
COMMENTS
Attribute
COMMENTS = "message "
DEFAULT
Attribute Basics
4GL
DEFAULT = value
Forms
Reports
DISPLAY LIKE SQL
Attribute
SQLCA
DISPLAY LIKE column Debugger
table . Variables
Keys
52 DOWNSHIFT Attribute
DOWNSHIFT
Attribute
DOWNSHIFT
FORMAT
Attribute
FORMAT = "format-string"
For DATE data types, format-string consists of:
Special
Characters Meaning
mm 2-digit representation of the month
mmm 3-letter abbreviation of the month
dd 2-digit representation of the day of the month
ddd 3-letter abbreviation of the day of the week
yy 2-digit representation of the year, discarding
the leading digits
yyyy 4-digit representation of the year
INCLUDE Attribute
,
INCLUDE =( value )
TO value
NULL
INVISIBLE Attribute
INVISIBLE
NOENTRY Attribute
NOENTRY
PICTURE Attribute 53
PICTURE Attribute
PICTURE = "format-string"
PROGRAM
Attribute
PROGRAM = "command "
REQUIRED
Attribute
REQUIRED
REVERSE
Attribute
REVERSE
UPSHIFT Attribute
UPSHIFT
VALIDATE LIKE
Attribute
VALIDATE LIKE column
table .
WORDWRAP
Attribute
WORDWRAP
COMPRESS
NONCOMPRESS
Reports
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
56 REPORT
Report
Specification
Syntax
REPORT report ( ) FORMAT END REPORT
, Section
p. 58
argument ) DEFINE
Section
OUTPUT ORDER BY
Section Section
p. 56 p. 57
DEFINE
Section ,
DEFINE variable data Type
Data type Declaration
(Subset) p. 37
OUTPUT
Section
1 RIGHT
BOTTOM
MARGIN size
(default = 3 lines)
ORDER BY
Section ,
ORDER BY argument
EXTERNAL ASC
DESC
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
58 FORMAT Section
FORMAT
Section
AFTER GROUP OF
Control Block
BEFORE GROUP OF
Control Block
1 PAGE HEADER
Control Block p. 59
1 ON EVERY ROW
Control Block p. 59
1 PAGE TRAILER
Control Block p. 59
1 ON LAST ROW
Control Block p. 59
AFTER GROUP OF
Control Block
AFTER GROUP OF variable statement
BEFORE GROUP
OF
Control Block
FIRST PAGE
HEADER
Control Block
FIRST PAGE HEADER statement
PAGE HEADER
Control Block
PAGE HEADER statement
ON EVERY ROW
Control Block
ON EVERY ROW statement
ON LAST ROW
Control Block
ON LAST ROW statement
PAGE TRAILER
Control Block
PAGE TRAILER statement
Report
Execution
Statements
PAUSE
"string "
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
60 PRINT
,
PRINT 4GL Expression
p. 39
BYTE variable
Character
Expression
p. 42
WORDWRAP RIGHT MARGIN temporary
TEXT variable
Aggregate Report
Functions
PERCENT (*)
GROUP COUNT
4GL Boolean
AVG ( Number Expression ) WHERE Expression
p. 42 p. 40
SUM
INTERVAL Value
MAX ( p. 43 )
MIN 4GL Expression
( p. 39 )
integer LINE
LINES
SQL Statements
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
62 ALTER INDEX
The 4GL source compiler does not recognize SQL statements identified in this Guide
by the 6.0SE icon nor SQL statements containing a clause identified by the 6.0
SE
icon. To compile 4GL source code containing such statements, you must do the
following:
1. Store the 6.0 SQL statement as a character string.
2. Set up the statement for execution by means of the PREPARE statement (see p. 79).
3. Process the statement by means of the EXECUTE statement (see p. 75).
+
Index Name
ALTER INDEX p. 92 TO CLUSTER
NOT
,
+
Table Name ADD Clause
ALTER TABLE p. 92
ADD CONSTRAINT
Clause p. 64
DROP CONSTRAINT
Clause p. 64
OL
MODIFY NEXT SIZE
Clause p. 64
LOCK MODE
Clause p. 64
ADD Clause
Add Column
ADD 6.0 Clause
p. 63
,
Add Column
( Clause )
p. 63
ALTER TABLE 63
Add Column
Clause new SQL
column Data Type
name p. 93 NOT ,
NULL Column-Level
6.0 Constraint Definition
p. 68
DEFAULT
Clause
p. 67
BEFORE column name
DROP Clause
DROP 6.0 column name
,
( column name )
MODIFY Clause
Modify Column
MODIFY 6.0 Clause
,
( Modify Column
Clause
)
Modify Column
Clause
column SQL
name Data Type
p. 93 NOT ,
NULL
6.0 Column-Level
Constraint Definition
p. 68
DEFAULT
Clause
p. 67 Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
64 BEGIN WORK
ADD
CONSTRAINT
Clause Constraint
ADD CONSTRAINT Definition
p. 68
6.0 ,
( Constraint
Definition
)
p. 68
DROP
CONSTRAINT
Clause
Constraint
DROP CONSTRAINT 6.0 Name
p. 92
,
Constraint
( Name )
p. 92
MODIFY
NEXT SIZE
Clause
MODIFY NEXT SIZE kbytes
LOCK MODE
Clause
LOCK MODE ( PAGE )
ROW
+
BEGIN WORK
Cursor
CLOSE Name
p. 92
CLOSE DATABASE 65
+
CLOSE
DATABASE
COMMIT WORK
SE
+
CREATE AUDIT FOR Table
Name
IN "pathname"
p. 92
Synonym
Name
p. 92
+
Database
CREATE Name
DATABASE p. 93
OL IN dbspace SE SE Log Clause
" databasename "
OL OL Log Clause
SE Log Clause
WITH LOG IN " pathname "
MODE ANSI
OL Log Clause
WITH LOG
BUFFERED
Basics
LOG MODE ANSI
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
66 CREATE INDEX
+
INDEX Index ON
CREATE Name Clause
p. 92 OL
UNIQUE CLUSTER
6.0
DISTINCT
FILLFACTOR percent
,
ON Clause
ON Table
Name
( column name )
p. 92
ASC
Synonym
Name DESC
p. 92
6.0
+
CREATE
PROCEDURE " filename "
FROM
Named Value
p. 103
+
Synonym
CREATE SYNONYM Name FOR Table Name
p. 92 p. 92
6.0
View Name
PUBLIC p. 92
PRIVATE
CREATE TABLE 67
, ,
Table Column Constraint
CREATE TABLE Name ( Definition , Definition )
p. 92 p. 67 p. 68
Storage
Option
p. 69
, ,
temp Temp Table Temp Table
+ TEMP table ( Column , Constraint )
TABLE name Definition Definition
p. 68
WITH NO LOG
Column Definition
SQL Data Type
column p. 93
6.0 Column-Level
NOT NULL
Constraint
DEFAULT Definition
Clause
Temp Table
Column Definition
column SQL Data Type
p. 93
6.0 Temp Table
NOT NULL
Column
DEFAULT Constraint
Clause p.68
DEFAULT Clause
Constant
DEFAULT Expression
p. 97
NULL Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
68 CREATE TABLE
Column-Level
Constraint
Definition
UNIQUE
+ +
Constraint
DISTINCT CONSTRAINT Name
6.0 p. 92
PRIMARY KEY
REFERENCES
Clause
p. 69
CHECK
Clause
p. 69
Temp-Table Column
Constraint
UNIQUE
+
DISTINCT
PRIMARY
KEY
CHECK
Clause
p. 69
Constraint ,
Definitiion
UNIQUE ( column )
+
+ Constraint
CONSTRAINT Name
DISTINCT p. 92
6.0
PRIMARY KEY ,
FOREIGN KEY ( column ) REFERENCES
Clause
p. 69
CHECK
Clause
p. 69
CREATE TABLE 69
Temp-Table
Constraint ,
Definition
UNIQUE ( column )
+
DISTINCT
PRIMARY KEY
CHECK
Clause
p. 69
REFERENCES
Clause
REFERENCES Table
Name
p. 92 6.0
,
OL
( column ) +
ON DELETE CASCADE
CHECK Clause
CHECK ( Condition
p. 91
)
Storage Option
OL
SE IN "pathname "
Basics
Extent Option 4GL
Forms
Reports
EXTENT SIZE first kpages NEXT SIZE next kpages
SQL
SQLCA
Debugger
Variables
Keys
70 CREATE TRIGGER
LOCK MODE
Clause
LOCK MODE
PAGE
ROW
6.0
+
CREATE TRIGGER Trigger
Name
Table Action
INSERT ON Name Clause
p. 92 p. 71
Insert Action
REFERENCING Clause
Clause Referencing
p. 71 p. 72
Table Action
DELETE ON Name Clause
p. 92 71
Delete Action
REFERENCING Clause
Clause Referencing
p. 71 p. 72
Update Action
REFERENCING Clause
Clause Referencing
p. 72 p. 72
Trigger Name
Identifier
p. 100
owner.
CREATE TRIGGER 71
UPDATE Clause
UPDATE
,
OF column name
Action Clause
Triggered
BEFORE Action List
p. 72 Triggered Triggered
FOR EACH AFTER
Action List Action List
ROW p. 72 p. 72
INSERT
REFERENCING
Clause
REFERENCING NEW correlation name
AS
DELETE
REFERENCING
Clause
REFERENCING OLD correlation name
AS
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
72 CREATE VIEW
UPDATE
REFERENCING
Clause
REFERENCING 1 OLD correlation
name
AS
1 NEW correlation
name
AS
ACTION Clause
Referencing
FOR EACH Triggered
ROW Action List
BEFORE Triggered Triggered
Action List AFTER Action List
,
Triggered Action ,
List
INSERT
( Statement )
p. 77
Condition
WHEN ( p. 91 ) DELETE
Statement
p. 73
UPDATE
Statement
p. 88
EXECUTE
PROCEDURE
p. 75
View SELECT
CREATE VIEW Name AS (Subset)
p. 92 , p. 82
WITH CHECK
column OPTION
( name )
+
Database
DATABASE Name
p. 93
EXCLUSIVE
DECLARE 73
INSERT
Cursor Statement
DECLARE Name CURSOR FOR +
p. 92 (Subset)
+ p. 77
WITH
HOLD
SELECT
Statement FOR
+
+ (Subset) UPDATE
p. 82
SCROLL ,
FOR
CURSOR
OF column
WITH
HOLD
SELECT
Statement
p. 82
Prepared
Statement
Name
p. 103
Table
DELETE FROM Name
p. 92
WHERE Condition
View p. 91
Name
p. 92
Cursor
Synonym CURRENT OF Name
Name p. 92
p. 92
SE
+
Table Name
DROP AUDIT FOR p. 92
Synonym
Name Basics
p. 92
4GL
Forms
Reports
+ Database SQL
DROP DATABASE Name SQLCA
p. 93
Debugger
" databasename " Variables
Keys
74 DROP INDEX
+ Index
DROP INDEX Name
p. 92
6.0
+
Procedure
DROP Name
PROCEDURE p. 92
+ Synonym
DROP SYNONYM Name
p. 92
+
Table
DROP TABLE Name
p. 92
Synonym
Name
p. 92
6.0
+
Trigger
DROP TRIGGER Name
p. 70
+
View
DROP VIEW Name
p. 92
Synonym
Name
p. 92
EXECUTE 75
+ Prepared
EXECUTE Statement
Name
p. 103 ,
USING Named Value
p. 103
6.0
+
EXECUTE Procedure
PROCEDURE Name ( )
p. 92 , ,
Argument INTO Named Value
p. 103
,
Cursor
FETCH Name INTO data variable
p. 92
+
NEXT
+
PREVIOUS
PRIOR
FIRST
LAST
CURRENT
RELATIVE
+ row position
Named Value
- p. 103
ABSOLUTE
Basics
4GL
Forms
+ Reports
Cursor
FLUSH Name SQL
p. 92
SQLCA
Debugger
Variables
Keys
76 FREE
+ TEXT or BYTE
FREE Named Value
p. 103
Prepared
Statement
Name
p. 103
Cursor
Name
p. 92
The 4GL compiler treats the name of the object to be freed in the order shown in the
diagram. In other words, the compiler looks first for a TEXT or BYTE variable having
the given name; if one exists, that is the object that is freed. If no TEXT or BYTE vari-
able having that name exists, the compiler then looks for a prepared statement or a
cursor having that name and frees that.
When a TEXT or BYTE variable has the same name as a prepared statement or cursor,
you cannot free resources allocated to the prepared statement or to the cursor.
Database-
GRANT + Level TO PUBLIC
Privileges
p. 81 ,
user
Table-
Level Table
Privileges ON Name TO PUBLIC
p. 77 p. 92
View
Name
p. 92
Synonym
6.0 Name
p. 92 ,
Procedure user
EXECUTE ON Name
p. 92
Table-Level
Privileges
ALL
PRIVILEGES
,
1 INSERT
1 DELETE
1 SELECT
+
,
( column
name
)
1 UPDATE
+
,
( column
name
)
1 6.0 REFERENCES
,
( column
name
)
1 INDEX
1 ALTER
Argument
SPL
Expression
p. 112
SPL parameter name =
SELECT
Statement
(singleton)
p. 82
,
VALUES Clause
VALUES ( Named Value )
p. 103
NULL
Constant
Expression
p. 97
Record
Reference .*
p. 104
Record
Reference . member
p. 104
Record
THRU Reference . member
p. 104
LOAD FROM 79
+
LOAD FROM " filename "
DELIMITER "delimiter"
Named Value
p. 103
Named Value
p. 103
Table
INSERT INTO Name
p. 92
,
Synonym
Name ( )
p. 92 column
View
Name
p. 92
Named Value
p. 103
+
Table
LOCK TABLE Name IN SHARE MODE
p. 92
EXCLUSIVE
Synonym
Name
p. 92
Cursor
OPEN Name
p. 92
,
USING Named Value
p. 103
Basics
Prepared
Statement Quoted 4GL
PREPARE Name FROM String
p. 103 p. 104 Forms
Reports
Named Value SQL
p. 103
SQLCA
Debugger
Variables
Keys
80 PUT
+
Cursor
PUT Name
p. 92
,
FROM Named Value
p. 103
SE
+
Table
RECOVER TABLE Name
p. 92
+
Table
RENAME COLUMN Name . old column TO new column
p. 92
+
RENAME TABLE old name TO new name
owner .
+
Table
REVOKE Table-Level ON Name FROM PUBLIC
Privileges
p. 81
p. 92 ,
View user
Name
p. 92
Synonym
Name
p. 92
Procedure
6.0 EXECUTE ON Name
p. 92
Database-Level
Privileges
p. 81
ROLLBACK WORK 81
Table-Level
Privileges
ALL
PRIVILEGES
INSERT
DELETE
SELECT
UPDATE
INDEX
ALTER
6.0 REFERENCES
Database-Level
Privileges
CONNECT
RESOURCE
DBA
ROLLBACK WORK
SE
+
Database
ROLLFORWARD Name
DATABASE p. 93
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
82 SELECT
UNION
UNION ALL
Select FROM
SELECT Clause Clause
p. 83
INTO
Clause
p. 83
+
ORDER BY INTO TEMP
Clause Clause
p. 86 p. 86
,
SELECT Clause
Select
Item
p. 83
ALL
DISTINCT
+
UNIQUE
SELECT 83
Select Item
SQL Expression
p. 96
display label
+
AS
*
Table
Name .
p. 92
View
Name .
p. 92
Synonym
Name .
p. 92
,
INTO Clause
INTO Named Value
p. 103
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
84 SELECT
,
Additional Tables
Table
Name
p. 92
table alias
View
+ Name +
p. 92
AS
Synonym
Name
p. 92
Table
OUTER Name
p. 92
table alias
View
Name
p. 92 AS
Synonym
Name
p. 92
Table
OUTER ( Name )
p. 92
table , Additional
View alias Tables
Name
p. 92 AS
Synonym
Name
p. 92
AND
WHERE Clause
Condition
WHERE p. 91
Join
p. 85
SELECT 85
Join Relational
column name Operator column name
p. 104
Table Table
Name . Name .
p. 92 p. 92
Synonym Synonym
Name . Name .
p. 92 p. 92
,
GROUP BY Clause
GROUP BY column name
Table
Name .
p. 92
table alias .
View
Name .
p. 92
Synonym
Name .
p. 92
+ select number
HAVING Clause
HAVING Condition
p. 91
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
86 SET CONSTRAINTS
,
ORDER BY Clause
ORDER BY column name
Table
Name . ASC
p. 92 DESC
table alias .
View
Name .
p. 92
Synonym
Name .
p. 92
select number
display label
rowid
WITH NO LOG
6.0
OL
+
SET ALL
CONSTRAINTS IMMEDIATE
, DEFERRED
Constraint Name
p. 92
6.0
+
SET DEBUG FILE TO " filename "
Named Value WITH APPEND
p. 103
character expression
SET EXPLAIN 87
+
SET EXPLAIN OFF
ON
OL
+
SET ISOLATION TO DIRTY READ
COMMITTED READ
CURSOR STABILITY
REPEATABLE READ
+
SET LOCK MODE TO WAIT
OL
seconds
NOT WAIT
OL
+
SET LOG
BUFFERED
6.0
+
SET HIGH
OPTIMIZATION
LOW
Basics
4GL
Forms
SE
Reports
+
Database SQL
START DATABASE Name WITH LOG IN "pathname"
p. 93 SQLCA
MODE ANSI Debugger
Variables
Keys
88 UNLOAD
+
SELECT
UNLOAD TO " filename " Statement
p. 82
DELIMITER " delimiter "
Named Value
p. 103
Named Value
p. 103
+ Table
UNLOCK TABLE Name
p. 92
Synonym
Name
p. 92
Synonym Cursor
Name CURRENT OF Name
p. 92 p.92
UPDATE 89
,
SET Clause
column name = SQL Expression
(Subset)
p. 96
SELECT
Statement
(Subset)
p. 82
Record
Reference . member
p. 104
, ,
column
( name ) = ( SQL Expression )
(Subset)
p. 96
*
SELECT
Table Statement
Name .* ( (Subset) )
p. 92 p. 82
View
Name .* Referenced
Values
p. 92
Synonym Referenced
Name .* Values
p. 92
Record
Reference . member
p. 104
Record Record
Reference . member THRU Reference . member
p. 104 p. 104
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
90 UPDATE STATISTICS
+
UPDATE
STATISTICS
Procedure
Name
p. 92
6.0 6.0
FOR
LOW TABLE Table DROP DISTRIBUTIONS
Specification
6.0
MEDIUM
FOR
TABLE Table RESOLUTION conf
Specification percent
HIGH
FOR
TABLE Table RESOLUTION percent
Specification
Table Specification
Table Name
p. 92
6.0 ,
Synonym Name ( column )
p. 92
+ GO TO :label
+
ERROR
STOP
ANY
CALL function name
WARNING
6.0
SQLWARNING
Condition 91
SQL
Segments AND
OR
Condition
Comparison
Condition
NOT
IN
Subquery
p. 92
EXISTS
Subquery
p. 92
ALL/ANY/SOME
Subquery
p. 92
Comparison
Condition
SQL Expression Relational SQL Expression
p. 96 Operator p. 96
p. 104
Column
Expression IS NULL
p. 96
NOT
Column Quoted
Expression LIKE String ESCAPE "character"
p. 96 p. 104
+ Basics
NOT
MATCHES Named
Value 4GL
p. 103 Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
92 IN Subquery
IN Subquery
SQL Expression SELECT
p. 96 IN ( (Subset) )
p. 82
NOT
EXISTS Subquery
SELECT
EXISTS ( (Subset) )
p. 82
NOT
ALL/ANY/SOME
Subquery Relational SELECT
SQL Expression ( )
p. 96 Operator (Subset)
p. 104 p. 82
ALL
ANY
SOME
Constraint Name
Index Name
Procedure Name
Synonym Name
Table Name
View Name
Identifier
p. 100
OL ' owner.'
database :
@dbservername
Cursor Name
Identifier
p. 100
Database Name 93
Database Name
Identifier
p. 100
OL @dbservername
OL "//dbservername/dbname"
Named Value
p. 103
SE
"/pathname/dbname@dbservername"
"//dbservername/pathname/dbname"
Number
Data Type
p. 94
Time
Data Type
p. 95
Large Object
Data Type
p. 95 Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
94 Character Data Type
Character Data
Type
CHAR
CHARACTER ( size )
6.0
NLS (1 )
+
NCHAR
OL
+ VARCHAR ( maximum )
6.0 , reserve
NLS ,0
NVARCHAR
Number
Data Type
INTEGER
INT
+ SERIAL
(1 )
(start)
SMALLINT
FLOAT
REAL
DECIMAL
DEC ( precision )
NUMERIC 16 , scale
+ MONEY
( precision )
16 ,2
, scale
Time Data Type 95
Time
Data Type
+ DATE
Large Object
Data Type
OL
TEXT
+
BYTE IN TABLE
blobspace
DATETIME
Field Qualifier
YEAR
MONTH TO YEAR
DAY TO MONTH
HOUR TO DAY
MINUTE TO HOUR
SECOND TO MINUTE
FRACTION TO SECOND
TO FRACTION
(3 )
(digit)
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
96 SQL Expression
+
-
*
/
6.0
||
Function
Expression
p. 98
Aggregate
Expression
p. 100
Named Value
p. 103
( SQL Expression )
Column
Expression
column name
Table
. +
@ Name
p. 92 + [first, last ]
table alias . ROWID
View
Name .
p. 92
Synonym
Name .
p. 92
When you refer to a column whose name is identical to that of a variable, you
must prefix the column name with an @ symbol; otherwise the 4GL compiler
treats it as a variable.
Constant Expression 97
Constant
Expression
Quoted String
p. 104
USER
Literal Number
+ p. 103
TODAY
CURRENT
DATETIME Field
Qualifier
p. 95
Literal DATETIME
p. 101
Literal INTERVAL
p. 102
OL
SITENAME
6.0
DBSERVERNAME
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
98 Function Expression
Function
Expression
+ DAY ( date expression )
MONTH datetime expression
WEEKDAY
YEAR
variable name
column name
Table Name .
p. 92
Algebraic Functions
p.99
6.0
Procedure SPL Expression
Name ( p. 112 )
p. 92
DBINFO Function
p. 99
Trigonometric Functions
p. 100
Algebraic Functions 99
Algebraic
Functions
SQL
ROUND ( Expression )
p. 96
, rounding factor
,0
SQL
TRUNC ( Expression )
p. 96
, truncating factor
6.0
,0
ROOT ( radicand )
, index
,2
SQRT ( integer expression )
DBINFO Function
DBINFO ( OL 'DBSPACE' , tblspace num )
expression
'sqlca.sqlerrd1'
'sqlca.sqlerrd2'
Exponential
and Logarithmic
Functions
EXP ( float expression ) Basics
4GL
LOGN ( float expression ) Forms
LOG10 ( float expression ) Reports
SQL
SQLCA
Debugger
Variables
Keys
100 Trigonometric Functions
Trigonometric
Functions
COS ( radian expression )
SIN
TAN
ATAN2 ( y, x )
Aggregate
Expression
COUNT (*)
AVG ( column
name
)
Table .
MAX DISTINCT Name
MIN p. 92
UNIQUE
SUM
COUNT ( DISTINCT
UNIQUE
AVG ( Expression
(Subset)
)
p. 96
MAX ALL
MIN
SUM
Identifier
letter
17 letter
digit
underscore
INTERVAL Field Qualifier 101
INTERVAL
Field Qualifier
YEAR
(y-precision) TO YEAR
(4)
MONTH
(precision) TO MONTH
(2)
DAY
(precision) TO DAY
(2)
HOUR
(precision) TO HOUR
(2)
MINUTE
(precision) TO MINUTE
(2)
SECOND
(precision) TO SECOND
(2)
FRACTION TO FRACTION
(f-precision)
(3)
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
102 Numeric Datetime
Numeric Datetime
yyyy
-
mo
-
dd
space
hh
:
mi
:
ss
.
f
Literal INTERVAL
INTERVAL
INTERVAL ( Numeric Interval ) Field Qualifier
p. 101
Numeric Interval
yyyy
-
mo
dd
space
hh
:
mi
:
ss
.
f
Literal Number 103
Literal Number
digit
+ .
-
. digit E digit
+
-
Named Value
variable
record .
,
3 array [ integer expression ]
Function Call
function ( )
,
integer expression
Prepared
Statement Name
Identifier
p. 100
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
104 Quoted String
Quoted String
+ " "
character
""
' '
character
' '
Record Reference
program record
record .
,
3 array [ integer expression ]
Relational
Operator
<
<=
>
=
>=
<>
!=
105
Stored It is important to recognize that Stored Procedure Language (SPL) statements are
not part of 4GL. This means that you cannot include these statements within a 4GL
Procedure program. Doing so causes compile errors.
Language
To create a stored procedure from a 4GL program, do the following:
Statements
1. Put the text of the CREATE PROCEDURE statement in a file.
2. Use a PREPARE statement to prepare a CREATE PROCEDURE FROM statement
that refers to the text file created in Step 1.
3. Use an EXECUTE statement to execute the prepared statement, which then
compiles the stored procedure.
Refer to the Informix Guide to SQL: Reference, Version 6.0 for a full description of the
CREATE PROCEDURE statement.
You may explicitly invoke stored procedures from within your 4GL program by
preparing and executing the following SQL statements:
• CREATE PROCEDURE FROM
• DROP PROCEDURE
• EXECUTE PROCEDURE
• GRANT
• INSERT INTO
• REVOKE
• SET DEBUG FILE TO
• UPDATE STATISTICS
Refer to the Informix Guide to SQL: Reference, Version 6.0 for a description of
working with dynamic SQL.
Also, you may implicitly invoke a stored procedure through a reference to that
procedure within the context of an SQL expression. For example, the reference to
avg_price( ) in the following SELECT statement implicitly invokes the stored pro-
cedure having the name avg_price:
select
manu_code, unit_price,
(avg_price(1) - unit_price) variance
from stock Basics
where stock_num = 1 4GL
Forms
Such implicit references to stored procedures do not require the Reports
statement to be prepared. SQL
SQLCA
Debugger
Variables
Keys
106 CALL
Procedure
CALL Name ( ) ;
p. 92
, ,
procedure
Argument RETURNING variable
Argument SPL
Expression
p. 112
parameter name =
SELECT
Statement
(Subset)
p. 82
CONTINUE FOR ;
WHILE
FOREACH
,
variable SQL Data Type Default
DEFINE GLOBAL
name (Subset) DEFAULT
Value
;
p. 93 p. 107
OL REFERENCES BYTE DEFAULT
NULL
TEXT
,
variable SQL Data Type
name (Subset)
p. 93
OL REFERENCES BYTE
TEXT
Table Name
LIKE p. 92 . column
Synonym
Name
p. 92
View Name
p. 92
PROCEDURE
EXIT 107
Default Value
Constant
Expression
p. 97
NULL
EXIT FOR ;
WHILE
FOREACH
,
variable Statement
FOR name IN ( left
expression
TO right
expression
) Block END
p. 108 FOR
;
increment
STEP expression
,
expression
= left
expression
TO right
expression
increment
STEP expression
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
108 FOR
Statement
Block
CALL
DEFINE ON Statement
Statement EXCEPTION p. 106
p. 106 Statement
p. 111 CONTINUE
Statement
p. 106
EXECUTE PROCEDURE
Statement
see SQL:S, Version 6.0
EXIT
Statement
p. 107
FOR
Statement
p. 107
FOREACH
Statement
p. 109
IF
Statement
p. 109
LET
Statement
p. 111
RAISE EXCEPTION
Statement
p. 111
RETURN
Statement
p. 111
SYSTEM
Statement
p. 111
TRACE
Statement
p. 112
WHILE
Statement
p. 112
SQL Statement
EXECUTE Procedure
PROCEDURE Name ( )
p. 92 ,
variable
INTO name
,
SPL
Expression
(Subset)
variable p. 112
name =
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
110 IF
IF Statement List
Statement
BEGIN Block END
p. 108
CALL
Statement
p. 106
CONTINUE
Statement
p. 106
EXIT
Statement
p. 107
FOR
Statement
p. 107
FOREACH
Statement
p. 109
IF
Statement
p. 109
LET
Statement
p. 111
RAISE EXCEPTION
Statement
p. 111
RETURN
Statement
p. 111
SYSTEM
Statement
p. 111
TRACE
Statement
p. 112
WHILE
Statement
p. 112
SQL Statement
LET 111
,
, ,
variable Procedure SPL
LET name = Name ( Expression ) ;
p. 92 p. 112
called
variable =
,
SPL
Expression
p. 112
Statement
ON EXCEPTION Block END EXCEPTION
p. 108
, ;
error
IN ( number )
RAISE
EXCEPTION SQL error ;
, ISAM error
, error text
RETURN ;
,
SPL
Expression
p. 112
WITH RESUME Basics
4GL
Forms
SYSTEM " character expression " ;
Reports
character variable SQL
SQLCA
Debugger
Variables
Keys
112 TRACE
TRACE ON ;
OFF
PROCEDURE
SPL
Expression
Condition Statement
WHILE Block END WHILE
p. 91
p. 108
;
SPL Expression
SQL Expression
p. 96
||
procedure +
variable
name -
*
( SPL )
/ Expression
,
Procedure
Name ( SPL )
p. 92 Expression
called =
variable
SQLCA Record
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
114
Summary of fields:
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
116
Interactive
Debugger
Commands
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
118
The following table lists the Debugger commands, options, and accelerators.
After setting a breakpoint (or tracepoint), the Output text region displays:
checkpoint scope
/ pattern
? pattern
Command
List
p. 127
CLEANUP
CL
ALL
CONTINUE
CO
DATABASE database
DA
INFORMIX-SE //servername/path/database
DISABLE Checkpoint
DI Identification
p. 126
DUMP Scope
DU List
p. 128
Output
Redirection
p. 127
Checkpoint
ENABLE Identification Basics
EN p. 126
4GL
Forms
Reports
EXIT SQL
EX SQLCA
Debugger
Variables
Keys
122 FUNCTIONS
FUNCTIONS
F
pattern
Output
Redirection
p. 127
Pattern Matches
GROW integer
G
SOURCE –
COMMAND
HELP
H
command
ALL
LIST
LI
BREAK
TRACE
NOBREAK 123
NOBREAK Checkpoint
NOB Identification
p. 126
NOTRACE Checkpoint
NOT Identification
p. 126
READ filename
RE
.4db
RUN
RU
argument
To pass arguments to the p-code runner, include them on the
Debugger command line.
Basics
STEP 4GL
S Forms
number INTO NOBREAK
Reports
SQL
SQLCA
Debugger
Variables
Keys
124 TIME DELAY
COMMAND
Checkpoint
TRACE Initialization FUNCTIONS
TR p. 126
Checkpoint Command Output
Target List Redirection
p. 127 p. 127 p. 127
TURN AUTOTOGGLE
TU
ON DISPLAYSTOPS
OFF EXITSOURCE
PRINTDELAY
SOURCETRACE
USE
US ,
=
pathname
VARIABLE Scope
VA List
p. 128
Output
Redirection
p. 127
Scope variable
Qualification
p. 128
VIEW 125
VIEW function
VI
filename
number
LINE
WHERE
WH
Output
Redirection
p. 127
WRITE
WR
filename
BREAK
>>
TRACE
ALIAS
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
126 Checkpoint Identification
4GL
Interactive
Debugger
Command
Segments
Checkpoint
Identification
reference number
reference name
function name
ALL
Checkpoint
Initialization
Checkpoint Target
statement line
module .
Scope variable
Qualification
p. 128
function name
Command List
;
{ command }
Output Redirection
>> filename
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
128 Scope List
Scope List
GLOBALS
ALL
Scope Qualification
GLOBAL .
MODULE. module
FUNCTION. function
Environment
Variables
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
130 Environment Variables
INFORMIX-4GL Reference
NLS Environment Variable Page
COLLCHAR E-18
DBAPICODE E-23
DBNLS E-16
LANG E-25
LC_COLLATE E-27
LC_CTYPE E-29
LC_MONETARY E-31
LC_NUMERIC E-35
INFORMIX-4GL Reference
UNIX Environment Variable Page
PATH D-40
TERM D-41
TERMCAP D-41
TERMINFO D-42
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
132 Environment Variables
Default Key
Assignments
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
134 Default Key Assignments
Key
Name Purpose of Key Default Keystroke
Accept Selects the current menu option in a MENU Escape
statement; terminates input during CONSTRUCT,
INPUT and INPUT ARRAY; terminates DISPLAY
ARRAY.
Interrupt Represents the external interrupt signal; available CONTROL-C
when interrupts are deferred with the DEFER
statement.
Insert Requests insertion of a new line during INPUT F1
ARRAY, starting execution of a BEFORE INSERT block.
Delete Requests deletion of the current line during INPUT F2
ARRAY, starting execution of a BEFORE DELETE
block.
Next Causes scrolling to the next page (group of lines) F3
during DISPLAY ARRAY and INPUT ARRAY.
Previous Causes scrolling to the previous page (group of lines) F4
during DISPLAY ARRAY and INPUT ARRAY.
Help Starts the display of the specified HELP message from CONTROL-W
the current help file.
Quit Terminates the program unless DEFER QUIT is CONTROL-\
specified.
Effect of special keys on interactive 4GL statements and within 4GL menus:
Basics
4GL
Forms
Reports
SQL
SQLCA
Debugger
Variables
Keys
136 Default Key Assignments