NOTICE: Our Community is moving. Get more information. Updated information on a New Login Process
What happens if I try to perform clipper queries or Impact analysis on items that appear in the declaratives section, or are used within SQL Whenever statements?
The Declarative Section of a Cobol program is used to define sections and paragraphs, that are performed after any file access is performed. This will normally be checking the file status and performing some error recovery work, and allows the programmer to define the actions to be taken.
With Embedded SQL statements there is a similar concept, which is the SQL WHENEVER clause.
The SQL WHENEVER clause work against the SQL CODE that is set once an SQL statement has completed. This is a way to code generic error handling for SQL statements.
When clipper queries or impact analysis is run against a program with a declaratives section or SQL Whenever, just the actual code that appears in the relevant statement will be analysed, not every file access or SQL statement.
This means that, for example a paragraph within the declaratives section will only seem to be executed once within a program and a paragraph mentioned within a SQL Whenever will only seem to be called by the SQL Whenever statement. In actual fact, the declaratives paragraph could be called after every file access and the SQL Whenever paragraph could be called after any SQL statement.
Note: Changing these items may have a larger impact than Enterprise Analyzer indicates.
Incident # 2610150