Table Maps

The following syntax is used to generate a statement for each exported Table Map:

CREATE TM identifier.name 
   [DESC //description//] 
   SRCQUAL srcqual DESTQUAL destqual 
   [COLMAPID cmapid] {SRCEXT exfilname | SRCAD adname}
   SRCTYPE {X|A} 
   VALRULES {M|C} 
   (srctable = destable [CM cmapname|LOCALCM (cmapdef)] 
   [, srctable = destable [CM cmapname|LOCALCM (cmapdef)]])
   [ARCHACTS {ACTION 
      {SRP | BRFRT | BRR | ARR | ARLRT | ERP}
      SQL //SQL statement//  [HOSTVAR {~ | ! | @ | $ | : | % | + | ? }]  | 
      SAMEAS  actionname}[DBALIAS dbalias] 
      [ON_ERROR  {STOP | SKIP | PROCESS}]; 

Keywords

The keywords correspond to values that can be specified for a Table Map. For more information about an individual parameter, see Open the Table Map Editor.

TM identifier.name
The name of the Table Map, specified in two parts (identifier.name), is required following the CREATE TM keyword.
DESC //description//
A description of the Table Map, delimited by double slashes.
SRCQUAL srcqual
(Source Qualifier) indicates the Default Qualifier for the source table(s) defined in the Table Map.
DESTQUAL destqual
(Destination Qualifier) indicates the Default Qualifier for the destination table(s) defined in the Table Map.
COLMAPID cmapid
(Default Column Map ID) indicates the Default Qualifier for the Column Maps included in the Table Map.
SRCEXT exfilname
Name of the Extract File used as the source. This keyword is included only when the source is an Extract File.
SRCAD adname
Name of the Access Definition used as the source. This keyword is included only when the source is an Access Definition.
SRCTYPE {X|A}
Indicates whether the source type is an Extract File (X) or an Access Definition (A). MVS™ definitions allow “T,” which is invalid for Optim.
VALRULES {M|C}
Indicates the validation rules for the Table Map.
M
Indicates Move/Archive Table Map validation for Convert, Create, Insert, or Load Requests.
C
Indicates Compare Table Map validation for Compare Requests.

The following source table to destination table mapping information is required for each pair of tables in the Table Map. At least one pair of tables must be specified.

srctable
The name of the source table. The Creator ID is included only when it differs from the default specified for SRCQUAL.
destable
The name of the destination table. The Creator ID is included only when it differs from the default specified for DESTQUAL. The words “NOT SPECIFIED” are inserted when the destination table is omitted.

One of the following is included when a Column Map is specified for a pair of tables.

CM
The name of the Column Map for the pair of tables. The Map ID is included only when it differs from the COLMAPID value.
LOCALCM
The local Column Map definition enclosed in parentheses. Only the (src-expr = dest-col) parameter of the Column Map statement is included.
Note: If a Table Map contains Column Maps which are exported as subordinate objects, the Column Maps are exported before the Table Map is exported.

Archive Actions Keyword

If a table has one or more Archive Actions defined from the original Access Definition, the ARCHACTS keyword is added.

ACTION
The Action Phase. If an ACTION is specified, SQL parameters are required.
ACTION value Phase
SRP Start of Restore Process
BRFRT Before Restore of First Row to Table
BRR Before Restore of Row
ARR After Restore of Row
ARLRT After Restore of Last Row to Table
ERP End of Restore Process
SQL //SQL stmt//
The text of the SQL WHERE clause. Long character strings such as SQL WHERE clauses are delimited by two forward slashes (//). Continuation characters are not used, and no spaces or indentations are added. If additional spaces or continuation characters are inserted, the string is imported incorrectly. The text continues for the complete length of the line width, wrapping to the next line until the forward slashes are reached, indicating the end of the text.
Note: Archive Actions for all processes may be defined in an Access Definition. Archive Actions defined for the Restore Process in a Table Map override those same actions defined in an Access Definition. With this in mind, you can define Archive Actions in a Table Map with an empty SQL Statement (e.g. SQL // //) to prevent an Archive Action defined in the Access Definition from being executed.
HOSTVAR c
Identifies the variable delimiter. If HOSTVAR is supplied, the delimiter must be one of the following:
~ ! @ $ : % + ?

If HOSTVAR is not supplied, the colon symbol ( : ) is used by default.

SAMEAS actionname
Specifies that the same SQL statement is used as for the named Action Phase. If SAMEAS is specified, SQL parameters are not required.
DBALIAS dbalias
If DBALIAS is supplied, the value used must refer to a valid DB Alias of the same DBMS type as the target table.
ON_ERROR {STOP|SKIP|PROCESS}
If ON_ERROR is supplied, the value STOP, SKIP, or PROCESS must be supplied.

If ON_ERROR is not supplied, the value STOP is used by default.

Unsupported Keywords

The following keywords and associated values may be present if the file was created using Optim z/OS®. These keywords are not valid when importing the definition to Optim and must be removed from the statement.

DESTEXT dsname
DESTAD adname
DESTTYPE {X|A|T}