While allocating KSDS Datasets, free space is declared at regular intervals at the time of initial loading This is done because this free space is utilized for keeping the data arranged in sequence physically, even though inserted randomly
Technology problems
Search Results
1. What is the need to code COMMITS in batch programs?
Correct Answer: COMMIT statements are used to release locks which are required for that unit of work, and then permit a new unit of work In other words, if COMMITS are not coded in the program and the program has been sent for execution, then while processing, in place of just going back to a few inserts since the nearest commit, the program has to go back to the inserts which were made during the entire run of the program This extra process takes around twice or thrice the time taken normally
2. How can record locking be achieved in those DB2 versions which do not support it?
Correct Answer: CURSOR STABILITY: - CS is a row level locking - Acquires an exclusive lock on the row that is to be updated - When the control is moved to the next updatable row, the lock is released REPEATABLE READ: - RR is a page level locking - Acquires an exclusive lock on the entire page which is the source of row availability - When the control is moved to the next updatable page the lock is released
Correct Answer: - A status occurs when image copy on a table needs to be taken - The table is available only for queries and can not be updated - COPY PENDING status can be removed by taking away the image copy or by using REPAIR utility
6. What is the difference between primary key & unique index ?
Correct Answer: Primary key : a relational database constraint Primary key consists of one or more columns that uniquely identify a row in the table For a normalized relation, there is one designated primary key Unique index: a physical object that stores only unique values There can be one or more unique indexes on a table
7. What do you accomplish by GROUP BY ... HAVING clause?
Correct Answer: GROUP BY partitions the selected rows on the distinct values of the column on which you group by HAVING selects GROUPs which match the criteria specified
Correct Answer: A31 The self-referencing constraint limits in a single table the changes to a primary key that the related foreign key defines The foreign key in a self referencing table must specify the DELETE CASCADE rule
9. File contains 5 records say D,E,F,C,A-I want to copy D and A records only by using file-aid?
Correct Answer: Go to file-aid copy optionEnter the from dataset to be copied and to dataset to which you want to copygo to options Enter 0 at Initial records to skip fieldThen enter 3 at the no of records to skip field and 1 to no of records to selectpress enter and PF3
10. My SQL statement SELECT AVG(SALARY) FROM EMP yields inaccurate results. Why?