BST05CMD: Updating the database definition file

Overview

BST05CMD updates information in the database definition file. For example, BST05CMD can be used to delete the definitions for spool files (type SPOOL, INDEX, etc.) from the database definition file (BnnDEF).

Deleting spool file definitions

Please observe the following when deleting spool file definitions:

  • You can delete spool files in status MOD, EMP, ERR, or FMT.
  • All database activities, i.e. all STCs and batch jobs that are working with the database must be stopped beforehand.
  • Parameter SIGNON=NO must be set when the program is called.
  • The following command must be defined in BQLIN:

    DEFINE DELETE FILE shortname

    where shortname is the short name of the spool, cache or index file to be deleted.

Identifying the shortname

To find the short name shortname that is to be used in the Delete command in BQLIN, proceed as follows:

  1. Select online option D.1.
  2. Use line command S to select the definition (in status MOD, FMT, ERR or EMP) to be deleted.

    Panel "Display Data Set Definition" is called. The Short Name field shows the short name to be used in the DELETE command.

Return codes

0

The program ended normally. The definition has been deleted.

16

The delete command was not executed. You will find additional information in BQLPRINT.

32

BQLPRINT or the BQLIN DD statement was missing, or the database was open for another STC or batch job.

Sample JCL for DELETE

Replace nn with the product number and xx with the identifier of the LST member.

+---------------------------------------------------------------+
|jobcard |
|//stepname EXEC PGM=BST01RFF,REGION=0M, |
|// PARM='S=nn,BnnLST=xx,PGM=BST05CMD,SIGNON=NO' |
|//* |
|//STEPLIB DD DISP=SHR,DSN=BSA.LOAD |
|// DD DISP=SHR,DSN=BETAnn.LOAD |
|//SFFPARM DD DISP=SHR,DSN=BETA.PARMLIB |
|//BnnDEF DD DISP=SHR,DSN=BETAnn.DB.DEF |
|//* |
|//BQLIN DD * |
| DEFINE DELETE FILE shortname |
|/* |
|//BQLPRINT DD SYSOUT=* |
|//SYSPRINT DD SYSOUT=* |
|//* |
+---------------------------------------------------------------+

Setting spool files to OFFLINE/ONLINE

You can use BST05CMD to change the status (ONLINE/OFFLINE) of a spool file definition in the database definition file. Spool files (type SPOOL, INDEX, etc.) with status OFFLINE remain closed when the STC or a batch job is started. If you are working with a large number of files, this can considerably speed up the startup process.

  • Spool files that have been set to OFFLINE status are not opened until they are explicitly accessed (BROWSE, etc.). Once accessed, they remain open for as long as the job or STC is running and are available for any inserts that may need to be made.
  • It is not possible to make inserts until the spool file concerned has been opened; the INSERT procedure itself will not open the spool file.
  • If the LST parameter BQL_OPEN_FILES=YES is set, all spool files will be opened at startup, including those that have been set to OFFLINE status.

Note the following when changing spool file status with BST05CMD:

  • All database activities, i.e. all STCs and batch jobs that are working with the database must be stopped beforehand.
  • Parameter SIGNON=NO must be set when the program is called.
  • The following command in BQLIN sets the status to OFFLINE:

    DEFINE UPDATE FILE shortname STATUS OFFLINE

    where shortname is the short name of the spool file to be set to OFFLINE status.

    The following command in BQLIN sets the status to ONLINE:

    DEFINE UPDATE FILE shortname STATUS ONLINE