StorageTek 312564001 Manuale Utente

Pagina di 189
 
 
DB2 Manager User Guide 
103 
 StorageTek 
Proprietary 
 
 
Contents of character positions 72-80 in each record will be ignored.  A 
maximum of 15 records may be present in the SQLIN file. 
Pre-fetch rules are specified in the format of a standard DB2-compatible SQL 
SELECT command, which must have the general format: 
SELECT key1, key2, .... keyn FROM table_name  
WHERE pre-fetch_criteria 
where ‘key1’, ‘key2’, …. ‘keyn’ are the names of the columns which are used 
to establish a unique key for each row in the database, ‘table_name’ is the 
name of the DB2 table which is to be processed by the utility, (ie. the name of 
the table itself, not the view of the table created during product installation 
processing), and ‘pre-fetch_criteria’ are the criteria specified by the user for 
selection of rows which are to be pre-fetched by Archive Manager (eg): 
SELECT ACCOUNT, SUBCODE FROM OTDBTEST.TAB1  
WHERE ACNO = ‘123456789’ 
Note that pre-fetch criteria are specified using the standard DB2-compatible 
SQL criteria specification format.  Note also that where more than one unique 
index exists for the table, keys from any of these indexes may be used in the 
SELECT statement.   In these circumstances, the choice of unique key(s) 
should be influenced by the search argument, in order to allow selection of 
rows for pre-fetching to be performed via INDEXONLY processing where 
possible.   
The pre-fetch utility will cause this statement to be validated by DB2 for 
correct SQL syntax.  Any invalid specification will cause an SQL error to be 
received by the utility, which will cause it to terminate with a condition code of 
12.  In these circumstances, the SQL statement should be corrected and the 
job restarted. 
Print reports 
The pre-fetch utility will write a number of print reports to the SYSPRINT 
dataset during execution.  These consist of: 
•  Parameter specification and validation report.   This will contain a list 
of SYSIN parameters specified (or defaulted) for execution of the utility, 
and a validation error report if errors are detected in parameter 
specification.  It will also specify the SQL pre-fetch selection statement 
coded in the SQLIN file. 
•  Execution report.   Any errors or warning conditions encountered during 
execution of the utility will be identified in this report.   
•  Detail processing report.  If PRINT=DETAIL has been specified (or 
allowed to default) in the execution parameter file,  a detail print line will 
be written for each pre-fetch request passed to Archive Manager.  This 
will contain the following information: 
o  Request type (add to batch, or process batch) 
o  Archive Manager database identifier