isCOBOL DatabaseBridge : Runtime Options and Configuration : The EDBI-WHERE-CONSTRAINT external variable
The EDBI-WHERE-CONSTRAINT external variable
Edbi-where-constraint is used to specify an additional WHERE condition for a succeeding START operation.
If you want to query city names that start with "A", add the following to your code:
WORKING-STORAGE SECTION.
01 edbi-where-constraint  pic x(300is external.
...
PROCEDURE DIVISION.
...
*> to specify edbi-where-constraint
 
MOVE SPACES TO  edbi-where-constraint
OPEN I-O INVOICE
MOVE "city_name like 'A%'" to  edbi-where-constraint
MOVE SPACES TO INV-KEY
START INVOICE KEY IS NOT LESS INV-KEY
The A4GL-WHERE-CONSTRAINT external variable
The EDBI routines work in Acucobol-GT compatibility in these two cases
if they are generated by the EDBIIS command and the -ca option is used on the EDBIIS command line, or
if they are generated by the isCOBOL Compiler and the COBOL program is compiled with -ca option and iscobol.compiler.easydb (boolean) set to true.
When the Acucobol-GT compatibility is active, the A4GL-WHERE-CONSTRAINT external variable is evaluated instead of EDBI-WHERE-CONSTRAINT. The definition and usage of A4GL-WHERE-CONSTRAINT are the same as EDBI-WHERE-CONSTRAINT. The only difference between these two external data items is that A4GL-WHERE-CONSTRAINT is automatically initialized before the next START statement.
If you want to query city names that start with "A" in Acucobol-GT compatibility, add the following to your code:
WORKING-STORAGE SECTION.
01 a4gl-where-constraint  pic x(300is external.
...
PROCEDURE DIVISION.
...
*> to specify a4gl-where-constraint
 
MOVE SPACES TO  a4gl-where-constraint
OPEN I-O INVOICE
MOVE "city_name like 'A%'" to  a4gl-where-constraint
MOVE SPACES TO INV-KEY
START INVOICE KEY IS NOT LESS INV-KEY
Note - Setting either EDBI-WHERE-CONSTRAINT or A4GL-WHERE-CONSTRAINT affects all the next START statements on any file, therefore it’s good practice to initialize these external data items just after the interested START has been performed, to avoid "invalid column name" errors.