17.Q: What is the purpose of an OPEN CURSOR?
A: Normally the cursor will be met on the primary row. If we have an Order by clause, the rows will be available for the fetch statement.
18.Q: Is the use of DCLGEN compulsory and if it isn’t what is the reason for using it anyway?
A: DCLGEN is used for finding column names that have bad spelling and other things when the compiling is made. DCLGEN is a tool that is good for reducing the errors by creating accurate definitions for the host variable.
19.Q:What is the meaning of and where do we use REORG?
A: REORG is meant for rearranging physical data storage of rows for the purpose of regaining lost free space after massive updates have been performed or other operations like deletes or inserts or after the fragmentation of segmented tablespace.
20.Q:In what way is primary key different from unique index?
A: Primary key: It means a set of columns which can identify rows in a table in an individual way, usually we will assign a single primary key. A unique index is a physical object which is depositing just unique values. A table may contain a single or multiple unique indexes.
21.Q:Is it true that views can be updatable?
A: Yes but not al. Many of them like in the following example: one table view with every field or mandatory fields. The rest are not updatable, these views are joins, they have aggregate functions like MIN and their Group-by cause.
22.Q:What is the difference between inner and outer join?
A: Inner join joins information from at least two tables making a comparison of every value that fits the search parameters. Outer joins has matching and not matching rows returned as well. Outer joins have no particular operators, they can be imitated by using a join with a sub query and a UNION.
23.Q:What is the meaning of NOT NULL WITH DEFAULT and when is it used?
A: This means that a column is not able to have insertions of while and null, if there is no value given we will have zeroes if it is numeric, spaces if is a character and date/time. This is meant when we don’t need nulls but we also don’t have a value at each row insert.
24.Q:How can we restore data that was made in ESDS files?
A: We can do this by defining the file like a recoverable file. If we had insertions of record into it it possible that we will have to delete the records logically with a batch program.
25.Q: How can we describe Examine and Inspect?
A:Actually they are doing the same process with some differences, they are bothe string verbs in COBOL. Inspect has more power than Examine that is why in the latest versions of COBOL we will not find Examine anymore.