Was this helpful?
Basic Statement Types
For each operation in a 4GL specification, you specify one or more 4GL statements. 4GL includes these basic types of statements:
Declaration statements
Forms-control statements
Database access statements
Flow-control statements
Call statements
File access statements
Inquiry statements
Session connection statements
Each operation consists of a specific sequence of these statements between the keywords begin and end or between a pair of braces.
Separate individual 4GL statements with semicolons, as in this syntax:
callframe newframe;
For parameter lists in callframe and callproc and local data declarations, you can use a semicolon or a comma as a separator. For example, in the where clause of the statement below, you can use either a semicolon or a comma after the first expression.
callframe empframe (empframe.emptbl =
        select * from emp 
        where mgr := :mgr, dept := :dept);
In addition, 4GL accepts an empty declaration so that you can terminate the list of declarations with a comma or semicolon. This following example contains an empty declaration after the comma:
initialize ( ) =
        declare
            x = integer not null,
        { }
Last modified date: 11/09/2022