The Database Services Utility is an application program; like any other program, it must be preprocessed before you can run it. Usually, the utility is preprocessed during database installation. At that time, the RUN privilege to use the utility is granted to prospective users; you must possess the RUN privilege to use the utility. Your system programmer can tell whether the Database Services Utility is properly installed and whether you are authorized to use it.
The ddname parameter of a Database Services Utility command identifies an EBCDIC, standard-label sequential data file needed by that command for input or output. Magnetic tape with a fixed, unblocked record format and a logical record length and block size of 2 048 bytes is used as a default for these sequential files. (The record format required varies for each command.)
As indicated in the command descriptions, you can override the defaults and assign files to a direct access storage device (DASD). A sequential file allocated to magnetic tape can reside on any device supported by the VSE DTFMT macro; files allocated to direct access storage can reside on any device supported by the VSE DTFSD macro. An exception to this is VSAM managed SAM files, which do not support spanned records. Spanned records are used by UNLOAD TABLE/DBSPACE and RELOAD TABLE/DBSPACE processing and, in some cases, by DATALOAD and DATAUNLOAD.
You can invoke the Database Services Utility in a VSE batch partition or in a VSE/ICCF interactive partition. The Database Services Utility does not use VSE dynamic device assignment. Logical units SYS004 and SYS005, respectively, must be used for input and output files allocated to magnetic tape: SYS006 and SYS007, respectively, must be used for input and output files allocated to direct access storage. Under VSE, all magnetic tape files processed by the Database Services Utility must be EBCDIC standard-label files, and only magnetic tape input files are rewound.
Special consideration should be given to the database log when using the Database Services Utility to load large amounts of data. The log must be large enough to contain all the log data generated during Database Services Utility RELOAD DBSPACE, RELOAD TABLE, or DATALOAD command processing. Log space used as a result of Database Services Utility processing is not freed until an SQL COMMIT or ROLLBACK is executed. If the log space is filled by Database Services Utility processing, a Database Services Utility processing error occurs. Your system programmer can tell whether there is enough log space to contain all the log data generated during Database Services Utility command processing.
A minimum 2000K byte virtual partition is recommended to execute the Database Services Utility with single user mode for VSE archive mode on. The sample VSE job control statements in Figure 56 invoke the Database Services Utility in single user mode with DB2 Server for VSE archive mode on:
Figure 56. Single User Mode Job Control
Each job control statement is described below:
Identifies and initiates the job control.
When the database manager is installed, your installations have the option of generating a starter database as described in the DB2 Server for VSE Program Directory. The procedure ARIS71PL contains the job control statements that identify the DB2 Server for VSE & VM library. Procedure ARIS71DB contains the job control statements that are required to access the starter database. You must execute a different procedure to access a different database. Alternatively, you can code the actual DB2 Server for VSE database and library definition job control statements in place of the EXECUTE PROCEDURE statements.
To determine the database and library definition statements required, contact the person who installed the database or refer to the DB2 Server for VSE Program Directory, which contains a description of the starter database and library definition job control statements and procedures.
This job control statement is optional. It identifies a sequential (SAM) magnetic tape file used for Database Services Utility input and/or output data. The file can reside on any type of volume supported by the VSE DTFMT macro.
Note: | Tape files processed by the Database Services Utility under VSE must be EBCDIC, standard-label files. |
Any number of these commands (each having a unique file name) can be included in the job control. Each file name defined is normally referenced by a ddname parameter in a Database Services Utility command that is contained in the SYSIPT control command input. Input magnetic tapes are rewound by Database Services Utility OPEN processing, but output magnetic tapes are not rewound. For input files other than the first file on a tape volume, a file sequence number must be specified, corresponding to the original position of that file on the tape.
This job control statement is optional. It identifies a sequential (SAM) DASD file used for Database Services Utility input or output data. The file can reside on any type of volume supported by the VSE DTFSD macro.
Any number of these statements (each having a unique file name) can be included in the job control. Each file name defined is normally referenced by a ddname parameter in a Database Services Utility command contained in the SYSIPT control command input. Job control EXTENT statements are required to complete the description of the file identified by the DLBL statement.
This job control statement is required if a Database Services Utility sequential (SAM) input data file is allocated to a magnetic tape device. It defines the logical unit SYS004 for a tape input file.
This job control statement is needed if a Database Services Utility sequential (SAM) output data file is allocated to a magnetic tape device. It defines the logical unit SYS005 for a tape output file. A large block size is recommended for a tape output file to improve performance.
This job control statement is needed if a Database Services Utility sequential (SAM) input data file is allocated to a direct access device. It defines the logical unit SYS006 for a DASD input file.
This job control statement is needed if a Database Services Utility sequential (SAM) output data file is allocated to a direct access device. It defines the logical unit SYS007 for a DASD output file.
This statement identifies the database entry point (ARISQLDS), and contains the required SIZE=AUTO specification and the job control parameters to execute the Database Services Utility program with single user mode.
The job control parameters that you must specify are:
SYSMODE=S indicates that you want single user execution mode. PROGNAME=ARIDBS identifies the Database Services Utility program entry point. LOGMODE=A identifies that the database manager should operate with archive and logging on.
All single user mode startup parameters and log mode considerations are described in the DB2 Server for VSE System Administration manual. Consult a system programmer about the startup parameters; your installation might specify additional parameters for performance reasons.
Database Services Utility control commands and user data input.
Indicates the end of Database Services Utility SYSIPT input when SYSIPT is assigned to the reader file.
Indicates the end of the job.
The sample job control and commands shown in Figure 57 run the Database Services Utility with single user mode to perform the following functions:
Figure 57. Single User Mode Job Control Example
// JOB DBS UTILITY EXAMPLE VSE SINGLE USER MODE JOB CONTROL // EXEC PROC=ARIS71PL <--DB2 Server for VSE Production Library Definition // EXEC PROC=ARIS71DB <--DB2 Server for VSE Starter Database Definition // TLBL TAPE1,'DBSU-FILE1',0,SQLDAT,1,1 <--Tape File#1 // TLBL TAPE2,'DBSU-FILE2',0,SQLDAT,1,2 <--Tape File#2 // ASSGN SYS005,280 <--Tape output // MTC REW,SYS005 <--Rewind tape // EXEC ARISQLDS,SIZE=AUTO,PARM='SYSMODE=S,LOGMODE=Y,PROGNAME=ARIDBS' CONNECT SQLDBA IDENTIFIED BY SQLDBAPW; UNLOAD TABLE(DEPARTMENT) OUTFILE(TAPE1) UNLOAD TABLE(ACTIVITY) OUTFILE(TAPE2) /* /& |
The VSE job control statements in Figure 58 invokes the Database Services Utility in multiple user mode:
Figure 58. Multiple User Mode Job Control
// JOB DBSUTIL // EXEC PROC=ARIS71PL <--DB2 Server for VSE Production Library Definition // TLBL file name,....... // DLBL file name,....... // ASSGN SYS004,......... // ASSGN SYS005,......... // ASSGN SYS006,......... // ASSGN SYS007,......... // EXEC PGM=ARIDBS,SIZE=AUTO,PARM='DBNAME(SQLDB1_TOR_INV)' ....DBS control commands and optional user data /* /& |
The job control statements in Figure 58 do the same things as the corresponding statements in Figure 56. The database manager must already be running when you invoke the Database Services Utility (or any other application program) with multiple user mode. To execute the Database Services Utility with multiple user mode, at least a 200K byte virtual partition is recommended. DBNAME=SQLDB1_TOR_INV identifies the application server on which to process the Database Services Utility job. If the DBNAME parameter is not specified, the default application server is accessed.
The example job control and commands shown in Figure 59 run the Database Services Utility with multiple user mode to perform the following functions:
Figure 59. Multiple User Mode Job Control Example
// JOB DBS UTILITY EXAMPLE VSE MULTIPLE USER MODE JOB CONTROL // EXEC PROC=ARIS71PL <--DB2 Server for VSE Production Library Definition // DLBL DASDI,'DBSU-FILE',0 <--DASD input file // EXTENT SYS006,sqlwkl,1,0,57,76 <--DASD input file // ASSGN SYS006,150 <--DASD input // DLBL DASD0,'DBSU-FILE',0 <--DASD output file // EXTENT SYS007,sqlwkl,1,0,57,76 <--DASD output file // ASSGN SYS007,150 <--DASD output // EXEC PGM=ARIDBS,SIZE=AUTO,PARM='DBNAME(SQLDB1_TOR_INV)' CONNECT SQLDBA IDENTIFIED BY SQLDBAPW; UNLOAD DBSPACE(PUBLIC.SAMPLE) OUTFILE(DASD0 PDEV(DASD)) RELOAD DBSPACE(PUBLIC.SAMPLE) PURGE INFILE(DASDI PDEV(DASD) BLKSZ(2048)) /* /&
|