15.00 - Using Ferret Parameters - Teradata Database

Teradata Database Utilities

Product
Teradata Database
Release Number
15.00
Content Type
Configuration
Publication ID
B035-1102-015K
Language
English (United States)
Last Update
2018-09-25

Using Ferret Parameters

The variable, parameter, in the Ferret syntax diagram includes various types of parameters, including multitoken parameters and decimal and hexadecimal numeric input.

Multitoken Parameters

Multitoken parameters, such as subtable identifiers, which are typed as three values, are typed on a single line with one or more spaces separating the individual tokens. Ferret also accepts multitoken parameters separated by hyphens.

For example, Ferret accepts either of the following as subtable identifiers:

0 200 0
0-200-0

You can separate parameters from each other and from the command by spaces or a comma. To specify a command option (cmdoption), type it on the same line as the command (cmd).

Numeric Input

Numeric values can be entered into Ferret in either decimal or hexadecimal format. The default numeric base for data input to and output from Ferret depends on the radix settings for input and output:

  • When the radix for input is decimal, Ferret interprets numeric input as decimal numbers. For example, input of 45 is interpreted as the value 45.
  • When the radix for input in hexadecimal, Ferret interprets numeric input as hexadecimal numbers. For example, input of 45 is interpreted as the value 69.
  • The initial radix setting in Ferret is hexadecimal for input and output. For more information on setting the radix, see “RADIX” on page 579.

    The following special numeric formatting conventions can be used to force Ferret to interpret entered numeric values as decimal or hexadecimal, regardless of the radix setting:

  • Decimal values can be signified by adding a 0i or i prefix, or by adding a decimal point suffix:
  • 0i45 45. 0I45
  • Hexadecimal values can be signified by adding a 0x or x prefix, or by adding an h suffix. Leading zeros are optional:
  • 0x2D X2D 2Dh 002DH

    The valid range of numeric values in Ferret are unsigned 16-bit values, 0 through 65535 (0x0 through 0xFFFF), except when patching using /L or /W for 32-bit integers, in which case the valid range is 0 through 4,294,967,295 (0x0 through 0xFFFFFFFF). For more information, see “Specifying a Subtable Identifier (tid)” on page 541.

    You must separate two numbers on the same line from each other by a space or a comma.

    Specifying a Subtable Identifier (tid)

    Commands operate on subtables, rather than on tables. A table is a collection of subtables, and a subtable is a collection of physical rows. Each subtable has physical rows that store one particular type of data. For example, primary and fallback data subtables have data rows, primary and fallback index subtables have index rows, and the physical rows of table header subtables contain table metadata.

    Each subtable is identified by a subtable identifier (tid). The tid has two parts. The first part identifies the table to which the subtable belongs. All subtables that are part of the same table have the same table identifier as part of their tid. The second part identifies one of the subtables that comprise the table, and indicate the subtable type.

    A tid is defined as follows:

    table_unique and type_and_index together uniquely identify a subtable.

     

    Syntax Element

    Description

    table_unique

    Unique identifier of the table to be acted upon.

    The table can be uniquely identified in either of two ways:

    1 Specify the name of the database to which the table belongs and the table name, separated by a period. The names individually or together must be delimited. The following formats are valid:

  • "database_name.table_name"
  • "database_name"."table_name"
  • 'database_name.table_name'
  • 'database_name'.'table_name'
  • 2 Specify the unique numeric identifier of the table, which consists of two numeric values separated by a space. The table identifier consists of the first two numeric values returned by the TABLEID command. These two numbers are common to all subtables that comprise the table.

    Note: The format of the input numbers depends on the current radix setting, which is displayed by the RADIX command.

    =

    Specifies to use the most recently saved value for table_unique.

    type_and_index

    Uniquely identifies the subtable within the group of subtables that comprise a table. The type_and_index identifies both the type of subtable, and the individual subtable itself.

    The syntax for type_and_index is as follows:

     

    Syntax Element

    Description

    type

    The type of subtable. type can be one of the following:

     

    Type

    Description

     

     

    *

    All the subtables of this table.

     

     

    H

    The table header subtable.

    Because table header subtables have only one row and no secondary indexes or work subtables, any index and variant specifications that follow an H type are ignored.

     

     

    P

    The primary data subtable.

     

     

    F number

    The fallback data subtable specified by number. The default is 1.

     

     

    F *

    All of the fallback subtables.

     

     

     

     

     

     

     

    index

    The index subtable to examine. If the index subtable is not given, it defaults to the data subtable. Index 1 is the first secondary index, Index 2 is the second secondary index, and so forth.

    index can be one of the following:

     

     

     

     

     

     

     

     

    Index

    Description

     

     

     

    number

    A secondary index and can be used instead of specifying X number. If you enter number by itself, then number must be a multiple of 4 and it is interpreted in the following way:

  • number = 0 is the same as entering X0
  • number = 4 is the same as entering X1
  • number = 8 is the same as entering X2
  • number = 12 is the same as entering X3
  • and so forth.

     

     

     

    *

    All the indexes of the table.

     

     

     

    D

    The primary data index (same as X0 or 0).

     

     

     

    X number

    The secondary index specified by number. The default is 1.

     

     

     

    X*

    All the secondary indexes, starting at 0.

     

     

     

     

     

     

     

    variant

    The possible subtables.

    variant can be one of the following:

     

     

     

     

     

     

     

     

    Variant

    Description

     

     

     

    *

    All the possible variant subtables.

     

     

     

    0

    The default. If you do not specify variant, 0 is assumed.

     

     

     

    1

    The value during a Sort or Table Modify operation.

     

     

     

    2

    A value that is not used.

     

     

     

    3

    A value that is not used.

     

     

     

     

     

     

     

    number

    A single number that represents internally the type of subtable (header, primary data, or fallback data), the index to use when ordering the physical rows (primary data index or one of the secondary indexes), and the variant. The table header has a type_and_index number of zero. Examples of these numbers are listed below.

    The following table gives examples that describe the type and index fields.

     

    Subtable Description

    Number

    Type

    Type/Index

    Type/Index/Variant

    Table header

    0

    H

    Primary data subtable

    1024 (0x0400)

    P

    P/D

    First secondary index

    1028 (0x0404)

    P/X1

    First fallback table

    2048 (0x0800)

    F1

    F1/D

    Second secondary index of the third fallback table

    4104 (0x1008)

    F3/X2

    All primary subtables

    P/*

    All primary secondary indexes

    P/X*

    All fallback subtables

    F*

     

    All subtables of this table

    *

    Sort table of the first secondary index

    1029 (0x0405)

     

    P/X1/1

    Both tables during a sort of the first secondary index

     

    P/X1/ *

    Example

    Assume that table T4 is a table in database MYDB and has a table_number of 0 1198. Also assume that input is accepted in hexadecimal format.

    Some valid specifications of a tid for primary subtables of table T4 are as follows:

  • "MYDB.T4" 400
  • "MYDB.T4" 1024.
  • "MYDB"."T4" P
  • 'MYDB'.'T4' 400 h
  • 0 1198 400
  • 0 1198 P