Previous Topic: Examples:

Next Topic: SET Statement


Command Structures in the Command Language

The command language processor groups the TCF statements into logical blocks called command structures. There can be many command structures in a single TCF run. A command structure consists of the following sequence of statements:

  1. One or more SCAN statements. One or more occurrences of the following sequence:

    At least one EXAMINE statement must appear in each command structure.

The SCAN statements apply to all SELECT, EXCLUDE, and EXAMINE statements in the command structure.

Unlike the SCAN statements, which are global in scope, the optional SELECT and/or EXCLUDE statements apply only to the EXAMINE statement(s) which immediately follow them.

The following examples show how the command structures work:

Example 1

The command structure below causes TCF to scan catalog ICF.TESTCAT, extract all VSAM ESDS data sets, all VSAM KSDS clusters, and all physical sequential data sets, and test compress them based on a sampling of 30 percent of the logical records found in each data set.

SCAN CATALOG=ICF.TESTCAT

EXAMINE PERCENT=30

Example 2

The command structure below causes TCF to select all data sets in all catalogs that begin with the prefix 'LABS.TJP' and run complete test compresses on them.

SCAN DSN=LABS.TJP./

EXAMINE

Example 3

The command structure below extracts all data set names from three catalogs and then analyzes them:

SCAN CATALOG=VOL050.USERCAT
SCAN CATALOG=VOL001.USERCAT
SCAN CATALOG=VOL050.TESTCAT

EXAMINE

Example 4

The command structure below extracts data set names matching two different data set name criteria from all catalogs and then analyzes them:

SCAN DSN=LABS.TJP.VSAMFIL
SCAN DSN=LABS.*.TESTVSAM/

EXAMINE SKIP=20,BYPASS=100,EXTRACT=500

Example 5

The command structure below extracts data set names from two catalogs. Then the list is narrowed by selecting data sets which match either of the two SELECT statements and the selected data sets are test compressed using the first EXAMINE statement. Finally, the entire list of data sets is test compressed using the second EXAMINE statement.

SCAN CATALOG=VOL050.USERCAT
SCAN CATALOG=VOL001.USERCAT

SELECT DSNAMES=(!TJP,!MJA)
SELECT DSORG=PS,MBYTESRANGE=(300,2000)

EXAMINE SKIP=5,EXTRACT=10000

EXAMINE PERCENT=40

Example 6

The command structure below extracts data set names from two catalogs. This list of data sets is used twice. In the first use, the list is narrowed by selecting data sets that are between 50 and 200 megabytes in size (first SELECT statement). Then, a test compression run is done using 50% of the records in each data set (first EXAMINE statement). In the second use, the original list is narrowed in a different way. Data sets are selected only if they are 201 megabytes or larger (second SELECT statement). Then a test compress is done using 20% of the records in each data set (second EXAMINE statement).

SCAN CATALOG=VOL050.USERCAT
SCAN CATALOG=VOL001.USERCAT

SELECT MBYTES=(50,200)

EXAMINE PERCENT=50

SELECT MBYTES=201

EXAMINE PERCENT=20

Example 7

The command structure below extracts data set names matching two different data set name criteria from all catalogs. Then the list is narrowed by selecting VSAM data sets up to 300 MB in size (SELECT statement) and which do not end in DB2 or TEST (EXCLUDE statement). The resulting list of data sets is test compressed using 20% of the records in each data set (EXAMINE statement).

SCAN DSN=LABS.TJP.VSAMFIL
SCAN DSN=LABS.TCF.VSAM/

SELECT DSORG=VSAM,MBYTESRANGE=(0,300)
EXCLUDE DSN=(!DB2,!TEST)

EXAMINE PERCENT=20