Previous Topic: Successful Execution Requirements and ControlsNext Topic: Example JCL (Output to Tape)


How to Use

You can execute this command in either Single User or Multi-User mode. Execute the EXTRACT function using the following command format:

Extract Data Table Native (VSE)

►►─ EXTRACT AREA=a,DBID=n,DEVICE= ─┬─ DISK ─┬─ ,DTFNAME=d,TABLE=t ────────────►
                                   ├─ TAPE ─┤
                                   └─ Snnn ─┘

 ►─┬──────────────────┬─┬───────────────┬─┬──────────────┬────────────────────►
   └─ ,BLKSIZE=nnnnn ─┘ └─ ,FIRSTKEY=n ─┘ └─ ,LASTKEY=n ─┘

 ►─┬───────────────────────┬─┬───────────────┬─┬────────────────┬─────────────►
   └─ ,MULTUSE= ─┬─ NO ──┬─┘ └─ ,SLACK=nnnn ─┘ └─ ,SEQBUFS=nnn ─┘
                 └─ YES ─┘

 ►─┬───────────────────────┬─┬────────────────────────┬─ ,SEQ=NATIVE ─────────►◄
   └─ ,LABEL= ─┬─ YES ◄ ─┬─┘ └─ ,REWIND= ─┬─ YES ◄ ─┬─┘
               └─ NO ────┘                └─ NO ────┘

Extract Data Table Physical (VSE)

►►─ EXTRACT AREA=a,DBID=n,DEVICE= ─┬─ DISK ─┬─ ,DTFNAME=d,TABLE=t ────────────►
                                   ├─ TAPE ─┤
                                   └─ Snnn ─┘

 ►─┬──────────────────┬─┬───────────────┬─┬────────────────┬──────────────────►
   └─ ,BLKSIZE=nnnnn ─┘ └─ ,SLACK=nnnn ─┘ └─ ,SEQBUFS=nnn ─┘

 ►─┬───────────────────────┬─┬────────────────────────┬─ ,SEQ=PHYSICAL ───────►
   └─ ,LABEL= ─┬─ YES ◄ ─┬─┘ └─ ,REWIND= ─┬─ YES ◄ ─┬─┘
               └─ NO ────┘                └─ NO ────┘

 ►─┬───────────────────────┬──────────────────────────────────────────────────►◄
   └─ ,UPDATE= ─┬─ NO ◄ ─┬─┘
                └─ YES ──┘

Command

EXTRACT

Invokes the function to extract data in expanded form.

Required Keywords

AREA=

Identifies the data area containing the table.

Code *** (three asterisks) to use the Full Parent name, that is, if you are extracting a partition Full Parent table.

Valid Entries:

DATACOM-NAME of the area, or *** to extract a partition Full Parent table

Default Value:

(No default)

,DBID=

Identifies the database for the area to be read.

Valid Entries:

DATACOM-ID of the database

Default Value:

(No default)

DEVICE=

Specifies the device type for the output file.

When TAPE is being used, the system logical unit (SYS) number must be 10 (SYS010).

Use the Snnn entry to specify a specific SYS number (for tape only).

Valid Entries:

DISK, TAPE, Snnn (Certain values from previous versions are still accepted but are treated as DISK.)

Default Value:

(No default)

DTFNAME=

Specifies the z/VSE JCL TLBL/DLBL name for the output data set. If DEVICE=TAPE, this name must match the name which you code in your z/VSE JCL TLBL statement, otherwise, this name must match the name you code in your z/VSE JCL DLBL statement.

Valid Entries:

Any name valid to z/VSE JCL specifications

Note: The name may not be the standard DTFNAME for the area containing the table, which is the area name followed by the DBID in 3 characters, if less than 1000, or 4 characters, if 1000 or larger.

Default Value:

(No default)

,TABLE=

Specifies the name of an individual table to be extracted.

Valid Entries:

DATACOM-NAME of the table

Default Value:

(No default)

Optional Keywords

,BLKSIZE=

Indicates the block size for the output data set. The number supplied with this keyword overrides the block size supplied in your JCL. If block size is specified in the JCL and this keyword is not used, the JCL block size is used. In the absence of either this parameter or a specification in the JCL, the utility uses a default as specified below.

Valid Entries:

For fixed-length tables: An integer value that is a multiple of the table record length.

For variable-length tables (CA Datacom VSAM Transparency): An integer value that is at least the length of the longest record plus 8.

Default Value:

CA Datacom/DB selects the largest multiple of the record size which is less than or equal to 4096, if the DEVICE=DISK, or 32767, if the DEVICE=TAPE, (for a fixed-length record).

For example, if the DEVICE=DISK and the record size is 100, the block size is computed as 4000, or if the record size is 105, the block size is computed as 4095.

,FIRSTKEY= and/or ,LASTKEY=

These keywords allow you to select a segment of a table or area by Native Key (SEQ=NATIVE) value to be processed for EXTRACT. The EXTRACT function normally defaults to include the full Native Key range from low values to high values. FIRSTKEY= overrides the default starting position while LASTKEY= overrides the default ending position, limiting the records retrieved for output to the EXTRACT file. If one keyword is specified and the other is not specified, a default value is selected for the missing keyword. Normal CA Datacom key lengths are from 1 through 180 bytes. The key value data entered for FIRSTKEY= and LASTKEY= can be from 0 (zero) through 59 bytes long. You only need to code the number of positions of the key value that are significant to you, but be aware that the value coded is left justified regardless of key field data type. The utlity pads the low order or remaining positions of the key value with low values on FIRSTKEY= and high values on LASTKEY=. To extract the entire area in one step, specify neither FIRSTKEY= nor LASTKEY=. Alternately, you could specify FIRSTKEY=00 and/or LASTKEY=00 which causes processing to start at low values and end at high values. The length of zero indicates that the padded key values (low values and high values) are to be used.

