|
The Pervasive PSQL relational interface includes support for COBOL OCCURS constructs, partial REDEFINES, and variable record layouts.
A partial REDEFINE redefines a portion of the data within a record (such as a 05 level within a 01 level). A variable record layout is also referred to as a REDEFINES because the entire record is being redefined. To avoid confusion with terminology, this section refers to partial REDEFINES and to variable record layouts.
No changes are required to your COBOL application to take advantage of the SQL access.
You enable SQL access by describing the application's understanding of data to the Pervasive PSQL relational interface. In developer's terms, you define the metadata to the relational interface.
Note that this section applies only to COBOL applications that include OCCURS, partial REDEFINES, or variable record layouts.
The following restrictions currently apply to providing SQL access for COBOL applications.
The following table lists the use of SQL statements with data tables created from OCCURS, partial REDEFINES, or variable record layouts.
|
Statement
|
Use with OCCURs and partial REDEFINES
|
Use with Variable Record Layouts
|
Notes
|
|---|---|---|---|
|
ALTER TABLE
|
No
|
No
|
|
|
CREATE INDEX
|
No
|
No
|
|
|
CREATE INDEX IN DICTIONARY
|
No
|
Yes
|
|
|
CREATE TRIGGER
|
No
|
No
|
|
|
DELETE
|
No
|
Yes
|
|
|
DROP TABLE
|
Yes
|
Yes
|
A DROP TABLE statement removes all of the entries from the system tables. The data file itself is not deleted or modified. Also, when you drop a main table, a message informs you to drop any dependent tables if any are detected. A dependent table depends on a main table and results from conditions such as an OCCURS that contains an index or from partial REDEFINES. Once you drop the dependent tables, you can drop the main table.
|
|
INSERT INTO
|
No
|
No
|
|
|
UPDATE
|
Yes
|
Yes
|
An UPDATE statement cannot update a column on which a table filter has been defined. A table filter is a logical expression associated with a table. Table filters are defined as part of your metadata in the XML files.
|
|
all other SQL statements listed in SQL Engine Reference.
|
Yes
|
Yes
|
See Grammar Statements in SQL Engine Reference.
|
|
Chapter contents
Prev topic: SQL Access for COBOL Applications
|