DBSF keywords


Each control statement consists of a DBSELECT command and its keywords.

You can use more than one DBSELECT command to specify additional ranges of records to be unloaded from a DBD. The following table lists the valid keywords.

Keyword

Description

BEGIN

For HDAM and PHDAM databases, BEGIN can represent one of the following values:

  • A numeric value that specifies the RBN. The value must fall within the RAA. The first block, RBN 1, is the bitmap block. The unload begins at the first RAP in the specified RBN. If you do not specify a starting value, a value of 1 is used. If the PART keyword is not specified for PHDAM databases, the RBN is used for all partitions.
  • The key of a single root. The exact, complete root key must be specified with the BEGIN keyword. If you specify BEGIN(rootKey), you cannot specify the COUNT, END, SKIP, or SKIPFREQ keyword.

For HIDAM, PHIDAM and HISAM databases, BEGIN must be in character or hexadecimal format. A hexadecimal string must contain an even number of hexadecimal characters, enclosed in single quotes and preceded with the character X (X'xxxx'). A character string is enclosed in single quotes and preceded by the character C (C'cccc'). To specify a generic key, use a key value length less than the root’s key length. If a generic starting key is specified, it is padded with X'00's. The unload begins at the first root with a key equal to or greater than the specified starting value. If you do not specify a starting value, the unload begins at the beginning of the database.

COUNT

The COUNT keyword allows you to control the number of database records selected that lie within the BEGIN and END range. The value specified can be any number up to eight digits. If you specify BEGIN(rootKey), the COUNT keyword is not allowed.

END

For HDAM and PHDAM databases, END must be a numeric value that specifies an RBN within the RAA. The unload terminates after the last RAP in the specified block. If END is not specified, the last block in the RAA is used. If you specify BEGIN(rootKey), the END keyword is not allowed. If the PART keyword is not specified for PHDAM databases, the RBN is used for all partitions.

For HIDAM, PHIDAM, and HISAM databases, END must be in character or hexadecimal format. A hexadecimal string must contain an even number of hexadecimal characters, enclosed in single quotes and preceded with the character X (X'xxxx'). A character string is enclosed in single quotes and is preceded by the character C (C'ccccc'). A generic key is specified by using a key value length less than the root’s key length. If a generic ending key is specified, it is padded with X'FF's. The unload terminates before processing the first root with a key greater than the ending value. If no ending value is specified, the unload continues to the end of the database.

EXPAND

The EXPAND keyword allows you to control whether to expand the segment or leave it in compressed format. You can specify the EXPAND keyword only in the first DBSELECT command. The accepted values are YES and NO. The default is YES.

LPCK

The LPCK keyword allows you to not extract the LPCK if the database contains logical child segments whose LPCKs are not physically stored in the segment (they are virtual). You can specify the LPCK keyword only in the first DBSELECT command. The accepted values are YES and NO. The default is YES.

PART

The PART keyword identifies the PHDAM or PHIDAM database partition to be unloaded. Each partition requires a separate DBSELECT command. You can specify only one partition with the PART keyword. The value must be a valid partition name.

PCB

The PCB keyword allows you to specify which PCB within the PSB is to be used. This keyword can appear only in the first DBSELECT command. The PCB and PCBNAME keywords are mutually exclusive. If you do not specify PCB or PCBNAME, the first DB PCB is used.

You can use the PCB keyword to specify a number or a DBD name. If you specify a PCB number, it must identify the DB PCB. For example, if the first DB PCB is specified PCB(1) and a DBD name is specified, the first PCB containing the specified DBD name is used.

PCBNAME

The PCBNAME keyword provides an alternate method of specifying which PCB within the PSB is used. You can specify the PCB by the PCB name assigned to it in the label field or the PCBNAME keyword of the PCB statement. The PCBNAME keyword can appear only in the first DBSELECT command. The PCBNAME and PCB keywords are mutually exclusive. If you do not specify the PCB or PCBNAME keyword, the first DB PCB is used.

PRINT

The PRINT keyword allows you to request that the output be in print format. The accepted values are NO, YES, and HEX. The YES and HEX values print the data and write it to DFSURGU1. If you want a print data set only, specify DFSURGU1 DD DUMMY and PRINT(YES) or PRINT(HEX). The default is NO. Print is written to a DBSPRINT DD.

SKIP

The SKIP keyword allows you to skip over a specified number of database records before the retrieval process. This initial skipping occurs after position in the database is established with the BEGIN keyword. If you specify BEGIN(rootKey), the SKIP keyword is not allowed.

SKIPFREQ

The SKIPFREQ keyword allows you to skip over a specified number of database records after retrieval of a database record. For example, SKIPFREQ(1) retrieves every other database record. SKIPFREQ(2) retrieves every third database record. The value can be any number up to five digits. If you specify BEGIN(rootKey), the SKIPFREQ keyword is not allowed.



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Online Reorg for IMS 5.1