The data is not edited or interpreted. Therefore, if the key value data you need to enter is in binary, you must set up the JCL using a hexadecimal mode display and enter the key value data in hexadecimal. This data can contain blanks, commas, and any other special characters. CA Datacom/DB cannot edit this data for syntax, so the control statement can look invalid, especially when it includes blanks or commas or key value data containing English words. For example, FIRSTKEY=12121212121212 means the length is 12, key value is 121212121212. Another example, FIRSTKEY=10FIRSTKEY10 means the length is 10, key value is FIRSTKEY10.

Valid Entries:

A 2-byte length (in the range of 00 through 59) followed by a character string of key value bytes (for the length specified) that represents the key value.

Default Value:

The starting/ending position of the full Native Key range from low values to high values.

LABEL=

If DEVICE=TAPE (either TAPE or the Snnn form), LABEL= specifies whether tape labels are to be processed. We recommended that labeled tapes always be used.

Note: LABEL= has no effect when DEVICE=DISK.

Valid Entries:

NO or YES

Default Value:

YES

,MULTUSE=

(For area level DBUTLTY control only.) If you specify MULTUSE=, do not specify SEQ=PHYSICAL.

Note: EXTRACT with a Full Parent table must not specify MULTUSE=YES.

For more information on area level DBUTLTY control, see Area Level DBUTLTY Control.

Valid Entries:

NO or YES

Default Value:

NO

REWIND=

If DEVICE=TAPE (either TAPE or the Snnn form), YES indicates the tape is to be rewound before OPEN and after CLOSE. NO indicates no rewind before OPEN or after CLOSE. If omitted, the tape is rewound before the OPEN and rewound with unload after the CLOSE. NO allows the stacking of backups on one tape.

Note: REWIND= has no effect when DEVICE=DISK.

Valid Entries:

NO or YES

Default Value:

The tape is rewound before the OPEN and rewound with unload after the CLOSE.

,SEQ=

Indicates the sequence for the output data.

NATIVE

CA Datacom/DB reads the Index and writes the data in logical Native Key sequence. When using SEQ=NATIVE, you can use the FIRSTKEY=/LASTKEY= optional keywords to select only a portion of the table or area. extracts.

PHYSICAL

CA Datacom/DB does not read the Index and outputs the data in physical track sequence.

Note: Do not specify SEQ=PHYSICAL if you specify MULTUSE=.

EXTRACT with a Full Parent table must not specify MULTUSE=YES.

Valid Entries:

NATIVE or PHYSICAL

Default Value:

NATIVE

,SEQBUFS=

If specified, SEQBUFS= must range from 0-256, even numbers only. We recommended for best performance to specify SEQBUFS=128 or SEQBUFS=256. If memory is limited and slower performance is acceptable, lower numbers should be used.

If MULTUSE= is omitted or specified as NO, the default is SEQBUFS=8. Any value specified for SEQBUFS= less than 8 is forced up to 8. Any value greater than 128 is forced to 128. If the number of data buffers (specified with the DATANO= parameter in the DBMSTLST macro) used by this DBUTLTY was specified as 192 or more, those data buffers are used and no additional memory is allocated. The SEQBUFS= value is edited and ignored (for best performance) without a larger DATANO= parameter value specification. The DATANO= buffers are also used if they are equal to or greater than the SEQBUFS= value multipled by 1.5. Otherwise, the number of SEQBUFS= is allocated as additional sequential buffers with additional memory required.

If MULTUSE=YES is specified, the default is SEQBUFS=128. If SEQBUFS= is specified as 0-8, it is rounded up to 8. If SEQBUFS= is specified as 130-134, it is rounded up to 136, in which case no read-ahead nor multi-block reads occur. If SEQBUFS= is specified as 2-128 (even numbers only), that many private sequential buffers are allocated (memory must be available) in the MUF address space. Read ahead is done. Multiple blocks are read with each I/O when possible to reduce elapsed times and CPU times with the number per I/O as one-half of the SEQBUFS. If set as 130-256, no private sequential buffers are allocated, normal existing data buffers are used in the MUF address space. This function shares those buffers with all other tasks using MUF. If set as 132-256, read ahead is done, and multiple blocks are read with each I/O to reduce elapsed times and CPU times with the number per I/O as the SEQBUFS number minus 128 and one-half of that result. The maximum blocks per read I/O is always 64.

Valid Entries:

0-256 (even numbers only)

Default Value:

128

,SLACK=

Provides record padding in the output data. This allows a larger size to be written to the output file to assist in possible record expansion. Without this parameter, the data written to the output file is in the size used by CA Datacom/DB. The pad, if any, is always blanks.

Valid Entries:

0 to 9999

Default Value:

0

,UPDATE=

Indicates whether the database can be open for update at the start or during the backup.

Note: Only valid if you specify PHYSICAL for the SEQ= keyword.

NO

Allows tables in the database to be updated and allows the INIT or LOAD functions on the data area during the backup.

YES

Specifies that CA Datacom/DB determines that the data area is loaded with a loaded Index and that the database is open for read-only with the unloading indicator set.

Valid Entries:

NO or YES

Default Value:

NO