DB2 Server for VSE & VM: Data Restore Guide


Using the DESCRIBE Command

Figure 138 shows how to use the DESCRIBE function in a VM environment.

Figure 137. JCL for the DESCRIBE function in VSE

         // JOB DESCRIBE
(1) ---> // LIBDEF *,SEARCH=(PRD2.RCVvrm)
(2) ---> // TLBL ARCHIV,'ARCHIVE.DB2'
(3) ---> // ASSGN SYS006,180
(4) ---> // MTC REW,SYS006
(5) ---> // EXEC XTS91001,SIZE=AUTO
(6) ---> DESCRIBE
(7) ---> /*

Statement 1
Specifies the Data Restore library. You must specify the Data Restore library for the DESCRIBE function.

Statement 2
Identifies the label on the tape.

Statement 3
Assigns the tape drive.

Statement 4
Rewinds the tape to the first file.

Statement 5
Executes the program XTS91001.

Statement 6
Performs the DESCRIBE function as requested.

Statement 7
Ends the SYSIN file.

Sample Procedure (VM).

Figure 138. EXEC for the DESCRIBE Function in VM

         /**/
(1) ---> 'TAPE REW'
(2) ---> 'FILEDEF ARCHIV TAP1 SL 1 (RECFM VB BLOCK 32760'
(3) ---> 'FILEDEF SYSPRINT DISK XTS91001 SYSPRINT A'
(4) ---> 'FILEDEF SYSIN DISK RESTORE SYSIN A'
(5) ---> 'XTS91001'

Statement 1
Rewinds the tape to its first file.

Statement 2
Identifies the label on the tape.

Statement 3
Specifies the destination of the SYSPRINT file.

Statement 4
Identifies the input source for the DESCRIBE function.

Statement 5
Executes the program XTS91001.

The SYSIN file must contain the following statements:

Figure 139. Input Statements for the DESCRIBE Function

 (6) ---> DESCRIBE

Statement 6
Specifies the function to perform. In this case, the DESCRIBE function.

Figure 140 shows an example of a report after completing the DESCRIBE function on a DB2 FULL archive. Message XTS9-136 shows that the archive in the example was taken on February 10th, 1997 at 09:03:11. Message XTS9-007 at the end of the report indicates that the DESCRIBE function executed successfully. The rest of the report lists the tables that you can reload.

Figure 140. Output from the DESCRIBE Function Using a DB2 FULL Archive

     XTS9-143 CONTROL BASE=SQLDBA
     XTS9-143 DESCRIBE
     XTS9-143 /*
     XTS9-196 Do you want to continue the DESCRIBE process ?
     XTS9-406 Enter 0(CANCEL) or 1(CONTINUE)
     XTS9-403 Reply is 1
     XTS9-100 Data Restore feature VERSION 7.1.0
     XTS9-136 Processing SQLDBA  archived on (02/10/97-09:03:11)
 --> XTS9-229 The file is a DB2 FULL archive
     XTS9-013 Table SQLDBA  .ACTIVITY     may be reloaded
     XTS9-013 Table SQLDBA  .DEPARTMENT   may be reloaded
     XTS9-007 Processing successfully completed

Figure 141 shows an example of a report after completing the DESCRIBE function on a DB2 regular archive.

Figure 141. Output from the DESCRIBE Function Using a DB2 FULL Archive

     XTS9-143 CONTROL BASE=SQLDBA
     XTS9-143 DESCRIBE
     XTS9-143 /*
     XTS9-196 Do you want to continue the DESCRIBE process ?
     XTS9-406 Enter 0(CANCEL) or 1(CONTINUE)
     XTS9-403 Reply is 1
     XTS9-100 Data Restore feature VERSION 7.1.0
     XTS9-136 Processing SQLDBA  archived on (02/10/97-09:43:25)
 --> XTS9-229 The file is a DB2 regular archive
     XTS9-013 Table SQLDBA  .ACTIVITY     may be reloaded
     XTS9-013 Table SQLDBA  .DEPARTMENT   may be reloaded
     XTS9-007 Processing successfully completed

You can use the DESCRIBE function to get information on the date and time of a previous archive. Figure 142 and Figure 143 show how to use the DESCRIBE function in the VSE and VM environments.

Figure 142. JCL to View the Contents of a Tape (VSE)

         // JOB DESCRIBE						
(1) ---> // LIBDEF *,SEARCH=(PRD2.RCVvrm)
(2) ---> // TLBL ARCHIV,'ARCHIVE.DB2'
(3) ---> // ASSGN SYS006,180
(4) ---> // MTC REW,SYS006
(5) ---> // EXEC XTS91001,SIZE=AUTO
         CONTROL
(6) ---> DESCRIBE
(7) ---> /*

Statement 1
Specifies the DB2 for VSE Library for the DESCRIBE function. (You must specify the DB2 library.)

Statement 2
Identifies the label on the tape.

Statement 3
Assigns the tape drive.

Statement 4
Rewinds the tape to the first file.

Statement 5
Executes the program XTS91001.

Statement 6
Processes the DESCRIBE function as requested.

Statement 7
Ends the SYSIN.

Figure 143. EXEC to List the Contents of a Tape (VM)

         /**/
(1) ---> 'TAPE REW'
(2) ---> 'FILEDEF ARCHIV TAP1 SL 1 (RECFM VB BLOCK 32760'
(3) ---> 'FILEDEF SYSPRINT DISK XTS91001 SYSPRINT A'
(4) ---> 'FILEDEF SYSIN DISK DESCRIBE SYSIN A'
(5) ---> 'XTS91001'

Statement 1
Rewinds the tape to its first file.

Statement 2
Identifies the label on the tape.

Statement 3
Specifies the destination of the SYSPRINT file.

Statement 4
Identifies the input source for the DESCRIBE function.

Statement 5
Executes the program XTS91001.

The SYSIN file must contain the following statements:

Figure 144. SYSIN File to List the Contents of a Tape

(6) ---> CONTROL DBNAME=dbname
(7) ---> DESCRIBE

Statement 6
Points to the appropriate database.

Statement 7
Specifies the function to be performed. In this case, the DESCRIBE function.

Use the job (or a similar one) as depicted in the preceding figures.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]