Documente Academic
Documente Profesional
Documente Cultură
User Manual ii
Table of Contents
Documentation ........................................................................... 3
Summary of Amendments Release 4.1 ................................... 4
1. Introduction ..................................................................... 7
4. Definitions .....................................................................171
User Manual v
Table of Contents
G. Skipped Columns.........................................................503
Index...................................................................................509
User Manual ix
Table of Figures
User Manual xi
Table of Figures
This manual details how to use Move for DB2 to extract relational
sets of DB2 data and move them to destination databases.
Organization
User Manual 1
About this Manual
C. Exit Routines for Details about using exit routines when defining
Column Maps Column Maps.
For ease of reading, the text in this manual refers to Move for DB2 as
MOVE.
Documentation
User Manual 3
About this Manual
• Support for the new 8K and 16K buffer pools is provided for use
when creating DB2 Tablespaces and Databases.
• A new DROP ALL primary command that will drop all tables
that currently exist, as well as their subordinate objects.
• Support for the FIND command has been extended to include the
status column. This will allow the user to perform a find
operation on a status such as “SQL” to find all tables that have an
SQL WHERE Clause specified.
BMC Integration
The following enhancements have been added to the integration with
BMC’s Unload Plus:
• New batch overrides have been added for BMC Unload Plus
processing. This will allow the date, time, dataset and processing
mode to be changed using the override facility.
User Manual 5
About this Manual
Miscellaneous Changes
The following general enhancements have also been added:
• The user now has an option to request the inclusion of the list of
tables processed as generated JCL comments in the generated
batch JCL. This option is available for batch operations for
Extract and Insert/Update.
• Two new line commands, COPY and RENAME are available for
all PST objects. These line commands are available on the
selection list for each object type.
Minor editorial and technical changes have been made throughout this
manual.
User Manual 7
1. Introduction
To copy a related set of data, you define the source of the data and the
destination. The source is defined in the Extract Process and the
destination in the Insert Process.
Extract Process
• The names of the tables involved in the extract and select one of
these tables as the starting point or Start Table.
• For the data, you can qualify which rows are to be extracted by
specifying:
• For the object definitions, table and column definitions are always
extracted. You can select which of the following subordinate
definitions are to be extracted:
Access Definition The information that is defined for the Extract Process—table names,
relationships, and selection criteria—is stored in an Access Definition.
Access Definitions are available to all Relational Tools. In fact,
Access Definitions defined using Access for DB2 or
Compare for DB2 can be used by MOVE.
Insert Process
Once an Extract File is created, the data contained in the file can be
inserted into the destination tables. These tables may or may not
reside in the same DB2 subsystem.
Table Maps Table Maps are used to match source tables to destination tables.
Using Table Maps, individual tables can be excluded and unlike
named tables can be mapped.
You can use an existing Table Map (APPLY command), or define the
Table Map along with the other specifications for the process.
When the columns in the destination table match the columns in the
source table, MOVE automatically inserts the data. When the
columns do not match, Column Maps can be used.
Column Maps Column Maps are used to match source columns to destination
columns that have different column names. These maps also enable
users to specify defaults, literals, constants, expressions, and exit
routines to populate destination columns. Although MOVE
automatically handles many transformations, exit routines can be used
for more complex processing.
Create Object If the destination tables do not exist, MOVE generates the appropriate
Definitions SQL DDL statements to create the tables either as part of the Insert or
as a separate step. The created tables can be identical to the source
tables with the destination columns taking on the attributes of the
corresponding source columns or the table definitions can be
modified.
User Manual 9
1. Introduction
Insert Processing Insert processing is determined by whether or not the row exists. A
row is inserted when the primary key value is unique indicating that
the row does not exist. However, if the primary key value is not
unique, a row already exists, one of two actions is taken as indicated
by the user:
Other Processes Several other processes or facilities are provided in addition to Extract
and Insert. These include:
User Manual 11
1. Introduction
1.2.1 Terminology
The following paragraphs describe some common terms and how they
relate to using MOVE.
Access Definitions MOVE enables you to define and store a description of the set of data
to be extracted. This description is referred to as an Access
Definition. The same Access Definitions can be used by
Access for DB2 to browse and edit data in DB2 tables, by
Compare for DB2 to select data from DB2 tables for the Compare
Process, and by Archive for DB2 to archive data in DB2 tables.
The first table from which the data is extracted is the Start Table. All
other tables are accessed in logical sequence based on table
relationships and specifications in the Access Definition.
GROUP.USER.NAME
The group and user portions are useful when organizing projects by
assigning a different group name to each project and, within the
projects, a different user value for each person working in the group.
Extract File An Extract File is a sequential file that contains the extracted data
and information about that data. The information defines the
characteristics of the data. Once created, an Extract File can be
reused. This provides a constant set of data with which to create and
refresh test databases. (The Extract File can also be used by
Compare for DB2. Users can compare the test database ‘after’
testing an application with the ‘before’ version of the data in the
Extract File.)
Referential MOVE uses the referential integrity information stored in the DB2
Integrity Rules Catalog. The table and column information is also obtained from the
DB2 Catalog. When the DB2 Catalog does not contain the needed
relationship information, user-specified definitions stored in the PST
Directory are used to supplement the Catalog.
Directory The PST Directory contains information necessary for accessing DB2
data. This information includes user-specified:
Access Definitions
Primary Key Definitions
Relationship Definitions
Column Maps
Table Maps
Primary Key The primary key definition contains the name of the column or
Definition columns that uniquely identifies each row. For example, assume a
CUSTOMERS table has a column CUST_ID that contains a unique
value for each row in the table. The column CUST_ID would be an
acceptable primary key for the CUSTOMERS table.
• Extracting data from a table that has two or more parents. The
primary key guarantees uniqueness of the extracted rows.
User Manual 13
1. Introduction
Relationship The relationship definition is the information that specifies how two
Definition tables are related. For the DB2 Catalog, the relationship is defined by
a primary key/foreign key pairing. The foreign key is the set of
columns in a child table that describe the correspondence with the
primary key columns in the parent table. For example, assume an
ORDERS table contains a column CUST_ID that can be related to
the primary key column CUST_ID in the CUSTOMERS table. The
column in the ORDERS table is the foreign key.
Table Map The Table Map definition or Table Map is a set of specifications
Definition used by MOVE to match the sets of source tables to destination
tables.
MAPID.MAPNAME
Table Maps are also used and created by Compare for DB2. They
can be used interchangeably.
MAPID.MAPNAME
Column Maps are also used and created by Compare for DB2. The
Column Maps created using Compare for DB2 can always be used
by MOVE. However, the converse is not always possible. MOVE
provides additional facilities not available in Compare for DB2.
Object Definitions This document refers to the parameters required by DB2 to create objects
as object definitions. MOVE can be used to migrate these objects from
one subsystem to another by extracting the object definitions from the
source and creating the objects based on these definitions at the
destination. The following objects can be migrated:
Tables Views
Columns Indexes
Primary Keys Aliases
Relationships Synonyms
Authorization ID
(also referred to as Creator ID)
Group ID 8
User ID 8
Map ID 8
Access Definition base name 12
Column Map base name 12
Table Map base name 12
User Manual 15
1. Introduction
Since a delimited identifier can exceed the space allocated on the panels
for certain output fields, MOVE will truncate any name whose length
exceeds the field length on the panel. The field is protected and cannot be
edited. Line commands can be used to delete the entry. When line
commands are not available (for example, specifying the Start Table or
the default Creator ID), the field is large enough to support the maximum
width and may be edited.
To conserve space, the delimiters are not included with the delimited
identifier when the name is provided in the heading of a panel.
Delimiters are also omitted when the delimited names are presented in
selection lists.
Using DB2 LIKE When specifying names as operands for the commands and on panels,
Syntax MOVE supports the standard DB2 naming conventions. This
includes the ability to use DB2 LIKE syntax to obtain a selection list.
The characters that have special meaning are:
SAMPLE.CONTROL.FILE
PSTDEMO.SAMPLE.CONTROL.FILE
'SAMPLE.CONTROL.FILE'
'PSTDEMO.SAMP*
(For more information about specifying a default data set prefix, see
Section 6. Specify Options)
Common Panel For the most part, the figures in this manual present the panels as they
appear when all Relational Tools are available. Those facilities that
are available with MOVE are documented in this manual. Those
facilities available exclusively with Access for DB2 are noted in this
manual and documented in the Access for DB2 User Manual. Those
facilities available exclusively with Compare for DB2 are noted in
this manual and documented in the Compare for DB2 User Manual.
Those facilities available exclusively with Archive for DB2 are noted
in this manual and documented in the Archive for DB2 User Manual.
The characters used to draw the box around the pop-up window are
site-defined. User options are provided to change these characters.
Throughout this manual, pop-up windows are delimited by easy-to-
read dashes and vertical bars.
User Manual 17
1. Introduction
Function Keys The function keys are handled as in ISPF. The keys provide a simple
way to execute primary commands. When a function key is pressed,
it is evaluated as if the command assigned to the key was typed in the
primary command area of the screen. (See the Relational Tools
Command Reference Manual for information on assigning values to
function keys.)
Scrolling All ISPF scrolling functions are supported. Vertical and horizontal
scrolling is coordinated with the scroll value specified in the SCROLL
field. This value can be specified as:
DATA Full page scroll such that the last line or column on
the current screen is the first line or column on the
next screen.
User Manual 19
1. Introduction
This sample session begins with the Relational Tools Main Menu and
demonstrates how to perform these two steps with MOVE.
User Manual 21
2. Session Overview
Panel Options To select the desired option, type the one-character identifier
corresponding to the function you want to invoke.
0 OPTIONS
To specify site and user options. MOVE Administrator privileges are
required to define site options. User options include user’s session
options, editor options and JOB card and job related information.
1 BROWSE TABLE
2 EDIT TABLE
3 BROWSE USING AD
4 EDIT USING AD
5 ADS
6 DEFINITIONS
To define and maintain primary keys and relationships that are used
when the information is not available in the DB2 Catalog, to define
Table Maps and Column Maps used during the INSERT, DB2 LOAD
and CONVERT processes, to define Access Definitions and to invoke
the Export/Import Object Definitions Utility.
7 MIGRATION
8 COMPARE
9 ARCHIVE
T TUTORIAL
C CHANGES
X EXIT
User Manual 23
2. Session Overview
Panel fields The values in the three input fields are profiled. These fields are:
With MOVE, you use an Access Definition to specify the source data
to be extracted. To do this, you can:
Select Migration In this sample session, Option 7 MIGRATION is selected. The Data
Option Migration menu is displayed.
User Manual 25
2. Session Overview
Specify Tables
GET TABLES In addition to manually specifying the names of the tables, you can use
RELATED the GET TABLES RELATED command. This command directs
Command MOVE to insert the names of the tables related to a specific table on
the list. You indicate the table by specifying the name with the
command or by positioning the cursor to the line containing the table
name. If only one table is listed, as shown in the figure, it is assumed
to be the indicated table and need not be specified for the GET
TABLES RELATED command.
Primary : COL, SEL, SQL, REL, POINT, GROUP, GET TABLES RELATED, INDENT
Line : COL, SEL, SQL, ALL, GR(A), GP(A), GC(A), EXP
All Related Tables MOVE checks the DB2 Catalog and the PST Directory for tables
related to CUSTOMERS and adds those tables to the list. MOVE then
checks for tables related to these inserted tables and adds them also.
This chain-like process continues until the complete set of related
tables is included. (In this example, SALES and ORDERS are related
to CUSTOMERS. ORDERS is related to DETAILS which is related
to ITEMS.)
Primary : COL, SEL, SQL, REL, POINT, GROUP, GET TABLES RELATED, INDENT
Line : COL, SEL, SQL, ALL, GR(A), GP(A), GC(A), EXP
User Manual 27
2. Session Overview
Other Commands Other commands are provided to display selection lists of all tables,
LIST TABLES, or selection lists of all tables related to a specific
table, LIST TABLES RELATED. Then, rather than have MOVE
automatically add the tables, you can select individual tables from the
list as desired.
You can scroll and edit the list of table names on the Select
Tables/Views for AD panel using standard ISPF-facilities. For
example, after using GET TABLES RELATED to add the related
tables, you can use the Delete line command to delete a table from the
list. For this sample, assume the SALES table is deleted.
Specify Criteria
After you have specified the names of the tables, you can specify the
selection criteria in a variety of ways.
• You can specify random selection of rows and a row limit for each
table by entering a value in the fields provided under the Extract
Parms heading on the Select Tables/Views for AD panel.
POINT Command Since the technology used to select the rows is referred to as Point-and-
Shoot, the POINT command is entered on the Select Tables/Views for
AD panel. The primary key values for all of the rows selected during a
Point-and-Shoot session are saved in a file referred to as the Point-and-
Shoot or Row List file.
When you enter the POINT command, MOVE prompts for the name
of a data set containing previously selected rows. If one exists, specify
the name and press ENTER. The rows from the Start Table are
displayed and any previously selected rows are indicated. If a data set
does not exist or you want to stop using an existing data set, leave the
field blank and press ENTER.
Point-and-Shoot MOVE presents the rows in the Start Table in a browse-only display.
Display Use the Select Related line commands, SR and SSR, or the SELECT
RELATED primary command to select the individual customer rows
you want to extract.
When individual rows are selected from the Start Table using Point-
and-Shoot, the Extract Process begins with those rows. In this
example, the extract begins with the selected customers. The related
rows from the other tables are extracted based on the relationships
defined between the CUSTOMERS table and the other tables. For
details, see Section 3.4.4 SQL WHERE Clause Specification.
User Manual 29
2. Session Overview
Relationships You can select which relationships between the specified tables are to
be traversed to extract the data. This is especially useful when
multiple relationships are defined between tables. Use the REL
command on the Select Tables/Views for AD panel to display the
Specify Relationship Usage panel. (You can also use END to
redisplay the EXTRACT Process menu, Figure 3, and select Option 2
PATHS to display the following panel.)
Q1: If a Child Row is Included, Include its Parent Row to Satisfy the RI Rule?
Q2: If a Parent Row is Included to Satisfy any RI Rule, Include All Child Rows?
Q Q Child --Relation--
Cmd Status 1 2 Limit Parent Table Child Table Name Type
--- -------- --- --- -------------------- --------------------- ------ -----
*********************************** TOP *********************************
___ NEW Y N CUSTOMERS ORDERS RCO DB2
___ NEW Y N ORDERS DETAILS ROD DB2
___ NEW Y N ITEMS DETAILS RID DB2
********************************** BOTTOM ********************************
All of the relationships that have been defined between all of the tables
on the Select Tables/Views for AD panel are displayed. The first time
this panel is displayed, all of the relationships have a NEW status.
The default handling for these new relationships is specified as an
Access Definition option. You can specify whether or not all NEW
relationships are to be automatically selected. You can explicitly
select, S, and unselect, U, any relationship. On this panel, all of the
relationships are new and are to be selected as defined.
SHOW STEPS You can request an analysis of the relationship traversal path using the
Command SHOW STEPS command from the Specify Relationship Usage panel.
MOVE will describe the traversal path based on the specified source
tables and selected relationships and display text documenting the
series of steps that are to be performed.
Step 4: Extract Rows from PSTDEMO.ITEMS which are Parents of Rows Previously
Extracted from PSTDEMO.DETAILS in Step 3 to satisfy an RI rule using
Relationship RID.
After viewing the SHOW STEPS information, use END to return the
Specify Relationship Usage panel. Use END again to return to the
previous panel.
In addition to the data, you can request that one or more types of
associated object definitions are extracted from the source and stored
in the Extract File. The available object types include: primary keys
and relationships, indexes, views, aliases, synonyms, and column field
procedure names. By default, the table definitions are always
extracted so that MOVE can automatically create any unknown tables
at the destination.
User Manual 31
2. Session Overview
You select and unselect object definition types using the S, select, or U,
unselect, line commands. On initial display, Primary Keys and
Relationships and Indexes are designated as SELECT.
Since the extracted data is stored in an Extract File, specify the name
of the sequential file that is to contain the extracted data at the prompt
for Extract File DSN. If the file does not exist, MOVE prompts for
allocation information and creates the file.
You can extract the data, the object definitions or both. Use the second
prompt, Extract, to specify your choice. For this demonstration, only
data is extracted.
The other prompts enable you to limit the number of rows of data that
are extracted, to execute in batch or online, and, if in batch, to review
the JCL.
When you request review of the JCL for batch execution, the JCL is
displayed in the ISPF editor. You can save this JCL using the ISPF
facilities. Use END to return to your MOVE session. (Whether END
also automatically submits the job is determined by a user option
discussed in Section 6. Specify Options. The saved JCL can be
edited and executed from ISPF without entering a MOVE session.
User Manual 33
2. Session Overview
As noted in the message, you can correct the problem and then execute
the process, or execute the process despite the problem.
Extracted
Extract Tables Rows
------------------------ ----------
1 PSTDEMO.CUSTOMERS 132
2 PSTDEMO.ORDERS 792
3 PSTDEMO.DETAILS 2176
4 PSTDEMO.ITEMS 872
User Manual 35
2. Session Overview
Once you have used MOVE to extract the source data and generate the
Extract File, you can specify the destination using the Insert Option on
the Data Migration menu.
When you select Option 2 Insert on the menu, the INSERT Process
menu is displayed.
Specify Data Set Names for Extract File and Control File:
Extract File DSN ===> 'PSTDEMO.SAMPLE.EXTRACT'
Control File DSN ===> 'PSTDEMO.INSERT.CONTROL'
Extract File The name of the last Extract File you created is provided
automatically. This file contains the source data that is to be inserted
at the destination.
The Extract File is used solely to contain the extracted source data. It
is not affected directly by the Insert Process. Therefore, the Extract
File can be used by multiple users simultaneously and repeatedly.
The Control File is used to keep track of the discarded rows. When the
process is complete you can browse the entire Extract File or just the
rows that were discarded to determine why they could not be
processed.
Separate Source Since the Extract File is designed to contain the source data, it can be
from Destination reused as needed to insert the same data into different destination tables
or to refresh a destination after testing an application. In contrast, the
Control File is designed to keep track of a specific processthe
destination and the discarded rows. Using the same Extract File and
unique Control Files, multiple users can work with the same data and
still perform their individual Insert Process requests. For example,
programmers can test their applications against their own copy of the
data. If necessary, they can refresh that test data over and over using
the same source data in the Extract File.
INSERT versus The Insert Process can be performed in one of two ways:
UPDATE
1. You can specify insert only. That means only new rows are to be
inserted. Thus, a source row is discarded when the primary key
value of the source row matches the value in an existing
destination row.
2. You can specify update. That means new rows are inserted and
existing destination rows are updated. Thus, when the primary key
value of the source row matches the value in an existing
destination row, the destination row is updated.
Insert Process The Insert Process menu, as shown in Figure 13. Insert Process
Options Menu, provides three options:
TABLE MAP
PERFORM INSERT
PERFORM UPDATE
TABLE MAP MOVE can insert the data from the Extract File into destination tables
with the same names or different names. When the destination tables
do not exist, MOVE can create the destination tables to match the
source exactly and then insert the data. When MOVE determines that
destination tables must be created, you are prompted to specify
whether primary keys, relationships, indexes, and so forth as contained
in the Extract File are also created. (If the definitions for these objects
have not been extracted, only the tables are listed.) This is useful when
moving source data from one subsystem to another and the destination
tables have not been defined. You can let MOVE do it for you
automatically.
By default, MOVE assumes the base destination table names are the
same as the source table names. However, at the very least, you must
specify a default Creator ID for the destination using the TABLE MAP
option.
User Manual 37
2. Session Overview
Table Map Panel When you select Option 1 TABLE MAP from the INSERT Process
menu, the following panel is displayed.
Available Commands: APPLY, SAVE, LIST, MAP, POPULATE, END when Complete
Destination May be any DB2 Tables or Views
Column
Src CID: PSTDEMO Dest CID ===> Map ID ===>
You can overtype the Dest CID and the Destination Table Names to
specify the names you want. MOVE automatically adjusts the Type.
Specifying Dest For example, assume you have a test database that has the same
CID structure as the production system. The Creator ID is used to
distinguish these two sets of tables. To insert the source data extracted
from the production system into the same-name test tables, specify the
Dest CID and do not change the Destination Table Names. MOVE
automatically identifies the Type for each destination using the Dest
CID. In this example, the Dest CID is specified as PSTDEMO2 and
all of the destinations are tables.
Available Commands: APPLY, SAVE, LIST, MAP, POPULATE, END when Complete
Destination May be any DB2 Tables or Views
Column
Src CID: PSTDEMO Dest CID ===> PSTDEMO2 Map ID ===>
Column Maps You can also map each table column-by-column using Column Maps.
Column Maps provide enormous flexibility. You can map columns
with different names or use a subset of columns. You can also insert
literal data, use an exit routine to modify the data before inserting it,
insert the same source data into more than one column, insert the
defined DB2 default value, specify an expression, or insert NULL if
valid for the column. You can age the date in DATE, TIMESTAMP,
character and numeric columns.
Apply Existing If a suitable Table Map has been defined and stored in the PST
Table Map Directory, you can use the APPLY command to insert the
specifications for that Table Map into the current one. You can
determine which specifications are includedonly the Dest CID,
Destination table names, any Column Maps, or all of these.
For details on Table Maps, see Section 4.4 Table Maps. For details
on Column Maps, see Section 4.3 Column Maps.
User Manual 39
2. Session Overview
Perform the In this sample session, Option 2 PERFORM INSERT is selected from
Process the INSERT Process menu. The following panel is displayed.
Process Options:
Delete All Rows in Target Tables ===> N (Y-Yes, N-No)
If YES, Commit Frequency ===> T (T-After Each Table, E-At End)
The data set names of the Extract File and the Control File are supplied.
Limit Discarded You can also request that the Insert Process be terminated based on the
Inserts number of discarded rows. For instance, if more than 50 rows are
discarded there may be some problem with RI rules such that rows
cannot be inserted because necessary parents do not exist. Rather than
continue the process and accumulate a large number of discarded rows,
the process is terminated. You can display the discarded rows,
determine the problem, correct it, and retry the Insert Process.
Online versus You can execute the process online or in batch. When online,
Batch execution status is displayed in a pop-up window and, when the
process is completed, an INSERT Process Report is automatically
displayed. When executed in batch, the INSERT Process Report is
output to SYSOUT or another user-designated file.
After typing your specifications for the Insert Process, press ENTER
to direct MOVE to perform the process.
More Details The remainder of this manual provides details on all of the MOVE
panels, facilities, and accompanying commands. It emphasizes the
core capability provided by MOVE, the ability to copy relationally
intact sets of DB2 data and object definitions.
The functions used to create a new Access Definition are the same as
those used to modify an existing Access Definition. You can initiate the
creation of an Access Definition by specifying a unique name to be
assigned to the new Access Definition. You can use an existing Access
Definition as a model and save it under a new name.
User Manual 41
3. Specify Access Definitions
When you select the ADS option, the Choose an Access Definition
panel is displayed. Specify the name of the desired Access Definition.
If you do not know the name, leave one or more of the fields blank or
use DB2 LIKE syntax in one or more of the fields. A selection list
based on the specifications on this panel is displayed.
Group
User
Name
The Choose an Access Definition panel prompts for the three parts
of the Access Definition name.
Use '_' for DB2 LIKE Specifies whether or not the underscore, '_',
character is to be used as a DB2 LIKE character or
used literally as part of the name.
User Manual 43
3. Specify Access Definitions
Obtain Selection You may use DB2 LIKE syntax in any of the fields or leave one or
List more fields blank to obtain a selection list. The content of the
selection list is determined by the values specified for Group, User,
and Name.
Group A%
User JAA
Name blank or %
Subsequent Use The Group, User, and Name values specified on this panel are stored
in your profile. The next time you display this panel, those values are
automatically provided in the fields. You may change any of these
values.
Primary The END command or the CANCEL command can be used to return
Commands to the previous menu. The OPTIONS command can be used to
display the User Options panel to specify the user options.
Cmd Field for line commands. The available line commands are:
User Manual 45
3. Specify Access Definitions
Access Defintion Group The group name supplied when the Access Definition
was created.
Access Definition To display the attributes of an Access Definition, type I in the Cmd
Attributes field next to the name of the Access Definition. The following figure
shows the Access Definition Attributes panel.
Group : GROUP
User : USER
Name : ADSAMPLE
Number of Tables : 6
Start Table : CUSTOMERS
Default Creator ID : PSTDEMO
User Manual 47
3. Specify Access Definitions
Object Attributes To modify the description and security status attributes of an Access
Definition, type AT in the Cmd field next to the name of the Access
Definition. The description and security status are specified on the
Object Attributes panel.
+-----------------------Object Attributes-----------------------+
¦ ¦
¦ Object Name: GRP.USER.ADSAMPLE ¦
¦ ¦
¦ Modify the attributes below as needed. ¦
¦ ¦
¦ Description ===> Sample Access Defintion ¦
¦ ¦
¦ Security Status===> PUBLIC (PUBLIC, PRIVATE, READONLY) ¦
¦ ¦
¦ Use END command to accept any changes and return. ¦
¦ Use CANCEL command to ignore any changes and return. ¦
¦ ¦
+---------------------------------------------------------------
Copy an Access To copy an Access Definition, type C in the Cmd field next to the
Definition name of the Access Definition to be copied. The following figure
shows the Copy Access Definition panel.
The Copy Access Definition panel displays the name of the source
Access Definition and prompts for a new three-part name for the copy
operation.
Rename an To rename an Access Definition, type R in the Cmd field next to the
Access Definition name of the Access Definition to be renamed. The following figure
shows the Rename Access Definition panel.
Available The following primary commands are available when the Select
Commands Access Definitions panel is displayed:
The S line command and the SELECT primary command can be used
to select an Access Definition. When a primary command is used, the
named Access Definition does not have to be one that is included in
the selection list.
Terminate List Use the END command or the CANCEL command to return to the
Choose an Access Definition panel.
User Manual 49
3. Specify Access Definitions
The following diagram shows how the panels are arranged. The name
of each panel is specified in bold text. The command that displays the
panel from the Select Tables/Views for AD panel is also displayed in
each panel box.
The following sections discuss each of these panels and how they are
used to specify the set of source data that is to be extracted.
These panels are available from the Extract Process menu as well as
through the Main Menu option, ADS. For example, Option 1
TABLES on the Extract Process menu displays the Select
Tables/Views for AD panel. All of the panels described above can
be accessed from this panel. Option 2 PATHS on the Extract
Process menu displays the Specify Relationship Usage panel. (The
Extract Process menu is available from the MIGRATION Option on
the Main Menu. See Section 5. Data Migration for more
information.)
Two Pages When Access for DB2 and MOVE are available, this panel is
presented on two screens, a left-hand and a right-hand “page”. To
indicate the presence of right and left pages, More followed by an
arrow is presented in the upper right of the panel. The direction of the
arrow indicates whether the remaining prompts are to the right or left.
Use the primary commands LEFT and RIGHT or the assigned
function keys to scroll the pages horizontally.
When Access for DB2 is not available, only the right-hand page is
displayed. (See Figure 24. Select Tables/Views for AD - Criteria
Portion on page 56.) This discussion assumes both products are
installed.
Initial Display If an existing Access Definition is selected, the set of tables defined
for that Access Definition is shown. If the Access Definition is being
created, there are no table names to display and space is provided to
enter the name of a table to be included. A variety of commands are
available to help populate this list. For example, you can specify the
name of a single table and use the GET TABLES RELATED ALL
command to populate the list with all of the tables related to that
single table.
User Manual 51
3. Specify Access Definitions
Sample Display Assume that the Access Definition named ADSAMPLE has been
selected and contains the name of one table, CUSTOMERS. The left-
hand page of the Select Tables/Views for AD panel is shown with
the fully qualified name of the current Access Definition on the title
line.
Primary: COL, SEL, SQL, REL, POINT, GROUP, GET TABLES RELATED, INDENT, ARC
Line : COL, SEL, SQL, ALL, GR(A), GP(A), GC(A), EXP, ARC
Start Table Name of the table from which data is extracted first.
If the Creator ID for the Start Table is not the same
as the default, the table name must be fully qualified.
Any table defined in the Access Definition may be
selected as the Start Table. If the field is left blank,
the first table in the list is the default Start Table.
Conversely, if the table named in the Start Table
field is not in the Access Definition, it is added. You
may specify a partial name, with wild card
characters to generate a selection list.
User Manual 53
3. Specify Access Definitions
be included.
User Manual 55
3. Specify Access Definitions
Primary: COL, SEL, SQL, REL, POINT, GROUP, GET TABLES RELATED, INDENT, ARC
Line: COL, SEL, SQL, ALL, GR(A), GP(A), GC(A), EXP, ARC
Panel Fields Many of the fields on this panel are also displayed on the left-hand
page and are described previously in this section. The following fields
are displayed only on this portion.
Top and bottom markers indicate the first and last table names in the
list on both the left and right pages of the panel.
Description You can specify a description for the Access Definition. Use the
ATTRIBUTES command to display the Object Attributes panel.
This panel provides a 40-character area to display and edit the
description. (Site management determines whether this panel also
displays a prompt for Security Status.) For additional information
about the Object Attributes panel see Specify Description and
Security Status in Section 6.1 User Options.
Available The following commands are available when the Select Tables/Views
Commands for AD panel is displayed:
User Manual 57
3. Specify Access Definitions
LIST TABLES The LIST TABLES command is used to display an alphabetical list
of tables from which one or more may be selected. A name pattern
may be specified using DB2 LIKE syntax to limit the selection list. If
a name pattern is not specified, the list includes all tables for the
default Creator ID. For example to list all tables that begin with A
for the default Creator ID use:
LIST TABLES A%
You can include additional operands (DB, TS, PL, or PKG) to limit
the list to tables in a specific database, tablespace, plan, or package.
These operands allow DB2 LIKE syntax. For example to list all
tables that begin with A for the default Creator ID in a database
named PST1, specify:
You can use DB2 LIKE syntax for the value for the operands DB,
TS, PL, or PKG.
LIST VIEWS The LIST VIEWS command is used to display an alphabetical list of
views from which one or more may be selected. A name pattern may
be specified.
LIST ALIASES The LIST ALIASES command is used to display an alphabetical list
of aliases from which one or more may be selected. A name pattern
may be specified.
LIST SYNONYMS The LIST SYNONYMS command is used to display an alphabetical list
of synonyms for the current SQLID from which one or more may be
selected. (This command does not accept DB2 LIKE syntax.)
Primary: COL, SEL, SQL, REL, POINT, GROUP, GET TABLES RELATED, INDENT, ARC
Line : COL, SEL, SQL, ALL, GR(A), GP(A), GC(A), EXP, ARC
Table Selected In this example, the ORDERS table is selected by typing S in the
Cmd field of the selection list. END or ENTER is used to signal that
table selection is complete. The Select Tables/Views for AD panel is
redisplayed and includes the selected table.
Primary: COL, SEL, SQL, REL, POINT, GROUP, GET TABLES RELATED, INDENT, ARC
Line: COL, SEL, SQL, ALL, GR(A), GP(A), GC(A), EXP, ARC
User Manual 59
3. Specify Access Definitions
The selection list can be displayed again as needed. The selection list
will not contain any tables that are already included in the Access
Definition.
Selection List of In addition to a selection list of all tables, a selection list of only the
Related Tables tables related to a specific table can be displayed. The LIST
TABLES RELATED primary command or the LR line command are
used to display the list of tables related to a specific table. The LIST
TABLES RELATED command requires that the name of a table be
specified. For example, to display a list of tables that are related to
the CUSTOMERS table using the default Creator ID, enter:
and positioning the cursor at the line containing the name CUSTOMERS.
You can also use the List Related line command, LR.
The display lists the names of the related tables, the source of the
relationship definition, and the type of table in the relationship as
either parent or child. The source of the relationship definition is
specified as DB2 for those relationships obtained from the DB2
Catalog and as PST for those defined to the Princeton Softech
Directory.
Tables can be selected from the list of related tables in the same
manner as selecting tables from the full table list obtained using the
LIST TABLES primary command. This list can be redisplayed as
needed.
The GET TABLES RELATED command obtains the same list as the
LIST RELATED command except that GET TABLES RELATED
automatically includes the related tables in the Access Definition. A
selection list is not presented. You may delete any unwanted related
tables.
For example, assume the four tables in the following diagram are
related as shown. The arrows indicate the direction of the relationship
as parent to child.
Specifying GET TABLES RELATED ALL for any one of the tables
in the diagram will populate the table list with all of the table names.
Comparable line commands, GRn, GRA, GPn, GPA, GCn and GCA
are also available. Enter the line command in the line command area
of any table name on the Select Tables/Views for AD panel.
You may find, when using the GET RELATED or LIST RELATED
commands, that one or more tables you expected are not included or
tables you did not expect are included. You can create needed
relationships and display the tables in a format based on their
relationships.
User Manual 61
3. Specify Access Definitions
Creating A relationship does not exist when an expected table is not included
Relationships by GET RELATED or LIST RELATED processing. You can create
additional relationships using the CREATE RELATIONSHIP
command on the Select Tables/Views for AD panel. This displays
the panels used to define relationships stored in the Princeton Softech
Directory. (The Definitions option on the Main Menu also displays
these panels. The information about defining relationships is
discussed in Section 4.2 Relationships.)
When you signal that you have completed defining the relationship
using END or CANCEL, you are returned to the Select
Tables/Views for AD panel. When you execute GET RELATED or
LIST RELATED, the newly related tables are included.
Displaying The list of the tables in the Access Definition can be viewed in a format
Relationships that shows parent-child relationships. This information may be helpful
when determining which tables are to be included in the Access
Definition. Multiple references to a table are indicated. Use the
INDENT command on the Select Tables/Views for AD panel or on the
Specify Relationship Usage panel to display the indented list.
Parent/Child Indicators
Except for the Start Table, the table name is
prefixed to indicate whether it is the parent or
the child in the relationship defined between
the named table and the table under which it
is indented. The prefix is either:
C: Child
P: Parent
Cycle Indicator
Any table that is included in a cycle is noted
by the suffix (CYCLE:n) where n specifies
the line numbers of the other tables in the
cycle.
User Manual 63
3. Specify Access Definitions
Any tables that have been selected as reference tables are noted at the
bottom of the list and not directly included in the formatted list.
Also, any table included on the list that does not have a relationship
with another table on the list is not included in the formatted list.
These “unconnected tables” are listed at the bottom after the reference
tables.
On the Select Tables/Views for AD panel, you can scroll the list of
tables using UP, DOWN, TOP, and BOTTOM. You can also use the
FIND command to locate a table name by specifying all or part of the
name with the command.
To edit the list of tables, you can directly overtype a table name or use
line commands.
Line Commands The line commands available for editing include standard ISPF-like
commands to manipulate the order of the tables and to add new tables.
Copy C or CC
Delete D or DD
Insert I
Move M or MM
Repeat R or RR
Use A or B to indicate destination of a copy or move
operation.
Each table name must be unique. Any editing can result in duplicate
table names, which must be resolved before saving or using the
Access Definition.
Rearranging the order in which the tables are listed has no impact on
the sequence in which the data is extracted from the tables when the
Access Definition is used by MOVE to copy DB2 data.
Delete Names Table names may be deleted by using the Delete line commands, by
spacing over the name, or by using the Erase EOF key in the table
name field. Although any number of tables can be deleted from the
Access Definition, at least one table must be specified. If all tables
are deleted from the Access Definition and the Select Tables/Views
for AD panel processing is terminated, the Access Definition is
automatically deleted. If the user option, Confirm Delete, is defined
as YES, you will be prompted for confirmation before the Access
Definition is deleted.
Modify Name If the name of a table is modified, it is assumed that you are deleting
the table and specifying another one, therefore any column
specifications or SQL WHERE Clause for the original named table
are deleted. Also, any pertinent relationships are removed from the
list displayed on the Specify Relationship Usage panel. However, if
only the Creator ID portion of the table name is modified, the column
specifications and SQL WHERE Clause, if any, are retained. Also, if
any of the previously listed relationships are not defined for the table
name combined with the new Default Creator ID, the relationships are
retained in UNKNOWN status unless specifically deleted. Additional
relationships, if any, are added.
User Manual 65
3. Specify Access Definitions
Line Commands The line commands listed on the Select Tables/Views for AD panel
are discussed with the Cmd field for Figure 23. Select Tables/Views
for AD – Access Rights on page 52.
SAVE Command Use the SAVE command to store the Access Definition under the
current name or a new name. For more information see the
Relational Tools Command Reference Manual.
CANCEL The CANCEL command returns to the previous panel. Any data
Abandons editing or line commands that are present are ignored. All changes,
Changes including those that have introduced errors, are abandoned. Any
specifications previously stored by the SAVE command are retained.
User Manual 67
3. Specify Access Definitions
When more than one form of criteria is specified, they are combined.
However, if Point-and-Shoot values are specified for a Start Table
along with selection criteria, a prompt is displayed on the Specify
EXTRACT Parameters and Execute panel enabling you to specify
whether only the Point-and-Shoot values or both the values and
selection criteria are to be used.
Prompts for a random factor and a row limit for a table are provided
on the Select Tables/Views for AD panel and are discussed in
Section 3.3 Table/View Selection. The Point-and-Shoot facility is
available from the Select Tables/Views for AD panel and is
discussed in Section 3.5 Using the Point-and-Shoot Facility. Group
selection processing is available from the Select Tables/Views for
AD panel and is discussed in Section 3.6 Group Selection
Processing.
The prompts for selection criteria and an SQL WHERE clause are
displayed on different panels and discussed with the appropriate panel
description in the following sections.
ALL Command To remove the selection criteria and the SQL WHERE Clause
specification from a table, use the ALL primary or line command on the
Select Tables/Views for AD panel. For example, to remove the criteria
for the CUSTOMERS table, you can specify the primary command as:
ALL CUSTOMERS
Selection criteria limit the set of rows extracted from each table and
determine which rows are displayed during a Point-and-Shoot session.
Selection criteria can be specified for one or more columns.
SEL Command For example, to specify selection criteria for the CUSTOMERS table
using the primary command enter:
SEL CUSTOMERS
Alternatively, you can enter the line command, SEL, in the Cmd field
next to the table name as shown in the following figure. (This figure
assumes that four tables have been specified for the Access Definition
GRP.USER.ADSAMPLE.)
Primary: COL, SEL, SQL, REL, POINT, GROUP, GET TABLES RELATED, INDENT, ARC
Line: COL, SEL, SQL, ALL, GR(A), GP(A), GP(C), EXP, ARC
User Manual 69
3. Specify Access Definitions
M or MM Move line.
A or B Destination for move.
Z Zoom to display all prompts for
each column on a single panel.
Valid Operators
= <> ¬=
> >= ¬>
< <= ¬<
User Manual 71
3. Specify Access Definitions
Panel Fields The information on this portion of the panel is used for a Point-and-
Shoot or browse session to determine how data is displayed. In
addition to the Cmd field and the Column Name field, the panel
includes:
Sort Specifies the sort criteria for displaying the data for
a Point-and-Shoot session. If values are not
specified, the order in which rows are displayed is
undetermined.
User Manual 73
3. Specify Access Definitions
L Left-justified.
R Right-justified.
C Centered. Default.
Data Type Shows the data type and dimension of each column. For
the most part, the DB2 data type format is displayed.
For example, CHAR(15) and DECIMAL(10,2) are
displayed as such. However, due to space limitations on
the panel, the following data type specifications are
displayed in a shortened format:
Available Commands The primary commands available on the Describe Columns for AD
panel include:
To display all of the information for a single column on one panel rather
than scrolling left and right to complete the specifications, use the ZOOM
command. This command toggles between displaying the information on
two panelsDescribe Columns for AD and Specify Selection
Criteriaand a one-panel single column display. ZOOM can be
assigned to a program function key.
Zoom Line The Zoom line command can also be used to zoom the display for a
Command specific column by entering Z in the Cmd field of the column on the
Describe Columns for AD or the Specify Selection Criteria for AD
panels. Use the ZOOM primary command to return to the column list
display.
User Manual 75
3. Specify Access Definitions
This panel prompts for the same information as the two panels,
Describe Columns for AD and Specify Selection Criteria for AD.
Notation is provided to the right of the Table Name to indicate the
relative position of the currently displayed column and the total
number of columns in the table.
The prompt for Access Rights is only displayed when Access for
DB2 is available.
Available During a zoomed display, the scrolling commands UP, DOWN, TOP,
Commands
and BOTTOM are available to display the previous, next, first, and
last column.
SQL Primary From the Select Tables/Views for AD panel, specify SQL followed
Command by the desired table name to display the SQL WHERE Clause panel.
From the Specify Selection Criteria for AD or the Describe
SQL Line You can display the SQL WHERE Clause panel for a specific table
Command on the Select Tables/Views for AD panel by typing SQL in the Cmd
field next to the desired name.
For reference, the name of the table is provided in the SELECT FROM
heading near the top of the panel. This heading includes an ellipsis, ...,
following SELECT to indicate the column list will include all columns
because, generally, the list is too long to provide in the allocated space.
Correlation Name To simplify entering the table name in the SQL WHERE clause, you can
specify a 1–18 character string for the prompt Correlation Name and
substitute that string for the fully qualified table name in the FROM
clause.
This is especially useful for qualifying a column name when there are
multiple tables referenced in the SQL.
Data area Specify the desired SQL in the data area of the panel. The data area
displays the SQL in segments of six lines containing 72 positions. A
maximum of 200 lines is available for specifying the SQL and self-
documenting comments. Standard DB2 conventions apply to
comments; each line must begin with two hyphens (--).
This area is scrollable. Notation in the upper right above the data
area indicates the total number of lines and the relative position of the
first displayed line.
Editing SQL Specify the desired SQL WHERE Clause using standard DB2 SQL
WHERE Clause format. To facilitate editing, a Cmd field is provided for each line.
User Manual 77
3. Specify Access Definitions
When you type the data, all leading and trailing spaces on each line
are maintained. Only the trailing spaces at the end of the last line of
the SQL WHERE clause are deleted.
LIST COLUMNS You can display a list of columns in the table using the LIST
COLUMNS primary command. This list can be scrolled and
selections can be made directly from this list using the Select line
command. When a column is selected, it is added to the end of the
current SQL WHERE clause text.
SQLEDIT You can use the SQLEDIT command to invoke an ISPF edit session
for the current SQL WHERE clause. All of the standard ISPF
facilities are available. You can use the ISPF COPY command to
insert data from a file and edit as desired.
When you terminate the ISPF session using END, the Enter an SQL
WHERE Clause for a Table or View panel is redisplayed. The
edited data is inserted into the panel.
Delete WHERE The SQL WHERE clause is deleted when all lines are blank. This
Clause can be accomplished by overtyping the WHERE Clause with blanks
or pressing the Erase EOF key for each line of text.
Specification After you have completed specifying the SQL WHERE clause, use
Complete END to save the current specifications and terminate editing.
When you use END or SAVE, the SQL WHERE clause is validated.
The clause must be 200 lines or less and the clause must be
acceptable to DB2. In either case, a message is displayed detailing
User Manual 79
3. Specify Access Definitions
the error. Errors must be resolved before you can save the SQL
WHERE clause and exit this panel.
When the SQL WHERE Clause is valid, the panel that was
previously displayed is redisplayed.
Primary: COL, SEL, SQL, REL, POINT, GROUP, GET TABLES RELATED, INDENT, ARC
Line: COL, SEL, SQL, ALL, GR(A), GP(A), GC(A), EXP, ARC
Selection Criteria When selection criteria has been specified on both the Specify
and SQL WHERE Selection Criteria for AD panel and the SQL WHERE Clause
Clause panel, the two are logically ANDed. The presence of both is indicated
by SEL/SQL in the Status field of the Select Tables/Views for AD
panel.
Archive Criteria Archive criteria determine the columns that are indexed in the PST
Directory and limit the set of rows archived from each table. Archive
criteria can be specified for one or more columns and are combined
with selection and other criteria in an Archive Process. This
command is only available if Archive for DB2 is installed.
When selection criteria and column specifications for the current table
are completed, use END to return to the Select Tables/Views for AD
panel. The Status field in the Select Tables/Views for AD panel will
contain COL when specifications have been made for the columns of
the selected table. The Status field will contain SEL when selection
Primary: COL, SEL, SQL, REL, POINT, GROUP, GET TABLES RELATED, INDENT, ARC
Line: COL, SEL, SQL, ALL, GR(A), GP(A), GC(A), EXP, ARC
User Manual 81
3. Specify Access Definitions
Primary Key The specific rows you select from the Start Table in a Point-and-
Shoot session are identified by the primary key values, therefore, the
Start Table must have a primary key.
Value Stored The primary key values are stored in a sequential or partitioned data
set that you specify. If the data set does not exist, MOVE prompts
for the required information and allocates it for you. (See Appendix
B. Allocating External Files for more information.) Once saved,
these values can be used and modified as needed.
POINT Command Use the POINT command on the Select Tables/Views for AD panel
to invoke the Point-and-Shoot facility. MOVE prompts for the name
of an Input DSN. The Input DSN is a data set that contains
previously specified primary key values for the Start Table.
Primary: COL, SEL, SQL, REL, POINT, GROUP, GET TABLES RELATED, INDENT, ARC
Line: COL, SEL, SQL, ALL, GR(A), GP(A), GC(A), EXP, ARC
<<MORE
Default Creator ID ===> PSTDEMO
St +----------------- Start Table Row List Processing -------------------+
| |
| Specify Input DSN If You Want to Use Previously Saved Row List |
| Input DSN ===> |
| |
| Press ENTER to Start Point-and-Shoot Session |
| Enter END Command to Return to Table List |
| Enter CANCEL Command to Cancel POINT Command |
| |
| Special Line Commands Available for Row Selection: |
| SR, SSR - Select Start Table Row and All Related Rows |
| UR, UUR - UnSelect Start Table Row and All Related Rows |
+---------------------------------------------------------------------+
How the values in the Input DSN field are handled is based on
whether you use ENTER, END, or CANCEL as listed on the panel.
User Manual 83
3. Specify Access Definitions
previous selections.
Intervening Changes may have been made between the time the primary key
Changes values were originally selected and stored, and the current Point-and-
Shoot session. Due to these changes, MOVE may be unable to find
rows for primary key values saved in the Point-and-Shoot file because
the rows were deleted or changed in the database. If this occurs,
MOVE displays a prompt notifying you of the situation. The number
of rows previously saved in the Point-and-Shoot file are also
displayed. The following options are provided:
The following sections discuss the facilities that are available during a
Point-and-Shoot session. For more information about the primary and
line commands discussed in these sections, see the Relational Tools
Command Reference Manual.
D Data
Begin with data from the named Start Table and all
subsequent tables. This is the default.
Selection Criteria The Specify Selection Criteria for Table panel is displayed to
Prompt prompt for selection criteria. All of the facilities for the Specify
Selection Criteria for AD panel when defining an Access Definition
are available. (For details on this panel see Section 3.4 Specifying
Criteria.) After specifying the desired selection criteria, use ENTER
or END to display the data.
If the selection criteria for the Start Table are changed such that the
set of rows in the Point-and-Shoot file are not appropriate, MOVE
will prompt you to specify whether to continue with the session or to
retain or discard the previously selected rows.
User Manual 85
3. Specify Access Definitions
Display Format There are two basic display formats: columnar and sidelabels.
Columnar format is the default format. In columnar format the
column headings are displayed across the top of the panel and the data
is displayed in columns beneath the headings. Many rows from the
table are displayed:
In sidelabels format, the column headings are displayed down the left
side of the panel and the data is displayed to the right of the headings.
The display is focused on a single row, however, more columns are
displayed for that row:
CUST_ID : 07053
CUSTNAME : Replay Video
ADDRESS : 9032 Dickerson St
CITY : Amherst
STATE : MA
ZIP : 01002
YTD_SALES : 123.00
SALESMAN_ID : RP0013
PHONE_NUMBER : 5171234567
You can toggle between the two display formats by using the
SIDELABELS primary command or the SID line command.
Columnar Format The following figure highlights some key screen elements displayed
during a typical columnar format edit session.
Sidelabels Format The same screen elements are displayed when using sidelabels format,
however, the location may differ.
CUST_ID : 07053
CUSTNAME : Replay Video
ADDRESS = 9032 Dickerson St
CITY : Amherst
STATE : MA
ZIP : 01002
YTD_SALES : 123.00
SALESMAN_ID : RP0013
PHONE_NUMBER : 5171234567
User Manual 87
3. Specify Access Definitions
Status Flag Field Status flag field identifies which rows have
been selected by displaying an S in this field
for each selected row. In Figure 37.
Columnar Screen Elements, three rows have
been selected.
The number of rows selected from the Start Table to be used for an
Extract Process is always displayed in the upper right-hand corner of
the screen. In Figure 37. Columnar Screen Elements, three rows
have been selected.
Screen Size When the number of rows to be displayed exceeds the available
Considerations number of lines on the screen, the rows can be scrolled vertically
using the UP and DOWN commands (usually assigned to PF7 and
PF8). When all of the columns do not fit on the screen, the display
can be scrolled horizontally using the RIGHT and LEFT commands
(usually assigned to PF10 and PF11). These commands perform the
same functions in both columnar and sidelabels format.
COUNT Command When the Maximum Fetch Limit is less than the total number of rows
that satisfy the criteria, a message displays indicating that all possible
rows have not been retrieved. You can use the COUNT command to
display the total number of rows in a named table that satisfies the
search criteria. You can respecify the selection criteria to retrieve
fewer rows.
MAX ROWS To view all the rows that satisfy the current search criteria, you can
Command increase the maximum number of retrieved rows using the MAX
ROWS command. For example, if your Maximum Fetch Limit is 200
User Manual 89
3. Specify Access Definitions
rows, and the COUNT command shows that there are 300 rows that
satisfy the criteria, you can use the MAX ROWS command to change
the Maximum Fetch Limit to 300. Specify MAX ROWS 300 and
refetch. This command only affects the current session. To increase
the maximum number of fetch rows for all of your sessions, use the
Maximum Fetch Rows option on the Editor and Display Options
panel.
CH CHAR
VCH VARCHAR
LVR LONG VARCHAR
DEC DECIMAL
INT INTEGER
SMALLINT SMALLINT
DATE DATE
TIME TIME
TIMESTAMP TIMESTAMP
SNGL FLOAT SINGLE FLOAT
DBL FLOAT DOUBLE FLOAT
The JOIN, UNJOIN, and START commands are not available when
using sidelabels format.
Line Commands The following line commands are available during a Point-and-Shoot
session.
Exclude X, Xn, XX
First F, Fn
Join J
Last L, Ln
Select Related SR, SSR
Show S, SS
Sidelabels SID
Unselect Related UR, UUR
Unjoin UNJ
User Manual 91
3. Specify Access Definitions
Zoom Z
The J and UNJ line commands are not available when using sidelabels
format.
Rows are selected from the Start Table using the Select Related line
commands or the SELECT RELATED primary command. For
example, in the following figure rows are selected by specifying the
SR and SSR line commands.
Individual rows that have been selected can be unselected using the
Unselect Related line command or the UNSELECT RELATED
primary command. In the following figure, the last selected row,
Reely Great Videos is unselected.
Only rows in the Start Table can be directly selected and unselected.
However, the related rows from the other tables included in the
Extract Process will also be extracted if the related Start Table row is
extracted.
Several commands are available to scroll the data. You can scroll
vertically when the number of rows to display exceeds the number of
lines available on the screen. You can scroll horizontally when the
width of the data exceeds the width of the screen.
User Manual 93
3. Specify Access Definitions
You can scroll horizontally using LEFT and RIGHT to display the
remaining columns. Operands for these commands enable you to
scroll by column name, numeric value, or cursor position.
For example, assume that the combined width of the displayed column
data for the CUSTOMERS table exceeds the width of the screen,
therefore the display must be scrolled left and right to view all of the
data. By locking the column named CUSTNAME, the remaining
columns in the CUSTOMERS table can be scrolled left or right, but
CUSTNAME will always remain on the screen.
Assume that the LOCK command has been entered to retain the
CUSTNAME column on the display. The column is repositioned to
the left of the display and is retained in that position regardless of left
and right scrolling.
Identifying Locked The locked column is identified by a series of plus signs, +, under the
Columns column heading. The first locked column is placed in the left-most
position. Each succeeding locked column is positioned to the right of
the previously locked columns.
Locking Multiple Any series of columns may be locked as long as enough space remains
Columns to display the widest column that is not locked yet in addition to the
locked columns. The reserved area is determined by the user-defined
maximum display width for any column. For example, if the user-
defined maximum display width is 20 characters, then the right-most
21 character positions on the screen are reserved for unlocked
columns. This ensures that at least one unlocked column is always
displayed. More columns may be displayed if they fit, in their
entirety, in the remaining area.
Use LOCK KEY to lock all of the columns that compose the primary
key in a single command execution.
Unlocking The UNLOCK command with no operands unlocks all of the locked
Columns columns. Specify the name of the column with the command to
unlock only that column.
User Manual 95
3. Specify Access Definitions
The excluded rows are replaced with a message indicating the location
and number of excluded rows.
Note that the row count changes to reflect the excluded lines. The
excluded lines message counts as one line.
The FIND command and the ONLY command are available to locate
specific data.
FIND Command The FIND command locates a row containing a specified value and
positions the cursor to that row. If the row is not currently displayed,
it is scrolled to the top of the display in the window of the searched
table. In a multiple table display, any lower level tables that are
displayed are automatically scrolled appropriately.
In the previous example, the search string, MA, will match MA, ma,
Ma, and mA. To ensure a case-sensitive search, enclose the string in
apostrophes preceded by a C as in, C'MA'.
FIND ALL The FIND ALL command is useful when issued after excluding all
rows, to display all occurrences of the specified character string. For
example, to display all rows containing "AMHERST" specify:
EXCLUDE ALL
FIND ALL AMHERST
ONLY Command The only command provides in one command the results obtained
from executing EXCLUDE ALL followed by FIND ALL. For
example, to display all rows containing "AMHERST" specify:
ONLY AMHERST
You can limit the search to a specific column. For example, to limit
the search to the CITY column specify:
User Manual 97
3. Specify Access Definitions
When the maximum width does not provide sufficient display space
for a specific column or changing the maximum display width is
undesirable, the EXPAND primary command can be used to display
all of the data in that column. This command can be used on data
types of CHAR, VARCHAR, and LONG VARCHAR, even if the
length of the data does not exceed the maximum display width. This
command can be used on data types of TIMESTAMP and DECIMAL
only if the data exceeds the maximum display width.
The column name and the actual length are displayed on the top
borderline. The row count indicator is also displayed.
Scrolling When the column length exceeds the width of the expanded display,
66 characters, the data can be scrolled horizontally using the LEFT
and RIGHT commands. The starting and ending column positions
currently displayed are indicated on the bottom border of the window.
The following line commands can be used to scroll left and right:
Use the UP and DOWN commands to scroll the data in the expanded
window by row. The row counter displayed on the top border of the
window indicates which row is currently displayed.
When you have finished viewing the expanded data, use END to
terminate the expanded display.
User Manual 99
3. Specify Access Definitions
When data is displayed in hex mode, each row of data uses three lines
on the display. The first line is the text representation of the data.
The second and third lines are the same data displayed in hex format.
The two digits making up the hex representation of each EBCDIC
character are displayed directly under that character, as shown in the
following figure.
The same line commands and primary commands that are available in
standard display mode are available in hex mode. Some commands,
such as the FIND command, have operands specifically for hex mode.
FIND Command To locate a specific hex value anywhere in the data, use the FIND
command with the HEX operand. This is useful when you want to
locate a non-displayable value. For example, to locate the first
occurrence of the hex value 00, enter FIND HEX 00.
To locate the next occurrence of the search value, 00 in this case, use
the RFIND command (usually assigned to PF5).
Trailing Blanks Trailing blanks in CHAR columns are stored in the database as
and Nulls blanks. They are displayed in hex mode as the hex value 40. Trailing
blanks in VARCHAR columns are not stored in the database. They
are displayed in hex mode as the hex value 00.
SHIP_ID : 106
SHIP_INSTR_ID : 10013
ORDER_SHIP_INSTR = Federal Express. This is the third time this orde
(51 - 100) = r has been sent. Customer claims that first two or
SHIP_UPDATED : 1999-03-09-11.04.27.000000
********************************** BOTTOM ************************************
3.5.9.1 Scrolling
Locking a Column You can lock one or more columns using the LOCK command. The
locked columns are positioned to the beginning of the display and
remain in that position when the display is scrolled. For example, if
LOCK SHIP_UPDATED is entered on the command line, the
SHIP_UPDATED column is positioned to the beginning of the
display and is marked with a plus sign, +, as shown in the following
figure.
SHIP_UPDATED + 1999-03-09-11.04.27.000000
SHIP_ID : 106
SHIP_INSTR_ID : 10013
ORDER_SHIP_INSTR = Federal Express. This is the third time this orde
(51 - 100) = r has been sent. Customer claims that first two or
*********************************** BOTTOM ***********************************
Column Display The maximum column display width is specified by the Sidelabels
Width Option Max Display Width option on the Editor and Display Options
panel. You can use the OPTIONS EDITOR command to display this
panel. The minimum is 50 characters; the maximum is 32767
characters.
SHIP_ID : 106
SHIP_INSTR_ID : 10013
ORDER_SHIP_INSTR : Federal Express. This is the third time this orde
(51 - 100) : r has been sent. Customer claims that first two or
(101 - 150) : ders never arrived at store. Make sure customer s
(151 - 200) : igns for package.
(201 - 250) :
(251 - 254) :
SHIP_UPDATED : 1999-03-09-11.04.27.000000
************************************ BOTTOM **********************************
The column data begins to the right of the column name and
continues, in 50-character segments, on the next five lines. The
beginning and ending character positions of each segment are
displayed under the column heading.
EXPAND Instead of changing the maximum display width to display all of the
Command data in the column, you can use the EXPAND command to display
the column in an expanded window. Type the EXPAND command at
the command prompt, place the cursor anywhere in the column to be
expanded, and press ENTER.
The displayed data is dependent upon the cursor location when the
command is entered. In the following example, the cursor was
positioned at the beginning of the first line of data in the column or in
the column name field of the column ORDER_SHIP_INSTR when
the EXPAND command was entered.
SHIP_ID : 106
SHIP_INSTR_ID : 10013
ORDER_SHIP_INSTR = Federal Express. This is the third time this orde
If you position the cursor on another line containing data from the
column, the expanded display begins with the data on that line. For
example, if the cursor is positioned on the second line of a wrapped
column, the expanded display starts at position 51. When the width
of the column exceeds the width of the window, the beginning and
ending position of the expanded data is displayed on the bottom of the
expanded window.
Use RIGHT and LEFT to scroll the data within the column.
Use the UP and DOWN commands to scroll the data in the expanded
window by row. The row counter on the top border of the window
indicates which row is currently displayed.
For the most part, the facilities available for columnar display are
available during sidelabels. However, several differences should be
noted.
ATTRIBUTES When the ATTRIBUTES command is used, the column attributes are
Command displayed to the left of the column names. When there is insufficient
space available to display both the attributes and the full column
names, column names are truncated.
Line Commands The line commands available in columnar format are available in
sidelabels format. However, since only a single row is displayed at a
time in sidelabels format, some line commands are better suited for
standard columnar format.
Join Restricted You cannot issue the JOIN command while in sidelabels format, since
this format accommodates one table at a time. However, if multiple
tables are already joined in columnar format, you can specify any
joined table as the target of the SIDELABELS command. If the table
name is omitted, the lowest level table is displayed in sidelabels
format. You can specify the table name or short name (for example,
T1). During the sidelabels display, the joined tables are retained and
redisplayed when you return to columnar format.
Zoom You can display any currently joined table using the ZOOM
command from the sidelabels display.
Join To perform a join, MOVE requires the name of the table to join and a
Requirements relationship between the named table and the anchor table. The
relationship may be defined in the DB2 Catalog or in the Princeton
Softech Directory.
When joining tables, it does not matter which table is the parent and
which is the child. You can join from the parent to the child or from
the child to the parent.
JOIN Command The JOIN primary command or the Join line command is used to join
tables. You can specify a table name with the JOIN command or omit
the table name to generate a selection list of related tables in the
Access Definition.
When the Access Definition contains only one table that is related to
the anchor table, you can enter the JOIN command with or without
that table name to automatically join to that table. For example, if an
Access Definition contains the CUSTOMERS table and the ORDERS
table and these two tables are related, a join can be performed to
include the ORDERS table on the display.
When ENTER is pressed, the two tables are joined as shown in the
following figure. Since the join was specified for CUST_ID 07118,
all of the rows in the ORDERS table having that CUST_ID are
displayed:
The rows in the ORDERS table are identified as selected because the
related row in the Start Table has been selected.
Assign JOIN For convenience, the JOIN command can be assigned to a function
to PF Key key. Then, you position the cursor on the desired anchor row and
press the function key.
When there are several related tables in the Access Definition and you
are not sure of a table name, you can request a selection list of tables.
If the JOIN command is entered without a table name or the J line
command is used, a selection list of related tables is displayed.
The table names are listed on the left side of the prompt. The From
column indicates whether the table is related to the anchor table by a
DB2 or PST relationship, or both. The Type column indicates
whether the table is a child or parent of the anchor table.
Use the S line command to select a table. Press ENTER or use END
to terminate the selection list. If only one relationship exists between
the anchor table and the selected table, the tables are joined as shown
in Figure 54.
Join to Display The selection list includes all related tables in the Access Definition
Cycles even those tables currently displayed. This enables you to browse
cycles during Point-and-Shoot.
Multi-way Joining More than one table can be selected. For information about multi-
way joining see Section 3.5.12 Special Considerations for Multi-
way Joining.
There may be more than one relationship between the anchor table
and the selected table to join. In this situation, the following prompt
is displayed requesting you to select a relationship.
As new tables are joined, the row on which the join is anchored is
displayed along with the related data from the joined table. All
displayed tables can be scrolled. Additional tables can be joined and
unjoined. This section discusses:
After tables are joined, the resulting display shows multiple tables.
For example, assume the ORDERS table has been joined to the
CUSTOMERS table and the DETAILS table has been joined to the
ORDERS table. These tables are displayed as follows:
An information line is provided for each table. This line contains the
name of the table, the identifier supplied by MOVE, the relative row
number and the total number of rows selected for display. The status
flag field contains S for the lower level tables when the Start Table
row is selected.
The TOP marker, before the first line, and the BOTTOM marker,
after the last line, are displayed only for the lowest level table, the
DETAILS table in the figure. These markers indicate the first and
last selected rows of the table.
Display Levels The maximum number of tables or levels that can be displayed
depends on the size of the physical screen being used. This maximum
is computed by subtracting three header lines (title line, command
line, and long message line) from the total number of lines on the
screen, and then dividing that value by five (the minimum number of
lines required for any table display). The result of this division,
regardless of the remainder, is used as the maximum number of
display levels for the current screen. When hexadecimal mode is
activated (requiring three lines to represent each row of data), the
maximum number of display levels for the current screen is reduced.
Although the screen size limits the number of displayed levels, the join
function itself is limited to 64 tables. When the screen cannot fit
another table and a join is requested, the highest level table is removed
from the display, and all lower level tables are repositioned to
accommodate the newly joined table.
Changing Highest The START command can be used to change which table is currently
Display Levels displayed as the highest level table. This is useful when:
• Multiple tables are joined and you want to display more rows than
are currently displayed from the lowest level table.
• Changing from split screen to full screen processing and you want
to display a higher level table in the additional space.
You can also scroll by positioning the cursor to a specific row in any
of the tables and pressing one of the PF keys assigned to scroll. All
lower level tables are scrolled accordingly.
Zoom Line To switch a multi-table display to focus on a single table, the Zoom
Command line command is entered in the Cmd field of a displayed row of the
table to be zoomed. To return to a multi-table display, enter the
Zoom line command in the Cmd field of any displayed row. The row
on which the command is entered becomes the first row displayed for
the table.
ZOOM Primary The ZOOM primary command can be specified with the name of a
Command table to change the display to a single table display including only the
rows from the named table. The ZOOM command with no operands
acts as a toggle between multi-table and single-table displays.
Impact on Joined All joined tables are retained when zoom is used. The single-table
Tables zoomed display can be scrolled and edited. If the table is scrolled during
a zoomed display, any lower level joined tables are logically scrolled.
When the multi-table display is restored, the scrolled data is displayed.
The first displayed line in the CUSTOMERS table is the row that was
displayed when the zoom was requested. If the zoomed display is
scrolled, the first currently displayed row will be the row displayed for
the table when the multi-table display is redisplayed.
The UNJOIN command severs the join between the tables and removes
the unjoined tables from the display. The display is then adjusted to
include additional lines from the new lowest level table if space is
available. Any higher level table not currently displayed is repositioned
at the top of the panel, in the order of lowest to highest, with each
successive execution of the UNJOIN command.
The UNJoin line command can also be used. Type UNJ in the Cmd
field of the highest level table to unjoin. All lower level tables are also
unjoined.
Most tables are related to more than one other table. When multiple
tables are related, several navigational paths are available for joining
when browsing the data. You may find it useful to display the related
data obtained by traversing more than one of these paths. Use multi-
way joining to access more than one related table without losing any
of the paths through the data.
When multiple tables are joined to a single table, the multiple tables
are “stacked” in the order in which they were joined. The most
recently joined table is on top of the second most recent, the second on
top of the third and so on. The table on the top of the stack is
displayed; the other tables are “hidden”. You can display any table
from the stack. Stack handling is “wrapped”.
SHIP_TO
SALES
ORDERS
The SHIP_TO table, the table at the top of the stack, is displayed. If
you display SALES, SHIP_TO is placed at the bottom of the stack
and SALES is pushed up. The order in the stack is:
SALES
ORDERS
SHIP_TO
You can stack multiple tables at any display level of the current session.
If tables are joined below the stacked table, these lower level tables are
hidden when the stacked table is hidden.
Use the Join facility to request a multi-way join when browsing data.
The request can be directed to any display level.
Assuming all three tables are selected, the SHIP-TO table, the last
table on the selection list, is displayed. (The stack is created such that
the last selected table is on the top of the stack and the first selected
table is on the bottom.)
Joining to Another You can stack multiple tables at any display level; therefore, you can
Level request a join to a table other than the lowest level table.
For example, assume ORDERS is the lowest level table and is the
only table joined to CUSTOMERS. You can join a different table to
CUSTOMERS without unjoining ORDERS. To join SHIP_TO to
CUSTOMERS, specify:
JOIN SHIP_TO FROM CUSTOMERS
You can also use DB2 LIKE syntax to display a selection list of
possible tables to join at any level. For example, assume only
ORDERS is joined to CUSTOMERS. To display a selection list to
join additional tables to CUSTOMERS, specify:
JOIN S% FROM CUSTOMERS
All tables that begin with “S” are included on the list. You can select
one or all listed tables.
You can use the level indicator to specify the target for the FROM
operand. For example, the CUSTOMERS table is assigned T1. You
can specify the JOIN command as:
JOIN S% FROM T1
You can use the cursor position to indicate the target table. For example,
rather than include FROM CUSTOMERS or FROM T1 on the
command, you can position the cursor on the CUSTOMERS table and
enter the JOIN command.
Example In the following figure, multiple tables are joined to the CUSTOMERS
table. The ORDERS table, one of the tables in the stack, is displayed.
The STACKED indicator is displayed after the table name.
3.5.12.2 Scrolling
You can set the Editor and Display Option, AutoSwitch Mode, such
that when the parent table is scrolled and the currently displayed child
table has no related rows, AutoSwitch automatically displays the first
child table in the stack that has at least one related row.
For more information about the AutoSwitch Mode, see Section 6.2
Editor and Display Options.
Switching the You can display any “hidden” table in the stack using the SWITCH
Displayed Table command.
SWITCH T2 NEXT
You can also specify the name of a table. To display the ORDERS
table in the stack on the second level, specify:
SWITCH T2 ORDERS
SWITCH T2 ALL
You can also use cursor position to indicate the target level.
Any table in the stack can be joined to lower level tables. However,
only related data is displayed. When the table in the stack is not
displayed, all joined lower levels are not displayed also. If you switch
the display from one table to another, the joined related tables are
included in the switching.
indented.
The prefix is either:
C: Child
P: Parent
Selecting another On the Indented Table Display panel you can select any table in the
table in the stack stack to be the displayed table using the Select line command. The
command can be specified for any table joined to a table in a stack as
well as the stack table. For example, in the figure SHIP_INSTR is
joined to SHIP_TO. SHIP_TO is a table in a stack. You can select
either SHIP_TO or SHIP_INSTR.
Use END on the Indented Table Display panel to return to the edit
session.
3.5.12.4 Unjoining
You can unjoin any table in the stack using the UNJOIN command.
When you unjoin a table in the stack, all lower level tables joined to the
target table are unjoined.
By default, the UNJOIN command unjoins the lowest level. If there are
stacked tables for that level, the displayed table is unjoined, removed
from the stack and the next table on the stack is displayed.
For example, to unjoin all tables in a stack at the lowest display level,
specify:
UNJOIN ALL
When you have created multiple stacks, you can specify the target
stack using the level indicator, either Tn or Vn as displayed on the
panel. For example, to unjoin all tables in the second level stack,
specify:
UNJOIN T2 ALL
The table name is shown in the window heading. The generated SQL
may contain three parts:
Generalized The actual SQL generated by MOVE contains the specific data values
WHERE Clause for columns defined in the relationship. Therefore, the SQL in the
previous figure contained a value for CUST_ID as in:
SELECT ...
FROM PSTDEMO.ORDERS WHERE CUST_ID = '17053'
SELECT ...
FROM PSTDEMO.ORDERS WHERE CUST_ID = CUSTOMERS.CUST_ID
The right hand side of the predicate in the SQL statement is provided
with a meaningful name that represents the processing.
Saving the SHOW You can save or print the output of the SHOW SQL command by
SQL Output using the OUTPUT command. When you enter the OUTPUT
command, the Output Data Options panel is displayed as shown in
the following figure.
If Dataset:
'PSTDEMO.DDL*' or 'PSTDEMO.DDL%'
If SYSOUT:
You can direct the output to a SYSOUT class and use an output
processor, such as SDSF, to print it.
When you have entered all the desired information on this panel, press
ENTER to continue processing. To return to the previous panel
without specifying output data options, use END or CANCEL.
3.5.14 Reporting
Table Name, Tn Specify the table for which all rows are selected.
or LAST
You can specify any active table in the session.
Specify the name by explicit name, assigned Tn or
Vn, or the word LAST (for the lowest level
displayed table). This value combined with the
specification for Process All Tables or One
determines the set of data that is displayed.
A All tables
N Only the named table
D Dataset
S SYSOUT
SYSOUT Class
Destination
Hold
Display Report Specify whether you want to review the prompts for
Parameters report parameters. Specify:
CUSTOMERS
ORDERS
DETAILS
ITEMS
1. To report on all the rows from a single table, specify the table
name and “N” for the prompt Process All Tables or One to
include only one table. For example, to include only all the
DETAILS rows in the report, specify:
The report lists the displayed the single row for the
CUSTOMERS and ORDERS table and each DETAILS row, one
at a time, along with the related ITEMS rows for each of the
DETAILS.
3. To include all the rows from all the tables in the current session,
specify the name of the Start Table and “A” for the prompt Process
All Table or One. For example, assume the CUSTOMERS table is
the Start Table, specify:
Format The format of the rows in the report conforms to the display format in the
editor. A header identifies the table, column headings are presented
above the columns, and the row(s) of data are provided beneath the
headings. You can specify the parameters for the report format.
When there are multiple lower level tables, the data display is handled
similarly to the editor.
• For each table that is not the lowest level table, only one row is
displayed.
• When there are multiple rows for a table that is not the lowest
level table, each row is displayed in order along with the lower
level related rows.
Maximum Report Specify the maximum number of rows fetched for each
Rows per Table table in the report. The value must be from 1 through
the value specified by site management. Leave the
field blank to use the value specified for Max Fetch
Rows in the Editor and Display Options.
Oversized Lines Specify how lines that exceed the maximum width
should be handled. Specify:
New Page per Start Specify whether each Start Table row should be
Table Row printed at the top of a new page. Specify:
Omit Table Name Specify whether or not the line containing the table
Heading Line name and level number for each level is included in the
report.
Y Include heading
N Do not include heading
Y Include heading
N Do not include heading
• Excluded rows are included in the report. When you return to the
session after generating a report, the excluded rows are redisplayed.
When you have completed your selections, use END to return to the
Select Tables/Views for AD panel. A prompt is displayed.
Output DSN Name If an Input DSN was supplied, the name is shown in the Output DSN
field. Press ENTER to update the named data set. You can overtype
the name to create a new data set or update a different existing data
set. This name is saved with the Access Definition and replaces any
previous data set name.
Extract Process If you have entered Point-and-Shoot from within an Extract Process
Note request, the Confirm Row List Processing prompt is displayed as:
Leave the Output DSN field blank to use the Point-and-Shoot Row
List for the current Extract Process only.
Subsequent You can re-enter a Point-and-Shoot session to modify the Start Table
Requests primary key values that were saved. When the POINT command is
entered for a subsequent request during the same session and the
changes were to be temporary, the following is displayed to confirm
that temporary selection is still in effect:
Changing the If you change the Start Table and rows had been specified, MOVE
Start Table notifies you that the Start Table specifications including Point-and-
Shoot values and group selection specifications may be dropped since
they may no longer be appropriate for the new Start Table.
Primary : COL, SEL, SQL, REL, POINT, GROUP, GET TABLES RELATED, INDENT, ARC
Line : COL, SEL, SQL, ALL, GR(A), GP(A), GC(A), EXP, ARC
For group selection processing, enter the GROUP command on the Select
Tables/Views for AD panel. The following prompt is displayed.
Primary : COL, SEL, SQL, REL, POINT, GROUP, GET TABLES RELATED, INDENT, ARC
Column Name To use group selection processing, you must specify the name of the
column in the Start Table to be used for forming groups. Enter this at
the prompt, Column Name to be used for Group. If you are not
sure of the names of the columns in the Start Table, use the LIST
command to display a selection list of the names. When the list is
displayed, use S to select one.
Distinct Values The criteria for selecting the rows can be based on distinct values in the
Limit and Number STATE column. That is, you can specify that a group of rows for some
of Rows for Each number of different states in the STATE column are to be selected. The
states are selected randomly. However, if you want to define which
states are to be used, specify them on the Specify Selection Criteria
panel or on the Specify SQL WHERE Clause panel. Since the selection
criteria is processed first, you can be sure to select rows from only the
states you specified. For example:
• To extract rows for customers from ten different states, specify "10"
for the Number of distinct values to use.
• To extract five rows for each of the ten states, specify “5” in the
Number of rows for each value field.
You can use an asterisk to specify that MOVE is to use all rows
found. For example, specify an asterisk for Number of rows for
each value to obtain all of the rows for each included state.
Alternatively, specify an asterisk for Number of distinct values to
obtain a specific number of rows from all included states. You can
specify an asterisk for either Number of distinct values or Number
of rows for each value, but not both.
After you have specified the group selection processing options, use
ENTER or END to return to the Select Tables/Views for AD panel.
The status of the group selection processing is displayed in the Start
Table Options field.
Primary: COL, SEL, SQL, REL, POINT, GROUP, GET TABLES RELATED, INDENT, ARC
Line: COL, SEL, SQL, ALL, GR(A), GP(A), GC(A), EXP, ARC
Data only These specifications impact only the data to be extracted. When
relationship definitions are to be extracted, all relationships, including
unselected relationships and relationships for reference tables, are
extracted.
Q1: If a Child Row is Included, Include its Parent Row to Satisfy the RI Rule?
Q2: If a Parent Row is Included to Satisfy any RI Rule, Include All Child Rows?
Q Q Child --Relation--
Cmd Status 1 2 Limit Parent Table Child Table Name Type
--- ------ - - ----- ---------------------- ---------------------- -------- ---
*********************************** TOP ***********************************
___ NEW Y N *CUSTOMERS ORDERS RCO DB2
___ NEW Y N *CUSTOMERS ORDERS RTCOR PST
___ NEW Y N ORDERS DETAILS ROD DB2
___ NEW Y N *DETAILS ITEMS RID DB2
___ NEW Y N *DETAILS ITEMS RTDI PST
********************************** BOTTOM *********************************
PST Directory
QUES1/QUES2 The commands QUES1 and QUES2 can be used to change the
specification for Q1 and Q2 respectively to either YES or NO for all
listed relationships. This is useful, for example, when there are many
relationships and you want to override the default setting for most of
them or, after making several changes, you want to reset the
specifications to the default.
When you signal that you have completed defining the relationship
using END or CANCEL, you are returned to the Specify
Relationship Usage panel. The new relationships that you have
defined between tables on the table list are included in the list of
relationships and assigned the NEW status.
NEW Status The first time a relationship is listed, it is assigned the NEW status as
shown in Figure 75. Selecting Relationships for MOVE Functions.
Select and On the relationship list, you can select and unselect relationships to be
Unselect used for the Extract Process. Use the S line command to select a
relationship and U to unselect a relationship.
Q1: If a Child Row is Included, Include its Parent Row to Satisfy the RI Rule?
Q2: If a Parent Row is Included to Satisfy any RI Rule, Include All Child Rows?
Q Q Child --Relation--
Cmd Status 1 2 Limit Parent Table Child Table Name Type
--- ------ - - ----- ---------------------- ---------------------- -------- ---
*********************************** TOP ***********************************
s__ NEW Y N *CUSTOMERS ORDERS RCO DB2
u__ NEW Y N *CUSTOMERS ORDERS RTCOR PST
s__ NEW Y N ORDERS DETAILS ROD DB2
___ NEW Y N *DETAILS ITEMS RID DB2
___ NEW Y N *DETAILS ITEMS RTDI PST
******************************** BOTTOM **********************************
Revised Status If the REL command is used again on the Select Tables/Views for
AD panel to redisplay the Specify Relationship Usage panel for this
set of tables, the status is revised as shown in the following figure.
Q1: If a Child Row is Included, Include its Parent Row to Satisfy the RI Rule?
Q2: If a Parent Row is Included to Satisfy any RI Rule, Include All Child Rows?
Q Q Child --Relation--
Cmd Status 1 2 Limit Parent Table Child Table Name Type
--- ------ - - ----- ---------------------- ---------------------- -------- ---
*********************************** TOP ***********************************
___ SELECT Y N *CUSTOMERS ORDERS RCO DB2
___ SELECT Y N ORDERS DETAILS ROD DB2
___ SELECT Y N *DETAILS ITEMS RID DB2
___ SELECT Y N *DETAILS ITEMS RTDI PST
___ UNSEL Y N *CUSTOMERS ORDERS RTCOR PST
******************************** BOTTOM ***********************************
The revised status is shown in the STATUS field and in the position
of the relationship on the list. Selected relationships have the
SELECT status; unselected relationships have the UNSEL status.
Those relationships that were not specifically selected or unselected,
have the SELECT status based on the response to the Use NEW
Relationships prompt.
Relationships are added and deleted from the list by changes made on
the Select Tables/Views panel and by changes to the relationship
definitions.
Since this default action may not be what you intended, you should
display the Specify Relationship Usage panel to handle changes to
the relationship list. In fact, it is recommended that you display the
Specify Relationship Usage panel any time you modify the table
names or Creator ID of one or more tables on the Select
Q1: If a Child Row is Included, Include its Parent Row to Satisfy the RI Rule?
Q2: If a Parent Row is Included to Satisfy any RI Rule, Include All Child Rows?
Q Q Child --Relation--
Cmd Status 1 2 Limit Parent Table Child Table Name Type
--- ------ - - ----- ---------------------- ---------------------- -------- ---
*********************************** TOP ***********************************
___ NEW Y N CUSTOMERS SALES RCS DB2
___ NEW Y N ORDERS SALES RTOS PST
___ SELECT Y N *CUSTOMERS ORDERS RCO DB2
___ SELECT Y N ORDERS DETAILS ROD DB2
___ SELECT Y N *DETAILS ITEMS RID DB2
___ SELECT Y N *DETAILS ITEMS RTDI PST
___ UNSEL Y N *CUSTOMERS ORDERS RTCOR PST
********************************** BOTTOM ********************************
New Relationships Relationships that are defined between displays of the Specify
Relationship Usage panel are handled in the same manner as
relationships added to the list because a new table has been included.
USE Command You can specify the USE NEW command to change all relationships
with the NEW status to the SELECT status. You can specify USE
ALL, to change all relationships with either the NEW status or the
UNSEL status to the SELECT status.
UNKNWN Status Frequently, sets of tables that differ only by Creator ID use comparable
relationships with the same names. In those instances, MOVE identifies
the same names and maintains the assigned status. However, when a
same-name relationship is not defined for both sets, any previously listed
Change Default Assume the Default Creator ID has been changed causing two new
Creator ID relationships to be added and an existing relationship to become
An Example unknown. The other relationships are the same. In the following
figure, the two new relationships are added at the top of the list. The
unknown relationship is placed at the bottom of the list. The other
relationships maintain their previous status.
Q1: If a Child Row is Included, Include its Parent Row to Satisfy the RI Rule?
Q2: If a Parent Row is Included to Satisfy any RI Rule, Include All Child Rows?
Q Q Child --Relation--
Cmd Status 1 2 Limit Parent Table Child Table Name Type
--- ------ - - ----- ---------------------- ---------------------- -------- ---
*********************************** TOP ***********************************
___ NEW Y N *ORDERS DETAILS RTOD PST
___ NEW Y N *ORDERS SALES RTOSI PST
___ SELECT Y N *CUSTOMERS ORDERS RCO DB2
___ SELECT Y N CUSTOMERS SALES RCS DB2
___ SELECT Y N *ORDERS DETAILS ROD DB2
___ SELECT Y N *DETAILS ITEMS RID DB2
___ SELECT Y N *DETAILS ITEMS RTDI PST
___ UNSEL Y N *CUSTOMERS ORDERS RTCOR PST
___ UNKNWN Y N *ORDERS SALES RTOS PST
********************************* BOTTOM **********************************
Delete UNKNOWN You can use the Delete line command, D, to delete any relationship
from the list that is UNKNWN. However, since you can use the same
Access Definition for similar sets of tables with different Creator ID's,
you may decide to retain the unknown relationships on the list. That
minimizes your efforts if you intend to use the same Access Definition
multiple times and change only the Creator ID. MOVE retains the
original status of all relationships that are unknown and reapplies that
status when the Creator ID is modified such that the relationship is
applicable.
Important Note If tables are added, new relationships are created, or the Creator ID is
modified, the list of relationships is not automatically revised and the
changes are not immediately incorporated into the Access Definition.
OUTPUT You can use the OUTPUT command to direct the contents of the
command displayed text to an output file or SYSOUT. (If you want the report to
include traversal information, use SHOW STEPS discussed below.)
SHOW STEPS After you have completed the Specify Relationships Usage panel,
Command you can request information about how the extract will be performed
using the SHOW STEPS command. This information is used to
ensure that the extracted data and the traversal paths used to extract
the data are as you expect.
Step 1: Extract Rows from Start Table PSTDEMO.CUSTOMERS. Row List is used
and Determines the Rows Selected.
The text for the first step, extracting from the Start Table, varies
depending on the specifications for the Extract Process.
Handling the Text All of the standard ISPF scrolling commands are available while
displaying the SHOW STEPS text.
Also, you may use the OUTPUT command to direct the contents of
the SHOW STEPS display and the Specify Relationship Usage panel
to an output file or SYSOUT. You are prompted for the output
parameters and, based on your responses, MOVE writes the output to
the specified destination.
END and CANCEL On the Specify Relationship Usage panel, use the END command to
Commands return to the Select Tables/Views for AD panel. Use the CANCEL
command to remove all changes made on the current panel and return
to the Select Tables/Views for AD panel.
Use the OUTPUT command to request the report. MOVE copies the
information on the Relationship Usage panel and displays prompts
for the information to direct the output to a destination of your choice.
The output is formatted similarly to the presentation on the panel.
(For details on the OUTPUT command, see the Relational Tools
Command Reference Manual.)
Basic Traversal
Path
The most common traversal is to begin at the Start Table and proceed
through the data model traversing all relationships from parent to
child. For example, if the Start Table is CUSTOMERS, MOVE
automatically traverses down to ORDERS and DETAILS.
Alter Traversal Using the Specify Relationship Usage panel, you can alter the
Path traversal path by unselecting and selecting relationships. In addition,
there are two specifications that you can use to expand the traversal
path. These are designated Q1 and Q2 on the panel shown in Figure
79. Default Specifications for Q1 and Q2.
• A table has more than one parent table. For example, when the
ITEMS table is the Start Table, rows are extracted from the
DETAILS table automatically because it is a child of the ITEMS
In the following figure, the default for Q1, Yes, is shown for all three
relationships.
Q1: If a Child Row is Included, Include its Parent Row to Satisfy the RI Rule?
Q2: If a Parent Row is Included to Satisfy any RI Rule, Include All Child Rows?
Q Q Child --Relation--
Cmd Status 1 2 Limit Parent Table Child Table Name Type
--- ------ - - ----- ---------------------- ---------------------- -------- ---
*********************************** TOP ***********************************
___ SELECT Y N CUSTOMERS ORDERS RCO DB2
___ SELECT Y N ORDERS DETAILS ROD DB2
___ SELECT Y N ITEMS DETAILS RID DB2
********************************* BOTTOM **********************************
Multiple Parent Assume you need to extract all of the related ORDERS, DETAILS,
Tables and ITEMS rows for a specific set of customers. You can:
Child as Start Assume you need to extract a set of CUSTOMERS and all of their
Table ORDERS beginning with specific criteria for the ORDERS. You
can:
Q1: If a Child Row is Included, Include its Parent Row to Satisfy the RI Rule?
Q2: If a Parent Row is Included to Satisfy any RI Rule, Include All Child Rows?
Q Q Child --Relation--
Cmd Status 1 2 Limit Parent Table Child Table Name Type
--- ------ - - ----- ---------------------- ---------------------- -------- ---
*********************************** TOP ***********************************
___ SELECT Y Y CUSTOMERS ORDERS RCO DB2
********************************* BOTTOM **********************************
The rows are extracted in the sequence shown in the following figure.
STEPS
1. The CUSTOMERS
row is extracted
because of Q1.
Since Q2 is Yes, MOVE also extracts the other ORDERS rows that
are children of the extracted CUSTOMERS rows.
Note any rows extracted from a table because of Q2 must meet the
selection criteria specified for that table. In addition, they are subject
to the statistical controls.
Child to parent for Consider another example. Orders are shipped only when all items
multiple are available. If any one of the ordered items is out of stock, the order
relationships is not shipped to the customer.
Q1: If a Child Row is Included, Include its Parent Row to Satisfy the RI Rule?
Q2: If a Parent Row is Included to Satisfy any RI Rule, Include All Child Rows?
Q Q Child --Relation--
Cmd Status 1 2 Limit Parent Table Child Table Name Type
--- ------ - - ----- ---------------------- ---------------------- -------- ---
*********************************** TOP ***********************************
___ SELECT Y N CUSTOMERS ORDERS RCO DB2
___ SELECT Y Y ORDERS DETAILS ROD DB2
___ SELECT Y N ITEMS DETAILS RID DB2
********************************* BOTTOM **********************************
ITEMS to DETAILS After the specified ITEMS rows are selected, the related DETAILS
are extracted by traversing the relationship RID from parent to child.
STEPS
ORDERS to
DETAILS 5. The other DETAILS that
are part of the ORDERS
are extracted because Q2
is Yes for the relationship
between ORDERS and
DETAILS.
DETAILS to ITEMS
6. The ITEMS for the
additional DETAILS are
extracted because Q1
is Yes for the
relationship between
ITEMS and DETAILS.
No Additional Only the ORDERS for the selected ITEMS are extracted. Additional
ORDERS ORDERS for the extracted CUSTOMERS are not obtained because
Q2 is No for the relationship RCO between CUSTOMERS and
ORDERS.
Summary Q2 allows you to direct MOVE to extract additional children. That
is, if parent rows are extracted to satisfy Q1 (make the set of
extracted data referentially-intact), the additional children to those
parents are also extracted.
Multiple Children There are tables that are parent to more than one child table. The
specifications for Q1 and Q2 are applied only to each pair of tables
that have a relationship between them.
For example, if a row of the CUSTOMERS table is extracted because
Q1 is Yes for the relationship between CUSTOMERS and ORDERS,
then Q2 for that relationship only applies to related rows from the
ORDERS table. To extract data from other child tables, Q2 would
have to be set to Yes for those relationships.
Assume the SHIP_TO and the ORDERS tables are children of the
CUSTOMERS table. To obtain the shipping information for specific
orders, you can:
1. Specify the ORDERS table as the Start Table.
2. Specify the selection criteria for the desired set of ORDERS.
3. Set Q1 and Q2 on the Specify Relationship Usage panel as
shown in the following figure.
Q1: If a Child Row is Included, Include its Parent Row to Satisfy the RI Rule?
Q2: If a Parent Row is Included to Satisfy any RI Rule, Include All Child Rows?
Q Q Child --Relation--
Cmd Status 1 2 Limit Parent Table Child Table Name Type
--- ------ - - ----- ---------------------- ---------------------- -------- ---
*********************************** TOP ***********************************
___ SELECT Y N CUSTOMERS ORDERS RCO DB2
___ SELECT Y Y CUSTOMERS SHIP_TO RCST PST
*********************************** BOTTOM ********************************
Extending the example on page 154 for extracting all of the related
data about orders for out-of-stock item, a traversal cycle results by
extracting all of the items with a quantity of zero that have been
ordered and then traversing as noted by the following steps to obtain a
complete set of orders.
ITEMS is the Start Table. (Note, the CUSTOMERS table is not used
in this example. The relationship between CUSTOMERS and
ORDERS, RCO, is unselected.) The Specify Relationship Usage
panel is defined as shown in the following figure:
Q1: If a Child Row is Included, Include its Parent Row to Satisfy the RI Rule?
Q2: If a Parent Row is Included to Satisfy any RI Rule, Include All Child Rows?
Q Q Child --Relation--
Cmd Status 1 2 Limit Parent Table Child Table Name Type
--- ------ - - ----- ---------------------- ---------------------- -------- ---
*********************************** TOP ***********************************
___ UNSEL Y N CUSTOMERS ORDERS RCO DB2
___ SELECT Y Y ORDERS DETAILS ROD DB2
___ SELECT Y N ITEMS DETAILS RID DB2
********************************** BOTTOM *********************************
One complete cycle is made. MOVE began with the ITEMS table
and ended at the ITEMS table.
Multiple Traversal MOVE can also process multiple traversal cycles. Although unlikely,
Cycles the previous example can be extended to show multiple traversal
cycles.
After extracting the ITEMS rows for the additional items in Step 5,
you may want to extract the ORDERS and DETAILS for these
ITEMS. To accomplish this, Q2 for the relationship RID is set to
YES. After Step 5 in the example, MOVE traverses the relationship
MOVE can extract data from tables that are related to each other by
referential cycles. With a referential cycle, you start at one table and
return to it after traversing a series of one or more relationships. (In
contrast, many DB2 databases are defined as hierarchies or networks.
To extract data, you proceed up or down through the hierarchy or the
network and never return to the Start Table.)
Two Tables For this discussion, assume there are two tablesDEPARTMENT
and EMPLOYEE. The tables are defined as:
Q1: If a Child Row is Included, Include its Parent Row to Satisfy the RI Rule?
Q2: If a Parent Row is Included to Satisfy any RI Rule, Include All Child Rows?
Q Q Child --Relation--
Cmd Status 1 2 Limit Parent Table Child Table Name Type
--- ------ - - ----- ---------------------- ---------------------- -------- ---
*********************************** TOP ***********************************
___ SELECT N N DEPARTMENT EMPLOYEE MEMBER DB2
___ SELECT N N EMPLOYEE DEPARTMENT MANAGER DB2
*********************************** BOTTOM ********************************
EMP_ID = 9
EMP_ID = 10
EMP_ID = 11
EMP_ID = 14
EMP_ID = 15
DEPT_ID = 'D'
DEPT_ID = 'F'
EMP_ID = 9
EMP_ID = 10
EMP_ID = 11
EMP_ID = 14
EMP_ID = 15
Q1: If a Child Row is Included, Include its Parent Row to Satisfy the RI Rule?
Q2: If a Parent Row is Included to Satisfy any RI Rule, Include All Child Rows?
Q Q Child --Relation--
Cmd Status 1 2 Limit Parent Table Child Table Name Type
--- ------ - - ----- ---------------------- ---------------------- -------- ---
*********************************** TOP ***********************************
___ SELECT N N DEPARTMENT EMPLOYEE MEMBER DB2
___ SELECT Y N EMPLOYEE DEPARTMENT MANAGER DB2
********************************** BOTTOM *********************************
Q1: If a Child Row is Included, Include its Parent Row to Satisfy the RI Rule?
Q2: If a Parent Row is Included to Satisfy any RI Rule, Include All Child Rows?
Q Q Child --Relation--
Cmd Status 1 2 Limit Parent Table Child Table Name Type
--- ------ - - ----- ---------------------- ---------------------- -------- ---
*********************************** TOP ***********************************
___ SELECT N N DEPARTMENT EMPLOYEE MEMBER DB2
___ SELECT Y Y EMPLOYEE DEPARTMENT MANAGER DB2
********************************** BOTTOM *********************************
Q1: If a Child Row is Included, Include its Parent Row to Satisfy the RI Rule?
Q2: If a Parent Row is Included to Satisfy any RI Rule, Include All Child Rows?
Q Q Child --Relation--
Cmd Status 1 2 Limit Parent Table Child Table Name Type
--- ------ - - ----- ---------------------- ---------------------- -------- ---
*********************************** TOP ***********************************
___ SELECT Y N DEPARTMENT EMPLOYEE MEMBER DB2
___ SELECT Y Y EMPLOYEE DEPARTMENT MANAGER DB2
********************************** BOTTOM *********************************
Example 5 Extract only the employees that are members of the Development
Department. Unlike Example 1, do not extract employees in
Disabling RI subordinate departments.
Cycles
To obtain only the employees in the Development Department, Q1
and Q2 are set to No for the relationship MEMBER. In addition, the
relationship MANAGER is unselected. This relationship is not to be
traversed as shown in the following figure:
Q1: If a Child Row is Included, Include its Parent Row to Satisfy the RI Rule?
Q2: If a Parent Row is Included to Satisfy any RI Rule, Include All Child Rows?
Q Q Child --Relation--
Cmd Status 1 2 Limit Parent Table Child Table Name Type
--- ------ - - ----- ---------------------- ---------------------- -------- ---
*********************************** TOP ***********************************
___ SELECT N N DEPARTMENT EMPLOYEE MEMBER DB2
___ UNSEL N N EMPLOYEE DEPARTMENT MANAGER DB2
*********************************** BOTTOM ********************************
You can define several of the specifications for the Access Definition
dynamically when you invoke the editor from the Main Menu option
or the Definitions Menu option. Using the BROWSE command, you
invoke a browse session for the set of data defined by the Access
Definition. During this session you can "join" to tables not included
in the Access Definition and specify sort and selection criteria for any
of the tables as you display the data.
For the most part, the facilities available when browsing are the same
as those provided during a Point-and-Shoot session and are not
discussed here. Based on the Access Definition parameters, the
following facilities are also available when editing the Access
Definition from the Main Menu option or the Definitions Menu
option.
• All specifications for sort and selection criteria are included in the
Access Definition. (These are not included when specified from a
Point-and-Shoot session or when the editor is invoked from the
Extract Process.)
The Group Selection Processing and random factors are ignored when
obtaining the set of data for browsing or for Point-and-Shoot because
the set of selected rows is arbitrary and may vary for each session.
Column Deleted When a column is deleted from a table and that table is included in an
Access Definition, you should be aware of the impact. If you quit and
access the affected table you will either receive:
Column Modified If the characteristics of a column have changed since the Access
Definition was last modified, a warning message is issued when an
Extract, Insert, or Delete process is attempted.
For example, if the column length or the data type changes, this has
an impact on how the data is handled by an Insert or Delete Process if
the column participates in the process. An appropriate warning
message is issued. You should check to ensure that the desired data
will be processed.
Table Added Adding a table to the database has no direct impact on the Access
Definition or any of the processes.
Table Deleted If a table in an Access Definition is deleted from the database, the
table is labeled as UNKNOWN in the Access Definition. The Access
Definition can be used, but the deleted table can not be the Start
Table.
Relationships When relationships are added or deleted, they directly impact the
Added, Deleted, or specifications on the Specify Relationship Usage panel for MOVE.
Modified Deleted relationships are placed at the bottom of the list and assigned
the UNKNOWN status. New relationships are included at the top of
the list and assigned the NEW status. If the Specify Relationship
Usage panel is not displayed, all NEW relationships are included in
the Extract Process by default and a warning message is displayed to
inform the user of this situation. You specify NO on the Use NEW
Relationship prompt on the Access Definitions Parameter panel to
prevent these NEW relationships from being traversed.
D Data
Display begins with data from named Start
Table. Default.
Available The following primary commands are available when the Access
Commands Definition Parameters panel is displayed.
Duplicate Tables Also, MOVE does not allow multiple references to a single table.
Therefore the list can not contain one or more tables, views,
synonyms, or aliases that refer to the same underlying base table.
(Although Compare for DB2 and Archive for DB2 require the same
restrictions as MOVE, Access for DB2 allows multiple references to
a single table.)
Panel fields There are three input fields on the menu enabling you to change the
SQLID, subsystem and remote location. This is especially useful for
accessing the definitions for a specific database, or when exporting
and importing for connecting to the desired target database.
Updating You can add primary keys and relationships to the Directory by using
the Directory the series of panels described in Sections 4.1 Primary Keys and 4.2
Relationships. Alternatively, the IMPORT option can be used to
import relationship information from third party dictionaries or case
tools.
• When extracting from a table with two or more parents and these
multiple parents are involved in the Extract Process.
The first three situations are controlled by MOVE, the last by user
request. The same primary key information is required in these
situations and the same prompts are displayed.
Primary Key:
Creator ID ===>
Table Name ===>
Use '_' for DB2 LIKE Specifies whether the underscore, '_', is to
character be used as a DB2 LIKE character or used
literally as part of the name. For example,
A_B could be assumed to be a three-
character name containing the characters
'A_B' as entered or a three-character name
Explicit Table When an explicit Creator ID and Table Name are supplied:
Name
• MOVE checks the DB2 Catalog for the specified table and, if a
primary key is defined, displays the primary key information.
This information is not modifiable.
• When the DB2 Catalog does not contain a primary key for an
existing table, MOVE checks the PST Directory. If there is a
primary key defined in the PST Directory, it is displayed and is
modifiable.
Selection List A selection list is requested by using DB2 LIKE syntax or leaving a
field blank. (You must specify at least one character in one of the
fields along with the DB2 LIKE syntax.)
• If there are no primary keys that satisfy the selection list criteria,
a message is displayed on the Choose a Primary Key panel.
Each line in the selection list displays a table for which a primary key
is defined. The Creator ID and table name are displayed. An
asterisk, *, in the Creator field indicates a generic primary key.
The Type field indicates whether the primary key is defined in the
PST Directory (PST) or the DB2 Catalog (DB2). The Type field is
also used to indicate that a primary key is being modified by another
user (*Busy) or that a PST primary key has been deleted during this
session (*Deleted). Once a key has been deleted, the line command
area for that entry is protected.
Description A user option controls whether or not the description of each PST
primary key is displayed on this panel. See Section 6.1 User
Options for information about the Selection List Format option.
Line The Cmd field on the left side of the panel is used to enter line
Commands commands. The following line commands are available:
Primary Key To display the attributes of a primary key, type I in the Cmd field
Attributes next to the name of the primary key. The following figure shows the
Primary Key Attributes panel.
Table ID : PSTDEMO
Table Name : SHIP_TO
Description :
Object Attributes To modify the description of a primary key, type AT in the Cmd field
next to the name of the primary key to display the Object Attributes
panel.
+-------------------Object Attributes-------------------+
¦ ¦
¦ Object Name: PSTDEMO.CUSTOMERS ¦
¦ ¦
¦ Modify the attributes below as needed. ¦
¦ ¦
¦ Description ===> ¦
¦ ¦
¦ Use END command to accept any changes and return. ¦
¦ Use CANCEL command to ignore any changes and return. ¦
+-------------------------------------------------------+
The Copy Primary Key panel displays the name of the original
primary key and prompts for the new two-part name for the copy. A
primary key can only be copied if the destination table exist with the
same key columns as the source table.
Rename a Primary To rename a primary key, type R in the Cmd field next to the name of
Key the source primary key. The following figure shows the Rename
Primary Key panel.
The Rename Primary Key panel displays the current name of the
primary key and prompts for a new two-part name. A primary key
can only be renamed if the destination table exists with the same key
columns as the original table.
Use the SORT command to sort the selection list by a particular field.
For example, SORT TYPE sorts the list by the values in the Type
field.
When you specify the fully qualified name of a table that has a PST
primary key, the Modify PST Primary Key panel is displayed.
When you specify the fully qualified name of table that does not have
a primary key, the Define PST Primary Key panel is displayed to
enable you to create a primary key. The operation of these panels is
identical.
Data Type Data type of the column. This field is provided for
information and cannot be modified. When you
specify a column name, MOVE automatically
displays the data type for that column in this field.
Description You can specify a description for any primary key stored in the PST
Directory. You cannot supply a description for primary keys stored
in the DB2 Catalog. Use the ATTRIBUTES command to display the
Object Attributes panel for a PST primary key. This panel provides
a 40-character area to display and edit the description. For additional
information about the Object Attributes panel see Specify Description
and Security Status in Section 6.1 User Options.
Selection List of A selection list of the columns in the table can be displayed using the
Columns LIST COLUMNS command. Assume the LIST COLUMNS
command is entered to display the columns in the SHIP_INSTR table.
The Select One or More Columns prompt is displayed. Only the
columns not already defined in the primary key are displayed:
This prompt lists the column names followed by the data type of the
column. The Cmd field on the left side of the prompt is used to enter line
commands. Use the S or SS line command to select the columns.
Selection List of You can use the LIST UNIQUE INDEX primary command to obtain a
Indexes list of unique indexes for the table. You can select an index from the list
to be used as the primary key. MOVE uses the column names from the
index to replace all previously specified column names.
Specification When you are satisfied with the specifications for the primary key,
Complete press ENTER or use END to signal the end of the Modify PST
Primary Key panel processing.
Deleting a Primary Use the DELETE command on the Modify PST Primary Key panel
Key to delete a primary key. You can also delete the primary key by
erasing all of the column names and then using END.
Frequently, sets of tables are created that contain the same base
names, columns, and attribute specifications but are distinguished by
different Creator IDs. This enables users or groups of users to have
their own set of tables and data. Rather than define an explicit
primary key for each table, you can define a generic primary key to be
used for all tables having the same base name, regardless of the
Creator ID.
Primary Key:
Creator ID ===> *
Table Name ===> SHIP_INSTR
Duplicate Name If the generic key name already exists, the following prompt is
displayed prior to the Confirm GENERIC Processing prompt. You
can decide whether to replace the existing generic key.
Modifying a If the generic key specified on the Choose a Primary Key panel or
Generic Key Select Primary Keys panel exists, the Modify PST Primary Key
panel is displayed. You are prompted for a Creator ID to identify a
base table.
You are not required to specify the same Creator ID that was used to
create the generic key, but all of the columns referenced in the key
must be included in the new base table. If the key columns are not
contained in the table indicated by the Creator ID you specify, you are
given the choice of respecifying the Creator ID or overriding the
existing generic key. If you elect to override, the existing generic key
is deleted and you are prompted to specify columns from the table
identified with the new Creator ID.
After a base table is established, you may use the facilities described
for modifying a primary key.
4.2 Relationships
Extended You can define relationships that conform to DB2 rules or explicit
Relationships Princeton Softech’s “extended” relationships. These extended
relationships are more flexible than those defined to DB2. DB2
relationships require that each parent table have a primary key that
contains between 1 and 64 columns and guarantees uniqueness. DB2
relationships also require that each child table have a corresponding
foreign key consisting of the same number of columns.
Corresponding columns in the primary and foreign keys must have
identical data types and attributes. When defining PST relationships,
a number of the DB2 restrictions are relaxed:
Specify Table Name (Child for OPTION 2, Parent or Child for OPTIONS 1 and 3)
Creator ID ===> pstdemo
Table Name ===> customers
Use '_' for DB2 LIKE Specifies whether the underscore, '_', is to
character be used as a DB2 LIKE character or used
literally as part of the name. For example,
A_B could be assumed to be a three-
character name containing the characters
'A_B' as entered or a three-character name
that begins with 'A', ends with 'B', and has
any valid character in the middle. The
default is NO which means that '_' is not
handled as a DB2 LIKE character.
The list is initially ordered by the parent table name but may be sorted
using the SORT command (see the information in this section about
primary commands for details).
Each line in the selection list displays a single relationship. The list
provides the Creator ID and table name of the parent table and the
child table, and the name of the relationship. The Type field indicates
whether the relationship is defined in the PST Directory (PST) or the
DB2 Catalog (DB2). The Type field is also used to indicate a generic
relationship (GEN).
Description A user option controls whether or not the description of each PST
relationship is displayed on this panel. Site management determines
whether this panel also displays a prompt for Security Status. See
Section 6.1 User Options for information about the Selection List
Format option.
Line Commands The Cmd field on the left side of the panel is used to enter line
commands. The following line commands are available:
LR List all of the relationships that involve the table that was
not specified on the Choose a Relationship panel or
selected from a table selection list. For example, if LR is
entered for the last relationship displayed in the previous
figure, the resulting list would include all of the relationships
involving PSTDEMO.SALES as the parent or child in the
relationship.
Relationship To display the attributes of a relationship, type I in the Cmd field next
Attributes to the name of the relationship. The following figure shows the
Relationship Attributes panel.
Description :
Security Status : PUBLIC
Last Modified By : PSTDEMO
Modified On : 1999-12-21-09.58.37
Object Attributes To modify the description and security status of a relationship, type
AT in the Cmd field next to the name of the relationship to display the
Object Attributes panel.
+-----------------------Object Attributes-----------------------+
¦ ¦
¦ Object Name: PSTDEMO.CUSTOMERS.RCO ¦
¦ ¦
¦ Modify the attributes below as needed. ¦
¦ ¦
¦ Description ===> ¦
¦ ¦
¦ Security Status ===> PUBLIC (PUBLIC, PRIVATE, READONLY) ¦
¦ ¦
¦ Use END command to accept any changes and return. ¦
¦ Use CANCEL command to ignore any changes and return. ¦
¦ ¦
+---------------------------------------------------------------+
Copy a To copy a relationship, type C in the Cmd field next to the name of
Relationship the source relationship. The following figure shows the Copy
Relationship panel.
+----------------Copy Relationship---------------+
¦ ¦
¦ Existing Name: PSTDEMO.CUSTOMERS.RCO ¦
¦ ¦
¦ New Name: ¦
¦ ¦
¦ Child Creator ID ===> PSTDEMO ¦
¦ Child Table Name ===> CUSTOMERS ¦
¦ Relationship Name ===> RCO ¦
+------------------------------------------------+
Rename a To rename a relationship, type R in the Cmd field next to the name of
Relationship the relationship. The following figure shows the Rename
Relationship panel.
+---------------Rename Relationship--------------+
¦ ¦
¦ Existing Name: PSTDEMO.CUSTOMERS.RCO ¦
¦ ¦
¦ New Name: ¦
¦ ¦
¦ Child Creator ID ===> PSTDEMO ¦
¦ Child Table Name ===> CUSTOMERS ¦
¦ Relationship Name ===> RCO ¦
+------------------------------------------------+
Use the SORT command to sort the selection list by a particular field.
Since the names of both the parent table and the child table fields have
the headings Creator and Table, the following are available:
SORT TABLE Sorts using the values in the Child Table field.
SORT CREATOR Sorts using the values in the Child Creator
field.
SORT PTABLE Sorts using the values in the Parent Table field.
SORT Sorts using the Parent Creator field.
PCREATOR
SORT CHILD Sorts using the fully qualified child table name.
SORT PARENT Sorts using the fully qualified parent table
name.
SORT RELATION Sorts using relationship name.
Table Name Specify the table name of the other table in the
relationship. To generate a selection list of tables,
leave this field blank or specify DB2 LIKE
syntax.
When you have filled in this panel, press ENTER to display the
Define Relationship panel to create a new relationship or the Modify
Relational panel to edit an existing relationship.
Description At any time during the session you can specify a description for any
relationship you are editing. Use the ATTRIBUTES command to
Existing Primary If the parent table has a primary key, the primary key column names and
Key data types are populated on the left side of the panel. If the child table
contains any column names that match the primary key column names
and have compatible data types, those column names are populated on
the right side of the panel. (Note that unlike a DB2 relationship, a PST
relationship does not require that corresponding columns have identical
attributes. However, corresponding columns must be compatible, as
defined in Appendix F. Compatibility Rules for Relationships of this
manual.)
When there are no matching names in the child table, MOVE checks the
child table for a single column with identical attributes, regardless of the
name. If there is only one column with identical attributes, that column
name is inserted. Otherwise, no child table column names are inserted.
If the parent table does not have a primary key, a blank line is
provided for you to enter column names for the parent table and the
child table.
Literals and In addition to specifying column names, you can enter character string
Constants literals and numeric constants in the child and parent Column Name
fields. For example, instead of specifying the column name
CUST_ID, you can specify the value 50215 as a string literal by
entering the following in the Column Name field:
'50215'
String literals must be enclosed in single quotes. Only a string literal can
be specified if the corresponding column has a data type of CHAR or
VARCHAR. You cannot specify NULL as a literal value.
At least one parent table column and one child table column must be
referenced in a relationship and at least one relationship entry must
relate a column from one table to a column from the other. That is,
the Column Name list for each table must include an actual column,
or column substring, from that table. Additionally, you cannot relate
Data Driven A table is sometimes related to one of many other child tables based
Relationships on the data in a particular column. This is referred to as a data driven
relationship. You can define such a relationship by using literals. To
demonstrate, consider the following sample tables used to determine
employee insurance rates for males and females.
The EMPLOYEE table contains each employee’s ID, age, and sex.
EMPLOYEE
EMPLOYEE_ID AGE SEX
058-44-2244 38 F
106-46-0619 40 M
248-91-2890 27 M
FEMALE_RATES MALE_RATES
AGE RATE AGE RATE
38 .25 38 .31
39 .33 39 .38
40 .43 40 .47
EMPLOYEE FEMALE_RATES
SEX 'F'
AGE AGE
EMPLOYEE MALE_RATES
SEX 'M'
AGE AGE
Therefore, for any given row in the EMPLOYEE table, only one of
the relationships can be satisfied, since the column EMPLOYEE.SEX
must be 'M' or 'F'. Once the appropriate relationship is chosen, the
related rows are identified by comparing the AGE columns.
Along with the selection list prompt, the Define Relationship panel is
redisplayed with a new field, Num, and the columns in the parent
table are numbered. This enables you to select each desired child
column by specifying the number of the corresponding parent column.
You can also use the Select line commands, S and SS, to select
columns from the selection list. These names are added, in the same
order as shown on the selection list, at the end of the list in the
Column Name field.
Conversely, you can request a selection list of columns for the parent
table using the LIST COLUMNS PARENT command. The selection
list prompt overlays the parent table and the columns in the child table
are numbered.
You can use cursor position to indicate the table name when using the
LIST COLUMNS command. Type the LIST COLUMNS command
with no operands, position the cursor on the desired table name or list
of columns, and press ENTER. The appropriate column selection list
is displayed.
Expressions
Concatenating Often the data contained in two or more columns in one table is
Columns contained in a single, composite column in another table. To define
this type of data structure in a relationship, use the concatenation
operator to concatenate multiple columns. The concatenation
operator (CONCAT or || ) can be specified in the parent or child
Column Name fields.
Next, enter the ADDRESS column in the corresponding field for the
ORDERS table, as shown in the following figure. When you specify
a concatenation operator in a Column Name field, the Data Type field
for that column reflects the attributes of the expression formed by the
concatenation. If the data type for ADDRESS1 is CHAR(25) and
ADDRESS2 is CHAR(25), the data type of the concatenated
expression is CHAR(50).
Substringing When one column in a table contains the data that is contained in two
Columns or more columns in another table, you may find it useful to use a
portion of this composite column in a relationship. To do so, use the
SUBSTR function to retrieve a substring of the contents of a
character column.
SUBSTR(column-name,start,length)
where:
The combined value of start and length cannot exceed the length
attribute of the column.
SUBSTR(PHONE_NUMBER,1,3)
If you need more space to enter a substring function, you can use the
EXPAND command to display the specified column in the expanded
editor window (refer to page 208 for details on EXPAND).
While the Expanded Relationship Editor prompt is displayed, you can scroll
to the previous or next column pair using the UP, DOWN, TOP, or BOTTOM
commands.
Use CANCEL to abandon the changes to the current column pair and
return to the Define Relationship panel. Changes made to a column
pair prior to scrolling cannot be abandoned with the CANCEL
command.
Line Commands The following line commands are available on the Define
Relationship and Modify Relationship panels. Line commands are
entered in the Cmd field.
EXP Column names and values are protected if they exceed the
space available in the Column Name field. Use the EXP line
command to display the Expanded Relationship Editor
prompt for editing long column names or values.
Merging Lines The O (Overlay) line command enables you to merge copied or moved
with Overlay lines with a target line. Consider the following example in which a
move operation is performed.
When ENTER is pressed, the CUST_ID column name and data type
are moved to the target line and the moved line is deleted.
When a Move is requested and the moved line contains data that
would overlay data on the target line, the Move request is changed to
a Copy request to prevent the loss of data. MOVE displays a
message in the upper right corner of the panel indicating that the line
was not deleted. You can then use the original data as a guide to
assist in further editing.
Also, the total length of all of the values specified in the Column
Name field cannot exceed 254 characters. If the specification in a
single Column Name field contains 254 characters, no other Column
Name field entries can be made for that table.
Par
+------------------Model New Relationship------------------+ 1 OF 1
Cmd | | a Type
--- --- | Modify Child Table or Relationship Name to Create a new | -------
*** *** | relationship with the current column specifications | *******
___ CUS | | 5)
*** *** | Parent Table: PSTDEMO.CUSTOMERS | *******
| |
| Child Table: |
| Creator ID ===> PSTDEMO |
| Table Name ===> ORDERS |
| |
| Relationship Name ===> newrel |
+----------------------------------------------------------+
You may overtype the Creator ID and Table Name of the child table
and the Relationship Name.
If Relationship If you specify a relationship that already exists, the following prompt
Exists is displayed when the existing relationship is defined in the Directory.
(An error message is displayed if the existing relationship is defined in
the DB2 Catalog.)
asterisk, *, for the Creator ID. The tables used to define a generic
relationship must have the same Creator ID.
Specify Table Name (Child for OPTION 2, Parent or Child for OPTIONS 1 and 3)
CREATOR ID ===> *
TABLE NAME ===> CUSTOMERS
Specify Table Name (Child for OPTION 2, Parent or Child for OPTIONS 1 and 3)
CREATOR ID ===> *
TABLE NAME ===> CUSTOMERS
Specify Rela
RELATIONSH +----------------CreatorID Prompt----------------+
| |
Specify Rela | Relationship Definition Involves a Generic Key |
RELATIONSH | Supply a CreatorID for Base Tables | oth)
| |
USE '_' for | Press ENTER Key or Enter END Command when Done |
| Enter CANCEL Command to Exit Key Definition |
These comman | | d:
S - Selec | CreatorID ===> pstdemo |
D - Delet +------------------------------------------------+
LR - List p
AT - Modify Attributes of a Relationship (PST Relationships Only)
These comman | | d:
S - Selec | CreatorID ===> PSTDEMO |
D - Delet +------------------------------------------------+
LR - List p
AT - Modify Attributes of a Relationship (PST Relationships Only)
When you have provided the name for the Other Table, press
ENTER to display the Define Relationship panel (see Figure 111).
You are prompted for a Creator ID to identify the base tables. You
are not required to specify the same Creator ID that was used to
create the generic relationship. If you specify a different Creator ID,
all of the columns referenced in the relationship must be included in
the tables. If the columns are not contained in the tables indicated by
the specified Creator ID, you are prompted to respecify a Creator ID
or override the existing generic relationship. If you elect to override,
the existing generic relationship is deleted and you can redefine the
generic relationship.
Specify Table Name (Child for OPTION 2, Parent or Child for OPTIONS 1 and 3)
CREATOR ID ===> *
TABLE NAME ===> CUSTOMERS
Specify Rela
RELATIONSH +----------------CreatorID Prompt----------------+
| |
Specify Rela | Relationship Definition Involves a Generic Key |
RELATIONSH | Supply a CreatorID for Base Tables | oth)
| |
USE '_' for | Press ENTER Key or Enter END Command when Done |
| Enter CANCEL Command to Exit Key Definition |
These comman | | d:
S - Selec | CreatorID ===> pstdemo |
D - Delet +------------------------------------------------+
LR - List p
AT - Modify Attributes of a Relationship (PST Relationships Only)
- Specifying an expression.
- Split tables.
For the Insert Process and the Load Process, the Column Maps must
be present in the destination DB2 subsystem where the process is
performed. In most cases, Column Maps are defined while you are in
a MOVE session and connected to the destination DB2 subsystem.
Column Map:
Map ID ===>
Map Name ===>
Use '_' for DB2 Specifies whether or not the underscore, '_',
LIKE character is to be used as a DB2 LIKE character or
used literally as part of the name.
For example, A_B could be assumed to be
a three-character name containing the
characters 'A_B' as entered or a three-
character name that begins with 'A', ends
with 'B', and has any valid character in the
middle. The default is No which means
that '_' is not handled as a DB2 LIKE
character.
Specify the Map ID and Map Name to proceed. You can specify the
Map ID and Map Name explicitly or enter a blank field or DB2 LIKE
syntax to display a selection list.
Explicit Names If explicit values are specified for the Map ID and Map Name fields,
then:
• If the named Column Map exists, MOVE displays the map on the
Modify Column Map panel.
• If the named Column Map does not exist, MOVE prompts for the
additional information needed to create a new map on the Specify
Column Map Tables panel.
Selection List A selection list is requested by using DB2 LIKE syntax or leaving a
field blank:
• If there are no Column Maps that satisfy the selection list criteria,
a message is displayed on the Choose a Column Map panel.
Description A user option controls whether or not the description of each Column
Map is displayed on this panel. See Section 6.1 User Options for
information about the Selection List Format option.
Column Map To display the attributes of a Column Map, type I in the Cmd field
Attributes next to the name of the Column Map. The following figure shows the
Column Map Attributes panel.
ID : FEINP
Name : PSTCUST
Number of Columns : 9
Destination Table : PSTDEMO.CUSTOMERS
Note that Extract File Name is blank if the specified Source Table is
not from an Extract File. Also, the Security Status is displayed if it is
enabled by site management.
+-----------------------Object Attributes-----------------------+
¦ ¦
¦ Object Name: FEINP.PSTCUST ¦
¦ ¦
¦ Modify the attributes below as needed. ¦
¦ ¦
¦ Description ===> ¦
¦ ¦
¦ Security Status ===> PUBLIC (PUBLIC, PRIVATE, READONLY) ¦
¦ ¦
¦ Use END command to accept any changes and return. ¦
¦ Use CANCEL command to ignore any changes and return. ¦
¦ ¦
+---------------------------------------------------------------+
Copy a Column To copy a Column Map, type C in the Cmd field next to the name of
Map the source Column Map. The following figure shows the Copy
Column Map panel.
Rename a Column To rename a Column Map, type R in the Cmd field next to the name
Map of the Column Map. The following figure shows the Rename
Column Map panel.
The Rename Column Map panel displays the current name of the
Column Map and prompts for a new two-part name.
SELECT Primary The SELECT primary command can be used to select a specific
Command Column Map. The selected Column Map does not have to be
included on this list. For example, to select the Column Map named
COHEND.TESTORDS, enter:
SELECT COHEND.TESTORDS
Map Display If the Column Map exists, the source and destination are displayed on
the Modify Column Map panel. If the Column Map does not exist,
MOVE prompts for the source and destination tables on the Specify
Column Map Tables panel. After the table names are specified, the
Define Column Map panel is displayed.
The Specify Column Map Tables panel prompts for the source and
destination table names. This panel is displayed when the Column
Map option has been selected from the Choose a Definitions Option
menu and a new map is being created.
DSN of Extract File Name of the data set containing the Extract
File to be used as the source. This value is
mutually exclusive with the prompts for a
source DB2 table.
Except for the destination Creator ID, the fields are blank when the
panel is displayed initially.
Source Table
The purpose of the source table in the Column Map is to provide the
names of the columns from which the data is to be copied so that you
can match the source column names with the destination column
names.
• A database table
• A table in the Extract File
• None
You would use one of these options based on the appropriate scenario
as described below.
No Source Table Creating a Column Map without the source table or the Extract
File
Although it may not be a common occurrence, you may need to
create a Column Map without having access to either the actual
source table or to the Extract File. You can specify that no
source table is to be used to create the Column Map. Then, you
can manually enter the names of the source columns that map to
the destination columns. Since there are no definitions of the
source columns for MOVE to reference, there is no validation to
ensure compatible data types. (The validation would be
performed during the actual insert.)
If entries are not made in the prompts for Use Source Columns
From: on the Specify Column Map Tables panel, MOVE
assumes you want to create a map without specifying a source
table. A confirmation prompt is displayed. Press ENTER in
response to this prompt to proceed with the Column Map
definition. Use END to indicate that you want to specify a source
table; the Specify Column Map Tables panel is redisplayed.
When you use the actual source table or the Extract File in a
Column Map, you would want this validation to occur to ensure
that the Insert, DB2 Load, or Convert Process operates properly.
However, if you were using other tables to get source column names
(as in the previous example for multiple source tables), you can turn
off validation. For example, you can turn off validation when the
data types of the actual source columns do not match the data types
of the columns that you are using. The validation detects this
discrepancy. Also, you should turn off validation if you choose some
columns from one table, then switch to another table to select
columns and the second table does not contain the columns from the
Selection Lists When you are certain you want to use a DB2 table but are unsure of
the name, you can request a selection list of DB2 table names by
using DB2 LIKE syntax in either or both of the DB2 Table prompt
fields. A selection list is displayed based on the values you specify.
You can obtain a selection list of Extract File data set names using *
or % as the last character of the name in the DSN of Extract File
field. If you do not use apostrophes, MOVE automatically prefixes
the entry, as specified by the user option, Data Set Prefix, and uses
this value to qualify the selection list.
Use the Select line command, S, to select an entry from any of the
selection lists.
After the source and the destination table are identified, the
destination columns are displayed on the Define Column Map panel.
(This panel is also displayed when you use the MAPS command on
the INSERT Process Table Map, LOAD Table Map or
CONVERT Process Table Map panel.)
Matching Source MOVE automatically matches every column in the source that has the
and Destination same name and compatible data type as the destination. These
matches are displayed with the status EQUAL or MAPPED. (The
difference is discussed on page 233.) Any destination column that
does not match a source column is assigned the NOTUSED or the
REQUIRD status.
Description At any time during the session you can specify a description for the
Column Map you are editing. Use the ATTRIBUTES command to
display the Object Attributes panel. This panel provides a 40-
character area to display and edit the description. (Site management
determines whether this panel also displays a prompt for Security
Status.) For additional information about the Object Attributes
panel see Specify Description and Security Status in Section 6.1
User Options.
Changing Table Use the CHANGE TABLES command to redisplay the Specify
Names Column Map Tables panel. You can change the source and
destination table names on this panel. However, you can not change
the table names when the Column Map editor is invoked from the
INSERT Process Table Map, LOAD Process Table Map or
CONVERT Process Table Map panels. The names of the source
and destination tables are specified in the Table Map.
4.3.5 Validation
Numeric Data
Special Registers
All date, time, and timestamp data types cannot be converted to any
character or numeric data types. Conversely, character and numeric data
types cannot be converted to date, time, and timestamp data types.
Disabling As noted previously, you can define the destination columns by using
Validation one or more source tables as prototypes. When you do this, it may be
undesirable to have validation enabled.
You can toggle between validating and not validating using the
VALIDATIONS command. To disable automatic validation, enter:
VAL OFF
Facilities are available to help you manage the list of columns while
specifying source values.
SHOW Command When the list of destination columns is extensive, you can focus on
those columns that have not been mapped using the SHOW command.
By default, all destination columns are displayed. You can request
that all destination columns having a specific status are to be
displayed.
SHOW NOTUSED
LIST Command You can use the LIST command to display a list of source columns.
LIST ALL provides a list of all of the columns in the source table;
LIST UNUSED provides a list of source columns that have not been
matched to a destination column. With either display, you specify the
Example of LIST For example, assume the Define Column Map panel is displayed and
UNUSED you want to map the unmapped destination columns. The SHOW
NOTUSED command is used to display the destination columns with
the NOTUSED status and then the LIST UNUSED command is
entered. A list of source columns that have not been mapped is
displayed. The data type of the source columns is also displayed to
assist in selecting compatible columns for matching.
The list of source columns can be scrolled using the commands UP,
DOWN, TOP, and BOTTOM or the PF keys assigned these
functions.
END List When you have completed using the selection list to match the columns,
use END to remove the Unused Column List and return to the Define
Column Map panel. MOVE checks the mapping you have selected. If
validation is performed, EQUAL is displayed for all mappings of
matching data types, MAPPED for all other mappings, and *ERROR*
for any invalid mapping. If validation is not performed, the status
MAPPED is displayed for all valid mappings.
In the following figure, assume that SHOW ALL has also been
entered after the LIST UNUSED command to redisplay all of the
destination columns and the specified source columns.
• The column name. Column names that you supply need not have the
same name or data type. A value bound by the escape character
specified with the DB2 installation options is assumed to be a column
name. The mapped columns are identified with the status MAPPED.
MOVE automatically supplies the source column data type and the
appropriate status for the destination column.
• A function.
• An arithmetic expression.
• An exit routine.
Functions
There are several functions provided with MOVE to manipulate the
data from the source prior to inserting it into the destination. These
functions and their syntax are documented in the following text.
Aging Dates
• Default values to be used for source columns defined with AGE for
which you have not specified all required values. For example, you
can use one Column Map for multiple processes and specify unique
aging amounts or business rules for each without modifying the AGE
function parameters on the Column Map.
Note that the date format defines a two-digit year, so the pivot year is
included to determine the century. An output data format is not specified
in the figure, but you could specify a different format such as
“MMDDYYYY” to adjust the input to a four-digit year output.
The other values, such as aging values and rules, are not specified.
These values are to be supplied for each process when the Column
Map is used.
Input Date Date format. This value can be specified using one
Format of the distributed date formats or one of the formats
that have been defined by the site. The format must
be valid for the column length and type.
Use an asterisk to display a selection list of formats
valid for the column. Use the S line command to
select a format from the list.
This is required. (For more information about
specifying the format, see Appendix H. Date
Formats.)
Output Date Date format for the aged data. This value can be
Format specified using one of the distributed date formats
or one of the formats that have been defined by the
site. The format length must match the input format
length.
Note that the combined values for Years, Months, Days, and Weeks
cannot result in an aging amount for Years greater than 1581. An
error will result when the aging is attempted.
DATE and You can direct MOVE to age values in DATE and TIMESTAMP
TIMESTAMP columns using the global specifications for the processor. However,
columns if you want to age specific DATE and TIMESTAMP columns
exclusively, age the columns to unique values, or use an exit, specify
the AGE function for the column. These DB2-defined data types
must have the format “DB2DATE”.
AGE After you define values for the AGE function on the Aging
Specifications Specifications panel, use END to return to the Column Map editor.
Complete The AGE function is identified by the string “AGE(column)” where
column is the name of the source column to be aged. You can modify
these values using the AGE line command again to redisplay the
Aging Specifications panel. However, you must use the CLR line
command to delete the entire AGE function specification or the SRC
line command to replace the AGE function with the source column.
FUTURE_YEAR(value,column-name)
Returns an explicit date value or the result of
incrementing or decrementing a date value. The
data type of both the source and destination
columns must be DATE or TIMESTAMP.
FUTURE_YEAR(2000)
Force 2000 in the year portion of the value in the
matching source column before inserting the data at
the destination.
FUTURE_YEAR(+10,ORD_DATE)
Increment the date in the source column,
ORD_DATE, by 10 years before inserting the data at
the destination.
FUTURE_YEAR(DEF)
Modify the date in the source column by the values
specified on the Aging Parameters panel before
inserting the data at the destination.
PROP(value,column-name)
Assigns a value to a column and propagates that value to
all related tables.
⇒ A literal.
⇒ A special register.
⇒ An exit routine.
concatenated expression.
PROP(‘SMITH’)
Propagate a literal value in the mapped destination
column and the destination columns of the related
tables.
PROP(SEQ(10000,99999))
Generate a sequential number between 10000 and
99999 and propagate that number in the mapped
destination column and the destination columns of the
related tables.
PROP(SEQ(10000,99999),CUST_NUMBER)
Generate a sequential number between 10000 and
99999 in the named destination column and propagate
that number in the destination columns of the related
tables.
PROP(EXIT CHEKCUST)
Call an exit routine to establish the value for the
destination column and propagate that number in the
destination columns of the related tables.
• PROP can be specified only for a primary key or foreign key column.
• You can specify PROP for either the primary key or the foreign key
column. However, you cannot specify PROP for both. Also, if you
specify PROP for one, you must specify the source column name as
the source for the other. You cannot specify some other value.
• When PROP is specified on the foreign key column and the value
you specify includes a column name, that name must participate in
the relationship and be common to the parent and child tables.
Although expressions are valid, any other column names are not.
• A Column Map that contains the PROP function can only be used
with release 3.0 or greater of MOVE.
• For the Insert and Load Processes, if the propagated primary key
value duplicates an existing value, the row is discarded. MOVE
then discards the rows from related tables whose foreign key
contains the propagated value. (The grandchildren, great-
grandchildren, and so on are also discarded.) This feature ensures
that “foster” child rows are not inadvertently inserted.
For the Update Process, the row is updated. MOVE then inserts
or updates appropriately the rows from related tables whose
foreign key contains the propagated value.
RAND(low, high)
Returns a random number within the range specified by the
values for low and high.
Valid low and high values are documented below.
SEQ(start, step)
Returns a number that has been incremented sequentially by
the step value based on the start value.
Valid start and step values are documented below.
If the SEQ value exceeds 2147483648, it is automatically
reset to the starting value.
Values for The range of valid values for low, high, start and step varies based on
Parameters the data type:
‘PST’ || SUBSTR(ORD_ID,1,3)
Arithmetic Calculations
+ Addition
- subtraction
* multiplication
/ division
FREIGHT_CHARGES + 2.00
ON_HAND_INVENTORY - 15
UNIT_PRICE * 1.1
TOTAL_COST / UNIT_PRICE
• Overflow
• Null value in a non-nullable column
• Length of field too large to participate in computation
Exit Routines
You can use site-defined exit routines to derive a value for any
individual destination column. This is useful to handle special
processing, data manipulation, and literals that exceed the length of
the Source Column field.
EXIT CHEKFRGT
EXPAND If the length of the value you want to specify exceeds the space
Command available, use the EXPAND command to display a 75-character field.
Type EXPAND in the command area, position the cursor in the
desired Source Column field, and press ENTER. Alternatively, you
can specify the destination column name or number with the
EXPAND command. A comparable line command, EXP, is also
available.
During the expanded source column display, you can scroll to the
previous or next column using UP, DOWN, TOP, and BOTTOM.
Use END to return to the Define Column Map panel. If the length of
the source specification exceeds 21 characters, the data is truncated
and protected. You can expand the source column again to respecify
the value as needed.
CLEAR Command While editing the Column Map, you may want to remove one or more
of the Source Column specifications. You can use the CLEAR
primary command to remove all of the source column specifications
or the CLR line command to remove the specifications for a single
source column.
The CLR line command is especially useful for clearing the values
that have been specified on the expanded source column display or the
Aging Specifications panel. You can remove these specifications
without invoking a pop-up. (For aging specifications, CLR or
CLEAR is the only way to remove the AGE function.)
When you have completed defining the Column Map, use END. The
panel from which the Define Column Map panel was invoked is
redisplayed.
Use the SAVE command to save the modified Column Map under a
new name. This enables you to model a new Column Map on an
existing one. A confirmation prompt is displayed.
Using a Column Column Maps are used for the Insert Process and the Load Process to
Map direct the data from a source table to a destination table. They are
used by the Convert Process to convert the source data in an Extract
File. You can specify the names of Column Maps when you specify
the source and destination tables for the process on the INSERT
Process Table Maps, the LOAD Process Table Maps, and the
Convert Process Table Maps panels. Information on specifying
Column Map names for the Insert Process is provided in Section 5.4
Insert Process. Information for the DB2 Load Process and BMC
LOADPLUS is provided in Section 5.5 DB2 Load Process.
Information for the Convert Process is provided in Section 5.8
Convert Process.
From a Table Map, you can specify a Column Map for tables on the
Table Map. (Column Maps enable you to map unlike named
columns, compatible columns, generate column data, and eliminate
individual columns from the process, as discussed in Section 4.3
Column Maps.)
Table Map:
Map ID ===>
Map Name ===>
Use '_' for DB2 LIKE Specifies whether or not the underscore,
character '_', is to be used as a DB2 LIKE character
or used literally as part of the name.
MOVE rules:
Specify Names Specify the Map ID and Map Name to proceed. You can specify the
Map ID and Map Name explicitly or choose from a selection list. To
display a selection list, leave one or both fields blank or use DB2
LIKE syntax in one or both fields.
Explicit Names If explicit values are specified for the Map ID and Map Name fields:
• And the named Table Map exists, MOVE displays the Table Map
on the Modify Table Map panel.
• And the named Table Map does not exist, MOVE displays the
Specify Table Map Sources panel.
Selection List Use DB2 LIKE syntax or leave a field blank to request a selection
list. MOVE displays a list of Table Maps on the Select Table Maps
panel. If there are no Table Maps that satisfy the selection list
criteria, a message is displayed on the Choose a Table Map panel.
Respecify the DB2 LIKE syntax.
Table Map To help in selecting a Table Map, use the I line command to display
Attributes information about a specific Table Map. The figure shows the Table
Map Attributes panel.
Map ID : COHEND
Map Name : TMAP1
When you are finished viewing the Table Map information, use END
to return to the selection list.
Object Attributes To modify the description and security status attributes of a Table
Map, type AT in the Cmd field next to the name of the Table Map to
display the Object Attributes panel. The description and security
status are specified on the Object Attributes panel.
+-----------------------Object Attributes-----------------------+
¦ ¦
¦ Object Name: COHEND.TMAP1 ¦
¦ ¦
¦ Modify the attributes below as needed. ¦
¦ ¦
¦ Description ===> ¦
¦ ¦
¦ Security Status ===> PRIVATE (PUBLIC, PRIVATE, READONLY) ¦
¦ ¦
¦ Use END command to accept any changes and return. ¦
¦ Use CANCEL command to ignore any changes and return. ¦
¦ ¦
+---------------------------------------------------------------+
Copy a Table Map To copy a Table Map, type C in the Cmd field next to the name of the
source Table Map. The following figure shows the Copy Table Map
panel.
The Copy Table Map panel displays the name of the original Table
Map and prompts for a new two-part name.
Rename a Table To rename a Table Map, type R in the Cmd field next to the name of
Map the Table Map. The following figure shows the Rename Table Map
panel.
The Rename Table Map panel displays the current name of the
Table Map and prompts for a new two-part name.
Delete a Table On the selection list, use the D line command to delete a Table Map.
Map Once a map has been deleted, the line command area for that entry is
protected. The entry is retained until the selection list is requested
again or the REFRESH DIRECTORY primary command is used to
update the Table Map selection list.
Select a Table On the selection list, use the S line command or the SELECT primary
Map command to select a Table Map to modify. If an existing Table Map
is selected, the Modify Table Map panel is displayed.
The SELECT primary command can be used to specify a Table Map
that is not included on the selection list. For example, to select the
Table Map named PSTDEMO.TESTMAP, enter:
SELECT PSTDEMO.TESTMAP
If the Table Map named on the SELECT primary command does not
exist, MOVE assumes a new Table Map is to be created and the
Specify Table Map Source panel is displayed. After specifying the
sources, the Define Table Map panel is displayed.
The Specify Table Map Source panel prompts you to specify the
source for the Table Map.
Extract File Specify the data set name of the Extract File
containing the list of source tables. You can
display a selection list of existing Extract Files
by typing * as the last character in the DSN
name.
After you have specified the source, use END or ENTER to proceed.
The Define Table Map panel is displayed.
The Define Table Map panel lists the corresponding tables from the source
and destination under the appropriate headings. Each source table is
mapped to the destination table that is displayed on the same line.
Destination The CID field is blank and the Table Name fields are
populated with the same names as the source. All
fields can be modified.
Assuming an Extract File is named for the source, the following panel
is displayed:
Available Commands: APPLY, SAVE, LIST, MAP, POPULATE, END when Complete
Destination May be any DB2 Tables or Views
Column
Src CID: PSTDENO Dest CID ===> Map ID ===>
Src CID The default Creator ID for the source tables as defined
in the Extract File or Access Definition designated as
the source. This value cannot be modified.
Extract Tables The list of source tables in the Extract File or Access
Definition designated as the source. These values
cannot be modified.
TABLE A table.
VIEW A view.
UNKNOWN Non-existent in destination.
UNUSED A destination table is not specified.
An alias of a table.
A-TABLE An alias of a view.
A-VIEW A synonym of a table.
S-TABLE A synonym of a view.
S-VIEW A Temporary Table.
NOT INS
Column Map The name of the Column Map used for mapping the
columns from source to destination for a specific pair
of tables.
Modify The destination Creator ID and table names can be modified. You
Destination can overtype the name directly or select a table name from a selection
Table Names list.
LIST Command Use the LIST TABLES command to request a selection list of tables
that have the current Destination CID. You can override the Creator
ID by specifying one as an operand, as in LIST TABLES SMITH.%.
The LIST command can also be used to display a selection list of
views, aliases, and synonyms. The list will include the tables that
satisfy the selection list criteria but are not already included as
destination tables on the Table Map.
The LIST command presents a list of the available tables, and assigns
a number and a type to each source table on the Table Map. You
map the tables by matching the assigned table numbers from the Num
field. The source Type field identifies UNUSED tables.
LIST TABLES For example, if the destination Creator ID is 'SMITH', a selection list
of tables with that Creator ID is displayed when LIST TABLES with
no operands is entered.
Available Commands: APPLY, SAVE, LIST, MAP, POPULATE, END when Complete
Destination May be any DB2 Tables or Views
Column
Src CID: PSTDEMO Dest C
+---------------- DB2 Tables --------------+
Num Extract Tables Type | | CAL"
--- ---------------- ------- | Select Items by Matching 'Num' | ---
**************************** | | ***
1 CUSTOMERS TABLE | Num CreatorID.TableName 1 OF 5 |
2 DETAILS TABLE | --- --------------------------- |
3 ITEMS TABLE | ************* TOP ************* |
4 ORDERS TABLE | 1__ SMITH.XXCUSTOMERS |
5 SHIP_TO TABLE | 2__ SMITH.DETAILS |
**************************** | 3__ SMITH.ITEMS | ***
| 4__ SMITH.ORDERS |
| 5__ SMITH.SHIP_TO |
| *********** BOTTOM ************ |
+------------------------------------------+
The list of destination tables can be scrolled using the UP, DOWN,
TOP, and BOTTOM commands, or the PF keys assigned these
functions.
When you have completed using the selection list to match the tables,
use END to remove the DB2 Tables list and return to the Define Table
Map panel. As shown in the following figure, MOVE automatically
populates the Destination Table Name fields with the selected table
names. The Type field displays TABLE for the added tables.
Available Commands: APPLY, SAVE, LIST, MAP, POPULATE, END when Complete
Source 2 May be any DB2 Tables or Views
Column
Src CID: PSTCOMP Dest CID ===> SMITH Map ID ===>
Source Table Name Destination Table Name Type Column Map or "LOCAL"
--------------------- ------------------------- ------- ----------------------
************************************* TOP ************************************
CUSTOMERS XXCUSTOMERS TABLE
DETAILS DETAILS TABLE
ITEMS ITEMS TABLE
ORDERS ORDERS TABLE
SHIP_TO SHIP_TO TABLE
*********************************** BOTTOM ***********************************
APPLY Command The APPLY command overlays all or part of the displayed Table
Map with the specifications from another Table Map. When the
source table names in the Table Map being applied match the source
table names in the currently displayed Table Map, the corresponding
destination table names and their respective Column Maps, if defined,
will be copied to the destination fields of the displayed Table Map.
After “applying” a Table Map, the current Table Map can be edited
as desired.
• Add information from the applied Table Map only to the blank
fields of the displayed Table Map.
For example, to apply only the Column Maps from a Table Map
named SMITH.TMAP enter:
Selection List for You can display a selection list of Table Maps using DB2 LIKE
APPLY syntax with the APPLY command. For example, APPLY SMITH.%
generates a selection list of all Table Maps that have the Map ID
SMITH; APPLY %.TMAPS generates a selection list of Table Maps
named TMAPS for all Map IDs; and APPLY with no operands
generates a selection list of all available Table Maps.
Destination Table MOVE automatically revises the Type each time you modify a
Type destination table name. If you modify the Dest CID, any tables that
are specified without an explicit Creator ID automatically use the new
Dest CID. This may change the Type value and require review.
Saving the Map After the Table Map is defined, it can be saved in the PST Directory.
Once saved, the Table Map is available to other users.
• Use the END command to exit the Table Map editor. The
modifications to the Table Map are automatically saved.
When defining a Table Map as part of a process, you can save the
Table Map by specifying a fully qualified name. If you do not
explicitly save the Table Map, it is not stored in the Directory and is
only available for the current process.
Column Maps are used to define how the source columns correspond
to the destination when the default processing is inadequate. (By
default, columns with the same name and matching attributes are
mapped.) Using Column Maps you can manipulate the data at the
destination as well as map unlike-named columns, columns with
compatible but not exactly matching data types, or eliminate columns
from the process.
To specify the name of the Column Map in the Column Map name
field on the Define Table Map panel, you can:
• Type the Column Map name directly. You can specify the name
of an existing Column Map or specify a new Column Map name
to create a new one. You can also specify LOCAL to create a
Column Map to be used only with the current Table Map.
Column Map ID The Column Map ID field qualifies the Column Map name specified.
When a fully qualified Column Map name is entered in the Column
Map name field, the Column Map ID field is ignored.
LIST MAPS The LIST MAPS command displays a selection list of Column Maps.
Command Use DB2 LIKE syntax to specify the selection list criteria. If no
value is specified, the default is %.% indicating all Column Maps.
To use the LIST MAPS command, type the command, position the
cursor on the line where you want to specify a Column Map name,
and press ENTER. If only one Column Map exists, it is
automatically placed in the Column Map name field. If multiple
Column Maps are available, a selection list is displayed.
Column Map The following figure displays the Column Map selection list.
Selection List
Available Commands: APPLY, SAVE, LIST, MAP, POPULATE, END when Complete
Destination May be any DB2 Tables or Views
Column
Src CID: PSTDEMO Dest CID ===> PSTDEMO Map ID ===> PSTDEMO
The complete Column Map name is provided along with notation that
specifies how the tables used to create the Column Map match the
tables listed on the Define Table Map panel. This is specified for the
source and destination tables separately as:
FULL MATCH The Creator ID and the table name from the table list on
the Define Table Map panel match those in the Column
Map. In Figure 150. Select One Column Map, both the
source and the destination tables of the first Column
Map match the source and destination tables on the
Define Table Map panel.
TABLE MATCH The Creator ID from the Define Table Map panel does
not match the Creator ID in the Column Map, but the
table names do match. In Figure 129 the destination
table of the second and third Column Maps match the
destination table on the Define Table Map panel, but the
Creator ID is different.
Use the Select line command, S, to select a Column Map and END or
ENTER to return to the Define Table Map panel. The name of the
selected Column Map is inserted in the Column Map name field on
the line where the cursor had been positioned.
Selection Lists for When a selection list is displayed by the POPULATE command,
POPULATE select the desired Column Map using the S line command and press
ENTER or END. The name of the selected Column Map is inserted
for the current pair and processing continues with the next pair.
Using DB2 LIKE You can limit the search for Column Maps performed by POPULATE
Syntax with using DB2 LIKE syntax. For example, to populate the Table Map with
POPULATE Column Map names having the Map ID COHEND, type:
POPULATE COHEND.%
To populate the Table Map with Column Map names that begin with
INV and have the Map ID COHEND, type:
POPULATE COHEND.INV%
Consideration for Naming conventions can be used to identify logical groups of Column
Naming Maps and to make best use of the POPULATE command. For example,
Conventions Column Maps created to test data for the inventory system could all be
prefixed with INV and the Map ID could identify individual
programmers. Then, the POPULATE command, with a name operand
using DB2 LIKE syntax, can automatically identify and insert the desired
set of uniquely named Column Maps for all of the listed table pairs.
For example, assume five Column Maps have been defined for a pair
of source and destination tables:
COHEND.CHGCUST
COHEND.INVCUST
COHEND.TSTCUST
KEBLERD.INVCUST
NADELSS.INVCUST
Further, assume that the names of the tables defined in each of these
maps are a FULL MATCH. By specifying the POPULATE
command with no operand, a selection list containing these five tables
is displayed. However, by specifying POPULATE COHEND.INV%
only the Column Map named COHEND.INVCUST is identified and
automatically inserted. This feature is especially useful when there is
an extensive list of source tables on the Define Table Map panel and
all of the desired Column Maps have been named following a specific
convention. MOVE automatically proceeds through the pairs of tables
and populates the Column Map name field.
Table Map with The following figure shows a Table Map with Column Maps
Column Maps specified for three of the five tables listed.
Available Commands: APPLY, SAVE, LIST, MAP, POPULATE, END when Complete
Destination May be any DB2 Tables or Views
Column
Src CID: PSTCOMP Dest CID ===> PSTDEMO Map ID ===> PSTDEMO
Source Table Name Destination Table Name Type Column Map or "LOCAL"
--------------------- ----------------------- -------- -----------------------
************************************* TOP ************************************
CUSTOMERS CUSTOMERS TABLE CUSMAP
DETAILS DETAILS TABLE DETMAP
ITEMS ITEMS TABLE ITMMAP
ORDERS ORDERS UNKNOWN
SHIP_TO SHIP_TO TABLE
*********************************** BOTTOM ***********************************
New Column Map To create a new Column Map, specify a new name in the Column
Map field and press ENTER. (If the name is not fully qualified, you
must enter a Map ID in the Column Map ID field.) A confirmation
prompt is displayed. Use END to terminate the request or ENTER to
create the Column Map. If you create the Column Map, the Define
Column Map panel is displayed.
If you specify LOCAL as the Column Map name and one has not
been previously defined for that pair of tables, MOVE assumes you
are creating a new Column Map. (A Map ID is not required for a
'local' Column Map.)
MAP Command Use the MAP command to edit an existing Column Map. You can
specify the Column Map name with the command or position the
cursor to the Column Map field. (It may be desirable to assign the
MAP command to a function key.)
MOVE compares the Column Map table names with the names on the
Define Table Map panel. If the table names and the column names
match, the selected Column Map is displayed on the Modify Column
Map panel.
Available Commands: APPLY, SAVE, LIST, MAP, POPULATE, END when Complete
Destination
+----------Edit Column Map Confirmation---------+
Src CID: PS | | ===> PSTDEMO
|Column Map PSTDEMO.TEST1 is defined with |
Source Ta |tables that do not match specified pair of | Map or "LOCAL"
------------ |tables. | ---------------
************ |CHANGE TABLES command will be automatically | ***************
CUSTOMERS |performed. |
DETAILS |Press ENTER key to Proceed with Column Map Edit|
ITEMS |Enter END Command to Return to Table Map |
ORDERS +-----------------------------------------------+
SHIP_TO SHIP_TO TABLE
*********************************** BOTTOM ***********************************
Press ENTER to proceed with the edit; use END to abandon the edit.
If you elect to proceed with the edit, MOVE automatically changes
the table names in the Column Map to those names on the Define
Table Map panel and displays the Modify Column Map panel.
SAVE Command If you are using an existing Column Map as a prototype, you can
retain the original version of the Column Map. Use the SAVE
command and specify a new Column Map name or LOCAL prior to
returning to the Define Table Map panel. MOVE inserts the new
Column Map name appropriately.
Additional See Section 4.3 Column Maps for detailed information on defining
Information Column Maps. See the Relational Tools Command Reference Manual
for details on the LIST MAPS, POPULATE, MAP, and SAVE
commands.
Column Map When you have completed modifying the Column Map, use END to
Complete return to the Define Table Map panel.
When you have completed specifying the Table Map, use END to
redisplay Choose a Definition Options panel.
1. Export Process
Copy the object definitions to a data set. This data set may be
used repeatedly by the Import Process to copy the object
definitions to any number of PST Directories making these
definitions available to several subsystems. To execute the
Export Process, select option E on the Choose a Definition
Option panel.
2. Import Process
Copy the object definitions in the specified data set to the current
subsystem. To execute the Import Process, select option I on the
Choose a Definition Option panel.
Note that this process adds the exported object definitions to the
PST Directory for the current subsystem only.
Normally, you perform the Export Process to copy the object definitions
from the current subsystem to a data set. Then, you return to the
Relational Tools Main Menu to switch to the receiving subsystem by
respecifying the DB2 subsystem at the SUBSYS prompt. Once you have
switched the subsystem, you perform the Import Process to load the
object definitions from the data set.
About Object When you export an object, the security status is included. However,
Security security is only relevant within the database. For example, an Access
Definition stored as PRIVATE can only be exported by the owner.
The status is exported as PRIVATE, but any user can attempt to
import the object stored in the Export File. A user cannot import any
PRIVATE object to a subsystem in which it already resides, but can
import it to a different subsystem. Then, the object is assigned the
PRIVATE status and the importing user is the owner.
TM Table Maps
AD Access Definitions
CD Compare Definitions (Only available when
Compare for DB2 is installed.)
Relationships none
You can specify the name of a new data set. You will
be prompted for allocation information and the data
set will be allocated for you.
You can specify the name of a new data set. You will
be prompted for allocation information and the data
set will be allocated for you.
Prompt To Delete Specify whether the objects selected for the Export
Exported Objects Process are to be deleted from the source PST
Directory. Specify:
Y Delete objects
N Do not delete objects
After you have completed the EXPORT Process panel, you are
prompted to select which definitions you want to export for each
designated type. If you specify a type such as AD or TM, an
appropriate Choose panel is displayed. However, if you specify ALL,
a prompt to choose specific object definitions is displayed for each
object type.
ACCESS DEFINITION:
GROUP ===>
USER ===>
NAME ===>
This panel is very similar to the panel displayed when Option 5 ADS
is selected on the Main Menu and you are prompted for the name of
an Access Definition to edit. You can specify the name of an Access
Definition by specifying the three-part name in the provided fields.
Alternatively, you can request a selection list by leaving one or more
fields blank or using DB2 LIKE syntax in one or more of the fields.
You are also prompted to specify whether the underscore character is
used for DB2 LIKE syntax.
When ALL is specified, you can bypass any of the object types by
using END to proceed to the next object type. When a specific type is
specified and END is used, the Export Process is not performed and
the EXPORT Process panel is redisplayed.
The Access Definitions that satisfy the selection list criteria are
displayed in alphabetical order. The user that last modified the
Access Definition and the date on which it was modified is also
displayed. The list can be scrolled.
Status field The Status field to the left of the Access Definition indicates whether
an Access Definition has been selected. On initial display, the field is
blankno Access Definitions are selected. You can select individual
Access Definitions using the Select line command, S. Conversely,
you can unselect individual Access Definitions using the Unselect line
command, U.
When many Access Definitions are listed and you want to select or
unselect the majority of them, use the primary commands SELECT
and UNSELECT. For example, assume 100 Access Definitions are
listed, use SELECT ALL to select all of them. Then, use the U line
command to unselect specific definitions. Conversely, if all of the
Access Definitions have the SELECT status, use UNSELECT ALL
to unselect all of the Access Definitions and the S line command to
select the few you want.
Use END to signal that your selections are complete. The resulting
action depends on the Definition Type specified on the EXPORT
Process panel:
If you have not selected any objects for the current type, the
Choose prompt for the current type is redisplayed. You can
respecify criteria for the selection list, specify the name of an
object, or use END again to indicate that none of the current
definition type are to be exported. If you specify END, the
Choose prompt for the next object definition type is displayed.
If the Choose panel for the last definition type is displayed, the
Export Process is invoked.
If you have not selected at least one object from the list, the
choose prompt is redisplayed. You can respecify criteria for the
selection list, specify the name of an object, or use END without
specifying any objects. If you use END with no entries, the
Choose a Definition Option menu is redisplayed and the Export
Process is not executed.
Available The following primary commands are available when the selection list
Commands is displayed:
The Export Process copies the object definitions from the PST
Directory for the current subsystem only. To build an output file
Export Summary
Summary of Results
REPORT You can display the contents of the report file using the REPORT
Command command. This command automatically invokes the ISPF browse
facility and displays the contents of the report.
The report lists the exported object definitions by category and the
names of each exported object. Any error messages are also included
in the report.
Use END to terminate the ISPF browse session and return to the
Relational Tools session.
PK Primary Keys
R Relationships
CM Column Maps
TM Table Maps
AD Access Definitions
Import Summary
Summary of Results
Report File DSN Name of the sequential data set containing the
results of the Import Process.
REPORT You can display the contents of the report file using the REPORT
Command command. This command automatically invokes the ISPF browse
facility and displays the contents of the report.
The report lists the imported object definitions by category and the
names of each imported object. Any error messages are also included
in the report.
Use END to terminate the ISPF browse session and return to the
Relational Tools session.
The Export Process copies each selected object definition from the
PST Directory and generates a set of SQL-like statements for these
objects. These statements are stored in the output file and used as the
input to the Import Process. This section documents the format of
these statements.
You can use the ISPF facilities to browse and edit this file. Use
caution when editing. The Import Process requires specific formats
for these statements. Any deviations will cause errors.
• If the first two non-blank characters on the line are dashes (-), the
entire line is treated as a comment and ignored. Comments can be
placed within an object definition or between definitions.
The format of the statements for each object type is documented in the
following pages. The syntax used for these statements is:
Primary Keys
CREATE PK table
[DESCRIPTION //description//]
COLS (column [,column])
Relationships
The following statement is generated for each relationship:
• The parent table expression is on the left of the equal sign and the
child table expression is on the right.
Column Maps
CREATE CM columnmap
[DESCRIPTION //description//]
SECURITY security
[EXTDSN dsname]
SRC table DEST table
VAL {ON | OFF}
SRCTYPE value source-expr = dest-col
[, SRCTYPE value source-expr = dest-col ]
A numeric literal
B string literal
C valid column name
D current time register
E current date register
F current timestamp register
H current user register
I current SQLID register
J a default
K Exit routine
L bad error
M Column Map column source is the same as
the destination
N column will receive NULL
U column is unusable
T current TSOID register
X valid expression for source
source-expr Specified source expression.
Table Maps
CREATE TM tablemap
[DESCRIPTION //description//]
SECURITY security
SRCCID sourceid DESTCID destid [COLMAPID colmapid]
[SRCEXT dsname | SRCAD ad]
[DESTEXT dsname | DESTAD ad] [VALRULES {C|M}]
[SRCTYPE {X|A|T}] [DESTTYPE {X|A|T}]
(sourcetable = desttable [CM mapname | LOCALCM (mapdef)]
[,sourcetable = desttable [CM mapname | LOCALCM (mapdef) ] ] )
table pair.
One of the following is included only when a Column Map has been
specified for a pair of tables.
Access Definitions
CREATE AD group.user.ad
[DESCRIPTION //description//}
SECURITY security
DEFCID defaultcreatorid START starttable ADDTBLS {Y|N}
MODCRIT {Y|N} BEGINDISP {D|S|A} ADCHGS {T|P}
USENEW {Y|N} [ROWLIST dsname]
[ GRPCOL column GRPROWS n GRPVALS n ]
TABLE (table ACCESS {S|U|I|D} REF {Y|N}
[EXTRFREQ n] [EXTRLIMIT n] PREDOP {A|O}
[SQL //sqlwhereclause//] [CORRELNAME correlnam]
COLFLAG {Y|N}
ARCIXTAB {Y|N}
ARCDAA {Y|N}
ARCOP {A|O}
[COLUMN (column DISP {Y|N} ACCESS {S|U}
HEADING {N|L}{L|R|C}
[SORT n {A|D}]
[PRED //selectioncriteria//]) ] )
[ARCIXCOL {Y|N}]
[ARCFMT ‘formatparam’]
[ARCDATE ‘explicitdate’]
[ARCPIVOT n]
[ARCYRS n]
[ARCMOS n]
[ARCWKS n]
[ARCDAYS n] ) ] )
REL (relationship STATUS {NEW|SEL|UNSEL|UNK} Q1 {Y|N} Q2 {Y|N}
CHILDLIMIT {n|NOCHILDREN|UNLIMITED} TYPE {DB2|PST}
DUPRELS {Y|N} PAR parent CHI child )
ROWLIST Name of the data set containing the row list from a
Point-and-Shoot session. This is included only
when a row list is defined.
The following parameters are specified once for each of these object
included in the Access Definition:
Tables A TABLE entry is provided for every table in the Access Definition.
The set of keywords for one table is enclosed in parentheses. Every
keyword corresponds to a value that can be specified in the Access
Definition for a table.
Columns A COLUMN entry is provided for every column in a table only when
the defaults have been modified for the Access Definition. The set of
keywords is enclosed in parentheses. Every keyword corresponds to a
value that can be specified for a column.
Continuation The SQL WHERE Clause and the selection criteria text must be
delimited by slashes “//”. If the text exceeds the length of one line,
continuation is indicated by slashes at the end of the line to be
continued and at the beginning of the continuation line. The text can
be broken anywhere because when imported, these continuation lines
are appended without inserting blanks.
Relationships A REL entry is provided for each relationship that can be used by the
Access Definition as listed on the Specify Relationship Usage panel.
The set of keywords is enclosed in parentheses. Every keyword
corresponds to a value that can be specified to determine the use of a
relationship by an Access Definition.
Compare Definition
CREATE CD group.user.name
[DESCRIPTION //description//}
SECURITY security
SRC1TYPE {EXTR dsname | AD ad | LOCALAD (addef)}
SRC2TYPE {EXTR dsname | AD ad | LOCALAD (addef)}
TM (tablemap)
[ REL (relname STATUS {SEL|UNSEL|REF} SOURCE {1|2}
TYPE {DB2|PST} PAR parent CHILD child ) ]
[CMPDSN dsname]
Sources SRC1TYPE Specifies the type of source and name for Source
1 as one of the following:
Table Map The complete definition of a Table Map, TM, is always included.
The qualifiers are specified within parentheses. For details on the
contents of the Table Map specification see the explanation of Table
Maps in this section.
Compare Process When a data set name has been specified for the results of the
Data Set Compare Process, that name is included as the parameter CMPDSN.
Otherwise, the parameter CMPDSN is not included in the Compare
Definition statement.
• Source
• Destination
Specify Source To specify the source you use an existing Access Definition or create
a new Access Definition. The created Access Definition can be
temporary, for a single use, or permanent, saved for repeated use.
The Access Definition is used as input to the Extract Process. (See
Section 3. Specify Access Definitions for a detailed discussion of
creating and modifying Access Definitions.)
The Extract Process copies the specified data and object definitions
(i.e., table, view, key, index, etc.) to an Extract File. The Extract File
is saved and can be reused as needed.
Specify The Insert Process copies the source data and object definitions to a
Destination destination. MOVE offers flexibility for changing the destination
specification or automatically inserting the data and object definitions
in a logical manner.
VSAM files.
3 DB2 LOAD Create DB2 load files from the Extract File.
These files can then be used for input to
IBM's DB2 Load Utility or any other third
party load facility. (If BMC’s LOADPLUS
has been specified by site or user option as
the load utility to be used, the DB2 LOAD
option is replaced with LOADPLUS. See the
information on user options for information
on specifying the load utility.)
To perform the Extract Process you must specify the set of data to be
extracted. You can use specifications from an existing Access
Definition, create a new Access Definition, or specify temporary
definitions.
Extract File An Extract File is created by traversing a set of tables. The tables
and the relationships to use to traverse those tables are specified in an
Access Definition. In addition, the set of extracted rows is determined
by other specifications such as:
Temporary or Indicates whether the specifications defined for the extract are
Permanent temporary, discarded after the extract, or permanent, saved in the
Access Definition. If they are to be temporary, specify T for TEMP
in response to the prompt, Type of Access Definition to Use for
EXTRACT. If they are to be permanent, specify P. You must
specify the name of an Access Definition when the specifications are
to be stored permanently.
Access Definition If you decide that the specifications are permanent, specify the name
Name of the Access Definition to be used for the process. The fields on the
panel correspond to the three parts of the Access Definition name:
GROUP
USER
NAME
Create a New If the name of the Access Definition you specify does not exist,
Access Definition MOVE automatically prompts you to create a new Access Definition.
The Select Tables/Views for AD panel is displayed. See Section 3.
Specify Access Definitions for details on how to define an Access
Definition.
Selection List You can leave the fields blank or use DB2 LIKE syntax to display a
selection list of available Access Definitions. Use the Select line
command, S, to select an Access Definition from the list.
After you have selected the Access Definition and used ENTER, the
EXTRACT Process menu is redisplayed. The name of the selected
Access Definition is displayed in the Access Definition Name field.
Specify Options You can define or modify the Access Definition specifications,
whether temporary or permanent, by selecting Options 1 or 2 again.
As noted above, these options display panels discussed in other
sections of this manual.
Once the source data has been specified, use Option 3 to specify
which object definitions are to be extracted if object definitions are
requested with the Extract Process. Use Option 4 to perform the
extract.
Available The following primary commands are available when the EXTRACT
Commands Process menu is displayed:
You can select and unselect the object definitions to be extracted. The
selected object definitions are extracted for every table included in the
Extract Process. The values you specify are profiled and will be used
automatically for every subsequent request to extract object
definitions.
Only for Tables The object types that are selected are extracted only for table objects
listed on the Select Tables/Views for AD panel. These selected
object definitions are not extracted when the object on the Select
Joined views are only extracted if all tables involved in the view are
included on the Select Tables/Views for AD panel. For Primary
Keys and Relationships, the pertinent object definitions for all tables
on the Select Tables/Views for AD panel are extracted including
those for reference tables. For more information about creating object
definitions, see Section 5.7 Create Process.
Extract File DSN Name of the Extract File that is to contain the
extracted data. This file must be a sequential data
set. The Extract File name can be specified
explicitly by enclosing it in quotes; otherwise, the
default prefix as specified on the User Options
panel is automatically prepended to the name.
value 0 - 99999999
blank Site-defined limit
D DB2 is used.
B BMC's UNLOAD PLUS is used.
B Batch
O Online
Extract File The following figure shows the selection list panel that is displayed
Selection List when you request a list of Extract File data set names. This figure
shows a full-screen display.
Use the Select line command to select a data set. Use END to return
to the Specify EXTRACT Parameters and Execute panel.
5.2.3.1 UNLOAD PLUS
Selecting a Subset If you specify Y for Use Subset, a list of partitions is displayed. The
following is an example.
Under the Partition heading, the panel displays a line command field
to select or unselect partitions. Use S to select and U to unselect a
partition. You can select any number of partitions, however, if you
do not select at least one, the Use Subset option on the Specify BMC
UNLOAD PLUS Parameters panel is automatically changed to N
and all partitions are used.
When you specify YES for the Perform Convert with Extract
prompt, the Specify Convert Parameters panel is displayed.
By default, the converted data will be written to the named Extract File. To retain the
original extracted data in this file, specify a Second Extract File to store the converted
data. The second Extract File is optional.
Extract File DSN Name of the Extract File that contains the source
data to be converted.
Display Table Map Displays Table Map panel. Specify the names
and Column Maps of the destination tables for each table in the
Extract File. A Table Map must be specified to
perform the Convert Process, therefore if you do
not select this option first, MOVE automatically
displays the Table Map panel before proceeding
with the selected option. When the Table Map is
displayed, you must specify the destination
Creator ID, Dest CID. By default, MOVE
assumes the base destination table names are the
same as the names defined in the Extract File.
Sort Extract File Specify whether the data for destination tables
Rows with a cluster index are to be sorted. Specify:
Y Sort rows.
Online Processing
If the Extract File does not exist, you are prompted for allocation
information and the file is allocated by MOVE.
If the Extract File does not exist, you are prompted for allocation
information and the file is allocated by MOVE.
whether the job should be submitted after saving the JCL. (Details
are discussed later in this section.)
Access Definition There are a few conditions that can be detected in the Access
Evaluated Definition that prevent the Extract Process from proceeding and some
conditions that present warning messages.
Error Conditions Error conditions can result when an existing Access Definition is used
without review. Changes may have been made to the database that
are only detected when the Access Definition is edited or used. The
following error conditions also prevent you from saving an Access
Definition that you are editing. The error conditions include:
Note, if the Access Definition was created for Access for DB2,
duplicate entries are valid for editing.
• The Start Table is invalid. This can occur if the table is dropped
from the database or the default Creator ID was changed and the
Start Table name was not fully qualified. The table is then
marked as UNKNOWN and can not be used as a Start Table.
copies of the same row are not extracted when the child table is
related to multiple parents.
Warnings A warning message is issued for every condition that may require
your attention, but these conditions do not prevent the extract from
proceeding. When warning messages are issued, you are given the
option of proceeding or aborting the Extract Process. Warning
messages are issued for the following conditions:
Error and Warning If one or more errors or warnings are encountered, the EXTRACT
Reporting Errors & Warnings panel is displayed. Any error prevents the
Extract Process from proceeding. The Extract Process can continue
despite warnings.
Point-and-Shoot If specified, the data set containing the primary key values for selected
Validation rows using Point-and-Shoot is checked as part of the validation of the
Access Definition.
• The contents of the file specify primary key values for rows that
cannot be found.
For batch execution, MOVE builds the necessary JCL. The JOB card
information is taken from the JCL specified on the Job Card and
Print Options panel.
If you specified YES to the prompt, Prompt for Changes Before Job
Submission on the Job Card and Print Options panel, the default
job card as specified on that panel is displayed prior to job
submission. You may edit the job card and specify whether changes
are to apply to the current job only or are to be applied permanently.
(See Section 6.3 Job Card and Print Options.)
The information on the Job Card and Print Options panel is used,
along with the extract parameters, to build the JCL required to
perform the Extract Process. If you specify Review to the prompt If
Batch, Review or Save JCL on the Specify EXTRACT
Parameters and Execute panel, the complete jobstream is displayed
in the ISPF editor. It can be edited and saved.
When you have completed reviewing the JCL, you can submit the job.
If you have set the option so that jobs are automatically submitted
when END is used, the job is submitted. Otherwise, you will have to
explicitly SUBMIT the job from the ISPF editor. (See Section 6.1
User Options, for information on establishing whether jobs are
automatically submitted when END is used.)
If you do not want to submit the job, use CANCEL to return to the
Specify EXTRACT Parameters and Execute panel. You can
modify the specifications or cancel the extract request from this panel.
Batch Overrides If you save the JCL generated by MOVE to a data set, you can SUBMIT
the job directly from the ISPF editor instead of from within a MOVE
session. When you do so, you can override the default Creator ID,
selection criteria, and SQL WHERE Clause defined in the Access
Definition used for the Extract Process. This is especially useful when
several extracts are to be performed for a set of tables that vary only by
Creator ID or by some set of selection criteria.
You can override these values for batch execution by inserting the DD
name PSDFOVRD to point to the desired overrides. The possible
overrides are DEFCID, SEL, SQL, GROUP, and UNKNOWN.
(Examples are presented after the discussion of the overrides.)
BMC_IMAGECOPY To override the Image Copy DSN parameter for BMC UNLOAD PLUS,
_DSN specify:
BMC_IMAGECOPY_DSN image.file.dsn
BMC_IMAGECOPY To override the Image Copy Date parameter for BMC UNLOAD PLUS,
_DATE specify:
BMC_IMAGECOPY_DATE yyy-mm-dd
BMC_IMAGECOPY To override the Image Copy Time parameter for BMC UNLOAD PLUS,
_TIME specify:
BMC_IMAGECOPY_TIME hh.mm.ss
BMC_IMAGECOPY To override the Image Copy Date Criteria parameter for BMC UNLOAD
_SELECT PLUS, specify:
BMC_IMAGECOPY_SELECT [ A | B | L | S]
DEFCID cid
This override also affects the names of the tables in the relationships
on the Relationship Usage list. If a relationship is not found for the
updated table name, an error occurs when the extract is performed.
SEL To override the selection criteria in the Access Definition for a table or to
specify selection criteria for a table that does not have selection criteria in
the Access Definition, specify:
cid.table The table name must be specified. If you do not specify the
Creator ID (cid.), the default Creator ID defined in the Access
Definition is assumed.
Selection criteria can be specified for one or more columns in the table,
but when specifying multiple criteria, each must apply to a different
column.
You can specify only one SEL parameter for each column in a table.
You can specify selection criteria overrides for as many of the
columns in as many of the tables as you want as long as a separate
SEL parameter is provided for each column.
SQL To override the SQL WHERE Clause in the Access Definition for a
table or to specify an SQL WHERE Clause for a table that does not
have one in the Access Definition, specify:
You can specify the WHERE Clause override for more than one of
the tables as long as a separate SQL parameter is provided for each.
You can specify only one SQL parameter for a table.
column The name of the column in the Start Table for which
Group Selection Processing is requested. The column
must exist in the Start Table.
UNKNOWN To ignore any objects referred to in the Access Definition that do not
exist when performing the Extract Process, specify:
Since the Extract Process uses existing tables and the existing
relationships between those tables to traverse the database, be aware
that if an unknown table or relationship is bypassed, “related” tables
in the Access Definition may not be included even when these tables
exist.
Rules for The following rules apply when specifying these parameters:
Parameters
• One or more parameters may be specified in the JCL.
• Each parameter keyword must begin in the first space of the line.
Override To override the default Creator ID and specify selection criteria for
Examples two of the tables in the extract, insert in the JCL:
//PSDFOVRD DD *
DEFCID PSTDEMO2
* LIMIT SELECTION TO CUSTOMERS IN NEW JERSEY
* WHO HAVE ORDERS FOR WHICH THE
* FREIGHT CHARGES EXCEEDED $50.00
SEL CUSTOMERS STATE ='NJ'
SEL ORDERS FREIGHT_CHARGES >50.00
SEL requires at least one space between the column name and the
selection criteria.
1. To override the SQL WHERE Clause for one table in the extract,
insert in the JCL:
//PSDFOVRD DD *
* LIMIT SELECTION TO CUSTOMERS IN PRINCETON,
* NEW JERSEY
SQL PSTDEMO2.CUSTOMERS WHERE CITY=
'PRINCETON' AND STATE='NJ'
2. To specify a sequential file named PST.SAMPLE.PARMS as the
source of the parameter list, insert in the JCL:
//PSDFOVRD DD DSN=PST.SAMPLE.PARMS,DISP=SHR
4. To use an Image Copy file named PST.IMAGE.COPY in an
Archive Process utilizing BMC Unload Plus, insert in the JCL:
//PSDFOVRD DD *
* CHANGE IMAGE COPY SPECIFICATION TO
* A PARTICULAR DATASET
BMC_IMAGECOPY_SELECT S
BMC_IMAGECOPY_DSN PST.IMAGE.COPY
Save JCL
Save JCL
You can save the JCL, modify it and execute the process without re-
invoking MOVE. Specify S to the prompt, If Batch, Review or Save
JCL prompt. The following prompts for the information to save the JCL.
For example, the Extract Process uses UNLOAD PLUS only to read the
data; the data is not written to DDNAME SYSREC. (The Extract Process
uses its own facilities to write the data to the Extract File.) Therefore,
UNLOAD PLUS sets a return code of 4 to indicate no records were
written to SYSREC although the Extract Process has performed
successfully. As another example, UNLOAD PLUS sets a return code of
12 when the Extract Process was successful but terminated prematurely
because of a user limit for the number of rows from an individual table or
for the number of rows extracted for the entire process.
The total number of rows that have been extracted is displayed. Also,
the name of the currently processing table and total rows that have
been extracted from that table are displayed. This is revised:
After every 1000 rows are extracted for each table to display
the current total number of processed rows.
When the extract for one table is complete and the extract for
the next table begins.
When object definitions are extracted, the status panel includes a list
of the object definitions (primary keys and relationships, indexes,
etc.), and the status of each as one of the following:
Display the Report The contents of the EXTRACT Process Report can be browsed.
When the process is executed online, the EXTRACT Process Report
is automatically displayed.
Report Contents The content of the EXTRACT Process Report reflects what has been
extracteddata, object definitions, or both. The report in the
following figure indicates that both data and object definitions have
been extracted.
Extracted
Extract Tables Rows
------------------------ ---------
1 PSTDEMO.CUSTOMERS 132
2 PSTDEMO.ORDERS 792
3 PSTDEMO.DETAILS 2176
4 PSTDEMO.ITEMS 872
Report Format The report format includes headings to identify the information.
General information is provided. This includes the Extract File name,
the Access Definition, the user requesting the extract, and the date and
time the process was executed. This is followed by the statistics for
the extracted object definitions and data.
Object Definitions If object definitions are extracted, the report includes the list of types
Information of object definitions and the number of each type that have been
extracted. However, if object definitions were not explicitly
requested, the table definitions are always documented in the
EXTRACT Process Report.
Data Information If data is extracted, the report includes the total number of tables in
the extract and the combined total number of rows extracted from
these tables.
The Total Number of First Pass Start Table Rows displays the
number of rows extracted from the Start Table in the initial pass.
This value does not include the number of additional rows that may
have been extracted in subsequent passes. Subsequent passes of the
Start Table may be performed as a result of specifications for
prompts Q1 and Q2 on the Specify Relationship Usage panel or RI
cycles.
The names of the tables from which data was extracted are listed in
the order in which these tables were listed in the Access Definition.
The number of rows extracted from each table is also provided.
Unmatched Point- If you used the Point-and-Shoot facility or otherwise created a row list
and-Shoot Keys to select rows in the Start Table for archiving, some rows may have
been deleted before the Archive Process was executed. If so, the
ARCHIVE Process Report lists the primary key values for which
rows were not found.
The list of unmatched primary keys follows the list of Archive Tables
and is formatted like the following example:
3 Rows From Start Table Row List not Found
PSTDEMO.CUSTOMERS
07053
07101
07103
Print Report While browsing the EXTRACT Process Report online, you can use
the OUTPUT command to direct the contents of the report to an
output file or the printer. A panel is displayed prompting for the
necessary information based on the specified output destination. (For
details on the OUTPUT command, see the Relational Tools
Command Reference Manual.)
The report can be scrolled using the ISPF scrolling facilities. You can
use the FIND command to locate a specific table.
Once the Extract File has been created, you can insert and delete data
and create object definitions using the Extract File as input.
Extract File The Extract File can be used by any of the processes listed on the
Data Migration menu: Insert, DB2 Load, Delete, Create, and
Convert. Also, since the Extract File is not modified by these
processes, it can be used to perform processes by any number of users
simultaneously. The Extract File ensures a consistent set of data.
Retry The Control File identifies rows that are not successfully processed.
An identifier indicates the reason for the failure. For example, rows
may not be successfully processed when a request conflicts with RI
rules (e.g., a row in a parent table cannot be deleted if children exist
for that row and there is a DELETE RESTRICT rule). Based on the
information in the Control File, you can correct the problem and
execute the process again. For Insert and Delete processing you can
"retry" the process such that only the rows that were unsuccessful or
discarded in the original attempt are processed.
Restart The Control File also notes whether an Insert or Delete process
completed. When the process does not complete, you can “restart”
the process at the point at which it was abnormally terminated. An
Insert or Delete Process can be terminated abnormally when the time
or space resources allocated for the process are insufficient.
Abnormal termination can also occur when the process exceeds the
user-specified limits. For example, the INSERT Process
Parameters and Execute panel prompts for a limit to the number of
rows that are discarded because they cannot be processed. When the
number of discarded rows reaches the limit set by the parameter,
Limit Number of Discarded Inserts, the process terminates.
DB2 LOAD A Control File is also generated by the DB2 LOAD Process and the
Process and Convert Process. The file documents the success of the process. This
Convert Process file can then be browsed. However, the MOVE DB2 LOAD Process
and the Convert Process can not be retried or restarted.
The Insert Process is used to insert source data and object definitions
from an Extract File into a destination database. To perform this
process you specify the destination for the source data stored in the
Extract File.
When you select Option 2 on the Data Migration menu, the INSERT
Process menu is displayed.
Specify Data Set Names for Extract File and Control File:
Extract File DSN ===> 'PSTDEMO.SAMPLE.EXTRACT'
Control File DSN ===> 'PSTDEMO.INSERT.CONTROL'
Extract File DSN The name of the Extract File containing the
source data to be inserted. This file must
exist. By default, the name of the Extract
File created by the last Extract Process is
supplied. You can specify an explicit
name by using quotes to delimit the desired
name; otherwise, the default prefix as
specified on the User Options panel is
added to the name you specify.
The Extract File DSN and the Control File DSN values are profiled.
Selection List You can obtain a selection list for either the Extract File or the
Control File by specifying the wild cards, * or %, as the last character
in the name. When the list is displayed, use the Select line command,
S, to select an entry. A sample of the selection list displayed for
Extract File or Control File data set names is provided in Figure 165.
Select Extract Data Set on page 311.
When you select Option 1 from the INSERT Process menu, the
INSERT Process Table Map panel is displayed. Use this panel to
specify the destination tables and views.
Available Commands: APPLY, SAVE, LIST, MAP, POPULATE, END when Complete
Destination may be any DB2 Tables or Views
Column
Src CID: PSTDEMO Dest CID ===> SOFTECH Map ID ===>
TABLE A table
VIEW A view
UNKNOWN Non-existent or initial display
A-TABLE An alias of a table
A-VIEW An alias of a view
S-TABLE A synonym of a table
S-VIEW A synonym of a view
UNUSED A destination table is not
specified.
TEMPTBL Temporary table
Selection List of The LIST command is available for aliases, maps, synonyms, tables,
Destination and views. For example, to obtain a selection list of available tables,
Objects use the command LIST TABLES and position the cursor to the
destination table name you want to supply. A selection list of
available tables with the destination Creator ID is displayed. You can
override the destination Creator ID with the LIST TABLES command
as in LIST TABLES SMITH.%.
To insert a table name, type the number of the DB2 Table in the Num
field next to the destination table name in the selection list. You may
select any number of tables from the list at one time. MOVE
automatically places the selected name in the Destination Table
Name field with same number.
Use Existing Table You can use the APPLY command to populate the Table Map with
Map the specifications from a previously defined Table Map. If the source
tables in the process match the source tables in the Table Map,
MOVE populates the destination tables from the existing Table Map.
APPLY can be specified to populate all table names and the Dest CID
regardless of any entry, or populate only the blank fields.
Destination Table MOVE automatically revises the Type each time you modify a
Type destination table name. If you modify the Dest CID, any tables that
are specified without an explicit Creator ID automatically use the new
Dest CID. This may change the Type value and require review.
Duplicate table names are not allowed. Therefore, the same table
name cannot be specified twice as a destination table.
More Information Section 4.4 Table Maps provides detailed information on defining
and storing Table Maps. Section 4.3 Column Maps provides
detailed information on defining Column Maps.
When the primary key value of the source row does not already exist
in the destination table, there is no conflict and the row is inserted.
However, when the primary key value of the source row already exists
in the destination table, Insert and Update/Insert perform differently.
If you select Insert, the source row is marked as discarded and is not
inserted. If you select Update/Insert, the source row replaces or
updates the existing row.
For example, you may want to avoid blindly updating existing rows
with duplicate primary key values. You can specify Insert to identify
all of the rows that are not unique, then review the Extract File using
the Browse Extract File option to determine which rows were
duplicates and take action based on your findings. You can delete
Non-Unique When the primary key for the source data is defined in the PST
Primary Keys Directory and is not unique, more than one row in the Extract File
may exist with the same primary key value. If this data is then used
to Insert or Update/Insert into a destination table defined with a
unique primary key, only the first row with that primary key value in
the Extract File is processed.
The additional rows are not processed and are identified as such in the
Control File.
When the primary key for the destination table is also defined in the
PST Directory and is not unique, more than one row in the destination
table may exist with the same primary key value. For Insert
processing, the rows in the Extract File are inserted. For
Update/Insert, the processing is performed as follows:
• If the Extract File contains multiple rows with the same primary
key, a different destination row is updated with each row in the
Extract File. That is, a single destination row is updated once
although it is indeterminate which row is updated with a specific
row from the Extract File. When the Extract File contains more
rows with the non-unique primary key than are present in the
destination table, the additional rows are inserted.
Insert Parameters When you select Option 2 or 3 from the INSERT Process menu, the
Panel following panel is displayed to prompt for the parameters needed to
perform the Insert Process. (Note, most of the information required
for Option 2 and 3 is the same. Only Insert enables you to delete
rows at the destination prior to performing the insert and the title on
the panel is different to reflect whether an Insert or an Update/Insert
process is to be performed.)
Process Options:
Delete All Rows in Target Tables ===> N (Y-Yes, N-No)
If YES, Commit Frequency ===> T (T-After Each Table, E-At End)
Extract File DSN Name of the Extract File that contains the
source data as specified on the INSERT
Process menu. This value cannot be modified
on this panel.
Y Delete is performed.
B Batch
O Online
When you specify Y to the prompt Age Date Values, the Specify
Aging Parameters panel is displayed. The Specify Aging
Parameters panel prompts for the values used to age date values.
Date values are identified in Column Maps using the AGE function
and the FUTURE_YEAR function. The values specified on the
Specify Aging Parameters panel are used when explicit values are
not defined with the function in the Column Map. All explicit values
override any specifications on this panel. (For details about the AGE
Aging Specification
Explicit Date ===> YYYY/MM/DD
Or INCREMENTAL,
Years ===> (-2500 to +1581)
Months ===> (-30000 to +30000)
Weeks ===> (-30000 to +30000)
Days ===> (-99999 to +99999)
Business Rules ===> (0 to 30000)
Or TARGET DATING,
Base Date ===> YYYY/MM/DD (Default:Today)
Target Date ===> YYYY/MM/DD
EXPLICIT Explicit Date Specify an explicit date for aging. The date
must be in the form YYYY/MM/DD or
YYYY/DDD (a Julian date). The aging rule is
applied to this date.
You must specify a value for only one of the three aging methods:
EXPLICT, INCREMENTAL or TARGET DATING.
Other Parameters Default Aging Specify the name of the aging rule table to be used.
Rule Table If blank, the site default aging rule table is used.
Default Aging Specify the default aging rule to be used for any
Rule date column not explicitly assigned an aging rule.
This must be one of the values in the aging rule
table or blank.
Year assume the value is 65. All two-digit years that are
65 or over are assumed to be in the 20th century
(19xx); all two-digit years that are less than 65 are
assumed to be in the 21st century (20xx). This
information is necessary to properly age the data.
Specify a two-digit value from 00 to 99.
Output Rows Specifies whether the rows with invalid dates are
Output Rows Specifies whether the rows with skipped dates are
with Skipped written to the database. For a comprehensive list of
Dates values that are handled as skipped fields, see
Appendix G.
This ensures that MOVE does not insert child rows inappropriately.
Note that if the propagated primary key value duplicates an existing
value, that row is discarded. MOVE then discards the rows from
related tables whose foreign key columns contain the propagated
value. Therefore, if changing the CUST_ID in CUSTOMERS
causes a duplicate row, the related ORDERS rows are discarded.
If all the propagate specifications do not fit on the panel, you can
scroll the display.
Exit without To cancel the process request and return to the Specify INSERT
Perform Parameters and Execute panel, press PF12. It has been assigned
this special use on this panel only. MOVE automatically restores
your ISPF values when the Propagating Key Set(s) panel is exited.
Discarded Rows
Immediate discards -
During the Insert Process, a row is immediately discarded
if a condition exists that cannot be rectified by MOVE.
For example, the primary key value for the row already
exists in the destination table.
Pending discards -
A pending discard occurs when the row cannot be
inserted at the present time, but the condition preventing
the insert may not exist later in the Insert Process. These
rows fail the Insert but are held in a pending status while
processing continues. As the Insert request proceeds,
MOVE will attempt to insert these pending rows one or
more additional times.
Commits during Each time MOVE completes the Insert Process for a table, it issues a
cycles COMMIT statement. This occurs even when MOVE is processing a
cycle and will return to a table later in the Insert Process. That
means, table locks are held only during the time MOVE is processing
a table. When processing switches to another table, the COMMIT
Prompt to Create Before starting the Insert Process, MOVE checks for any
Table UNKNOWN destination tables. If any destination tables are
UNKNOWN, MOVE displays the CREATE Object List panel with
a message indicating that the unknown tables must be created. All
object definitions in the Extract File are included. Those object
definitions that do not exist, are identified. Assume three tables and
their primary keys, relationships, and indexes are included in the
Extract File. Also assume that the ORDERS table is UNKNOWN at
the destination and the other two tables exist.
Establish Defaults You can establish default values for the database name and the table
space name using Option 5 Create Process on the Data Migration
menu or use the DEFAULTS command. Either displays a menu from
which you select the defaults you want to establish. See Section 5.7
Create Process for more information on specifying defaults.
Select Objects You can select and unselect individual objects using the Select line
command, S, and the Unselect line command, U. Any unselected
object definitions are assigned the status UNSEL and are not included
when the SQL to create the objects is generated by MOVE.
You can scroll the list using the UP, DOWN, TOP, and BOTTOM
commands.
Create Objects You can use the CREATE ALL command to direct MOVE to
generate and execute the SQL DDL statements necessary to create the
table and other objects that have the SELECT status. Alternatively,
you can use the CR line command to create selected objects
individually or the CRA line command to create a table and the
objects related to it.
Review SQL You can display the generated SQL statements prior to execution by
specifying Yes to the prompt Review SQL. (This prompt is provided
after the last object on the list.) The SQL statements are displayed in
the ISPF editor and may be saved or edited as desired. The SQL is
executed when you use END. Use CANCEL to abandon executing
the SQL.
Details about For more information on the CREATE Object List panel, see
Creating Objects Section 5.7.4 Perform Create Process on page 406. This panel is
also displayed when you explicitly request the PERFORM option of
the Create Process and the details of this panel are discussed in that
section.
Inserting Data If the missing tables are successfully created, the Insert Process
proceeds to load the data after the SQL is executed. (If objects are
not created, the Insert Process cannot proceed and a message is
displayed. If you do not want to create the missing tables, you can
remove their names from the Destination Table Name field on the
INSERT Process Table Map panel.)
Online Execution If the Insert Process is executed online, a panel is displayed noting the
progress of the process.
The total number of rows that have been inserted out of the total
number of rows to be inserted is displayed. Also, the name of the
currently processing table and total rows that have been inserted for
that table are displayed. This is revised:
Every 1000 rows for each table to display the current total
number of processed rows.
Batch Execution If you specify batch execution, MOVE builds the necessary JCL. The
JOB card information is taken from the JCL specified on the Job
Card and Print Options panel.
The information on the Job Card and Print Options panel is used,
along with the Insert parameters, to build the JCL required to perform
the Insert Process. If you specify Review to If Batch, Review or
Save JCL on the Specify INSERT Parameters and Execute panel,
the entire JCL is displayed in the ISPF editor. This JCL can be edited
and saved.
whether the job should be submitted after saving the JCL. (Details
are discussed later in this section.)
END is used to return from the ISPF editor to MOVE, however your
specification for the prompt, Submit Jobs with END on the User
Options panel, determines whether the job is automatically submitted.
If you specify NO to the prompt, you must submit the job explicitly
from the ISPF editor using the SUBMIT command.
If you submit the job and an error is encountered in the Job Card, a
message is displayed. You can review the Job Card and correct the error
or terminate the Insert Process.
Batch Overrides If you save the JCL generated by MOVE to a data set, you can SUBMIT
the job directly from the ISPF editor instead of from within a MOVE
session. When you do so, you can override the default destination Creator
ID defined in the Table Map used for the Insert Process. This is especially
convenient when you want to apply different Extract Files to a single set of
tables or a single Extract File to multiple sets of tables using common
Insert Process JCL.
Any Extract File can be used in an Insert Process as long as at least one of
the table names on the file matches one of the table names on the Table
Map. The Creator IDs do not have to match. If any table does not match
on the Table Map, it is not included in the process.
Creator ID To override the default destination Creator ID specified on the Table Map
specify:
DEFCID cid
Year To override the year processing criteria defined for the Insert Process
specify:
Specify:
With release 3.0, the YEAR override is being replaced with a set of
powerful data aging overrides. However, it is included to ensure
upward compatibility with previous releases. Although YEAR is
currently supported for Extract Files created with release 2.5, it is not
supported for Extract Files created with release 3.0 and greater. To
override the date value, check the overrides provided for date aging.
Date Aging To override the date aging specifications for the Insert Process specify
one or more of the following:
UNKNOWN To ignore any tables referred to in the Table Map that do not exist
when performing the Insert Process, specify:
Store Overrides You can store these parameters in a sequential file or a partitioned
data set rather than specify it directly in the jobstream. However,
these parameters must be the only data in the file. (You cannot use
the same file used for a batch Extract Process if selection criteria,
Save JCL
You can save the JCL, modify it and execute the process without re-
invoking MOVE. Specify S to the prompt, If Batch, Review or Save
JCL prompt. The following prompts for the information to save the JCL.
Report Contents The INSERT Process Report is formatted as shown in the figure.
Totals:
Number of Insert Tables : 4
Number of Inserted Rows : 3972
Number of Failed Rows : 104
Inserted Failed
Insert Tables Rows Rows
------------------------- --------- -------
1 PSTDEMO.CUSTOMERS 132 5
2 PSTDEMO.ORDERS 792 23
3 PSTDEMO.DETAILS 2176 76
4 PSTDEMO.ITEMS 872 0
Report Format The title indicates whether Insert or Update/Insert was performed.
The report format includes headings to identify the information. This
information includes the Extract File name, the Control File name, the
user requesting the insert, the date and time of the insert, the number
of tables in the insert, the number of successfully inserted rows, and
the number of discarded rows.
The sequence in which the tables are listed is the order in which these
tables were found in the Extract File. The number of successful and
unsuccessful rows is provided on a table-by-table basis.
Aging Information If aging parameters have been specified for the process, the report
also includes:
• The aging parameters specified for the process. These are listed after
the summary information. For example, the following lists
specifications for an Insert Process that uses many of the defaults.
Processing Parameters:
Default Aging Amount: =’2000/01/31’
Default Aging Table: PSAPRULE
Default Aging Rule: NEXTWORKDAY
Century Pivot Year: 65
Process Date Columns: Y
Report Invalid Dates: YES
Report Skipped Dates: YES
Output Rows With Invalid Dates: YES
Output Rows With Skipped Dates: YES
Print Report While browsing, you can use the OUTPUT command to direct the
contents of the report to an output file or the printer. A panel is
displayed prompting for the necessary information based on the
specified output destination. (For details on the OUTPUT command,
see the Relational Tools Command Reference Manual.)
• The data contains RI cycles that make it impossible for the Insert
Process to successfully insert all of the data.
• You want to insert data without DB2 logging. The DB2 Load
Process prompts for you to specify whether the logging is
performed. (If you disable logging, the loaded tables are put into
Copy-Pending status. You may request execution of the DB2
COPY utility or the DB2 REPAIR utility to resolve this.)
The DB2 Load utility and the LOAD phase of LOADPLUS require
exclusive control of the database. When using MOVE's Insert
Process, the database is available to all users. Many of the facilities
of the Insert Process are available when using a Load utility. Table
Maps can be used to specify different Creator IDs and table names for
the destination. Column Maps can be used to specify different
column names and to transform data. The Load utility does not
provide for Update/Insert processing. It only performs Insert
Processing. Also, it cannot be performed online.
Sorting Generally, the rows in the Extract File are loaded into the database in
the order in which they are processed. However, when using the DB2
Load utility, if a cluster index has been defined for the table, the rows
will be sorted based on that index before being loaded. When using
LOADPLUS, sort options are available and you may select the
appropriate one when defining the parameters for the load.
DB2 LOAD Menu The following panel is displayed when Option 3 is selected from the
Data Migration menu and DB2 LOAD is to be used.
The text on the panel will reflect whether IBM’s DB2 Load Utility or
BMC’s LOADPLUS is to be used. The default load utility is
specified as a site option. A user option enables you to override this.
(For more information, see Section 6. Specify Options.) As
distributed, IBM’s DB2 Load utility is the default and, therefore
displayed in the figure.
Specify Data Set Name for Extract File and Control File:
Extract File DSN ===> 'PSTDEMO.SAMPLE.EXTRACT'
Control File DSN ===> 'PSTDEMO.SAMPLE.CONTROL'
Explicit Names To specify the name of an Extract File or a Control File explicitly, use
quotes to delimit the desired name; otherwise, it is prefixed based on
the user option chosen.
Selection List You can obtain a selection list of Extract Files or Control Files using
the wild card characters * or % as the last character when specifying
the name. A sample of the selection list displayed for Extract File or
Control File data set names is provided in Figure 165. Select
Extract Data Set on page 311.
Perform the Load Select Option 2 PERFORM to specify the parameters and perform the
process. Either the Specify DB2 LOAD Parameters and Execute
panel or the Specify LOADPLUS Parameters and Execute panel is
displayed based upon which load utility is being used.
Panel Fields The fields on the panel are provided to enable users to supply several
parameters for the LOAD DATA statement generated by MOVE and
to specify whether the DB2 REPAIR, COPY, or RUNSTATS utilities
are to be executed after the LOAD.
Delete All Rows in Specify whether or not all rows in the table
Tablespace space are to be deleted. Specify:
REPAIR If NO, Reset Copy Specify whether the DB2 REPAIR utility is
Pending to be executed after the Load is performed.
This is only relevant if Perform Logging is
NO. Use this to reset the Copy Pending
status that occurs when LOG NO is
specified.
COPY Create Full Image Specify whether the DB2 COPY Utility is
Copy after Load executed after the Load. Use this to
establish a recoverable data set and reset the
Copy Pending status that occurs when LOG
is NO.
Y RUNSTATS is invoked.
Specify:
Allow Restart on Specify whether and which DB2 work files are
(Keep SYS* Work retained to enable restartability on a specified
DSNs) level. Specify:
JCL Review Review or Save JCL Specify whether JCL is reviewed prior to job
Before Job submission. This is specified for batch
Submission execution only. Since the JCL is displayed
in the ISPF editor, you can modify it for the
current request and save it to submit later.
Specify:
Panel Fields The fields on the panel are provided to enable users to supply several
parameters to determine which tasks are performed by LOADPLUS
and to specify whether the DB2 REPAIR or RUNSTATS utilities are
to be executed after the data is loaded by LOADPLUS.
Delete All Rows in Specify whether or not all rows in the Table
Tablespace Space are to be deleted. Specify:
REDEFINE If YES, Reallocate Specify whether the table and index spaces
Datasets are to be deleted and redefined when Delete
All Rows in Tablespace is YES.
REPAIR Reset Copy Pending Specifies whether the DB2 REPAIR utility
is to be executed after the LOAD is
performed.
Date Handling Age Date Values Specify whether date values are to be aged as
part of this process. Specify:
DISCARDS integer Stop Load if there are Specify a maximum value, from 1 through
'N' Discards 2147478347, as the limit for the number of
acceptable discarded rows. When that limit is
reached, the load is terminated.
JCL Review Review or Save JCL Specify whether JCL is reviewed prior to job
Before Job submission. This is specified for batch
Submission execution only. Since the JCL is displayed in
the ISPF editor, you can modify it for the
current request and save it to submit later.
Specify:
Once you have completed the appropriate panel, either DB2 Load
Parameters or LOADPLUS Parameters, the job can be submitted.
No JCL Display If you have not requested to view the JCL before Job submission and,
on the User Options panel you have not requested that job card
information should be displayed, press ENTER to submit the job.
Job Card Review However, if you have specified YES to Review Job Card on the Job
Card and Print Options panel, the job card information is displayed
for your review. You may modify the Job Card information and
specify whether these changes apply to the current request only or are
to be permanent.
Use END or ENTER to proceed to edit the JCL or perform the Load
Process depending on the response to Review JCL Before Job
Submission.
JCL Review If Review or Save JCL Before JOB Submission on the current
parameters panel is Review, the jobstream generated by MOVE is
displayed in the ISPF editor. The jobstream can be edited and saved
while displayed in the ISPF editor.
The changes apply only for the current job and do not affect the
specifications on the Job Card Options panel. You may save the
JCL using ISPF facilities.
Note that the COPY Utility requires unique data set names for each
image copy defined in the COPYDDN and RECOVERYDDN
statements.
Save JCL You can save the JCL, modify it and execute the process without re-
invoking MOVE. Specify S to the prompt, If Batch, Review or Save
JCL prompt. The following prompts for the information to save the JCL.
Automatic END is used to return from the ISPF editor to MOVE, however your
SUBMIT specification for the prompt, Submit Jobs with END on the User
Options panel, determines whether the job is automatically submitted.
If you specify NO to the prompt, you must submit the job explicitly
from the ISPF editor using the SUBMIT command.
When Submit Jobs with END is YES, use the CANCEL command
to return to the Load Process panel without submitting the job.
Job Steps The job steps performed are as follows. Note that Step 1 is executed
once, but Step 2 may be executed several times. Steps 3, 4, and 5 are
optional and, if performed, are executed once.
Step 2 DB2 LOAD executes a Load Job Step for each table
space. The number of times Step 2 is performed is equal
to the number of table spaces involved in the load.
Step 3 Execute the Check Utility for each table space in Check
Pending status that is being loaded.
Check Pending A table space may be placed in Check Pending status when one or
Status more of the following conditions occur:
• Delete All Rows in the Table Space is set to YES. There are
two possible scenarios:
Copy Pending When the DB2 Load utility is executed with LOG NO, a COPY
Status PENDING restriction is placed on the table space being loaded. This
prevents updates to any table in the table space. It is intended to force
the user to establish a point of recoverability for the data which the
LOG NO option lost.
MOVE provides two options for clearing the Copy Pending status and
prompts for them on the Specify DB2 LOAD Parameters and
Execute:
DB2 REPAIR The DB2 REPAIR utility does not establish a recoverable set of data.
It is provided here because it is a fast and simple way to reset the
COPY PENDING restriction when loading data into a new table
space or replacing all of the data in a table space. When used with
LOAD REPLACE, the Extract File serves the purpose of a DB2 Full
Image Copy. However, when used with LOAD RESUME YES, the
database is non-recoverable.
DB2 COPY The DB2 COPY Utility establishes recoverability by creating image
copies of a table space. This is recommended when you are not
replacing all of the data in a table space.
Up to four image copies can be made: main and backup copies for
both local and remote sites. The panel options for COPYDDN and
RECOVERYDDN, as documented in the panel field descriptions,
determine which copies are created.
Process Complete After the LOAD is executed, you can browse the Control File to
identify any rows that were discarded when transforming the Extract
File to the DB2 load format. The Load utility produces a report that
shows the errors encountered while loading the data.
The Delete Process is used to delete the data extracted from the source
database.
You may use the Delete Process in combination with the Extract and
Insert Processes to perform a traditional “move” process. That is,
you can copy the data to a destination and delete it from the source.
Provide Data Set Names for Extract File and Control File:
Extract File DSN ===>
Control File DSN ===>
Process Options:
Lock Tables During Process ===> (Y-Yes, N-No)
Commit Every Nth Row ===> (1-1000, Blank-Site Limit)
Limit Number of Discarded Rows ===> (1-999999, Blank-No Limit)
Run Process in Batch or Online ===> (B-Batch, O-Online)
If Batch, Review or Save JCL ===> (N-No, R-Review, S-Save)
Extract File DSN Name of the Extract File that contains the
source data. This file must exist and must
be a sequential data set. You can obtain a
selection list of Extract Files using either
wild card character, * or %, as the last
character in the name.
previous data.
BLANK No limit.
B Batch
O Online
Specification When you have completed your specifications, press ENTER and the
Complete Delete Process begins. If the process is executed online, a panel is
displayed noting the progress of the process.
The total number of rows that have been deleted out of the total
number of rows to be deleted is displayed. Also, the name of the
currently processing table, total number of rows that have been
deleted from that table, total number of rows that could not be found
to be deleted from that table, and total number of rows that could not
be deleted for that table are displayed.
This is revised:
• Every 1000 rows for each table to display the current total
number of processed rows.
Batch Execution
If you specify batch execution, MOVE builds the necessary JCL. The
JOB card information is taken from the JCL specified on the Job
Card and Print Options panel.
END is used to return from the ISPF editor to MOVE, however your
specification for the prompt Submit Jobs with END on the User
Options panel, determines whether the job is automatically submitted.
If you specify NO to the prompt, you must submit the job explicitly
form the ISPF editor using the SUBMIT command.
Save If you responded Save to If Batch, Review or Save JCL, you are
prompted for the name of the file in which to save the JCL and
whether the job should be submitted after saving the JCL. (Details
are discussed on page 358.)
Job Card Error If you submit the job and an error is encountered in the job card, a
message is displayed. You can review the job card and correct the
error or terminate the Delete Process.
Discarded Rows Rows are discarded when an attempt to delete the row is unsuccessful.
This can occur when RI rules prevent the row from being deleted. For
example, a row is not deleted if this table has a Delete Restrict
relationship to another table that still contains rows. This can only
occur if that table was not part of the original Extract since MOVE
will delete rows in the proper order. These discarded rows are noted
in the Control File.
Important Note If the Delete Process is being performed on rows for which the
primary key is defined as non-unique in the Princeton Softech
Directory, a row is deleted at the destination only when all of the data
in all of the columns in the source row and destination row match.
Therefore, each row in the Extract File containing an occurrence of
the primary key, is compared to each potentially matching row. When
a successful match is encountered the row is deleted and the Extract
File row marked OK. If none of the destination rows match the
Extract File row, a delete is not performed and the row is marked as
NOT FOUND.
Cascade Delete If you attempt to delete tables which are parents in a relationship
defined with cascade delete, MOVE warns you that descendant rows
DELETE Process A DELETE Process Report is generated as part of the process. This
Report report contains information including various statistics about the
execution of the process.
Display Report The contents of the DELETE Process Report can be browsed. When
Contents the process is executed online, the DELETE Process Report is
automatically displayed. Standard ISPF scrolling functions are
available.
Report Contents The DELETE Process Report is formatted as shown in the following
figure.
Totals:
Number of Delete Tables : 4
Number of Deleted Rows : 3972
Number of: Failed Rows : 0
Number of Rows not Found : 0
Report Format The report format includes headings to identify the information. This
includes the Extract File name, the Control File name, the user
requesting the Delete, the date and time the process was executed, the
number of tables in the delete, the number of successfully deleted
rows, the number of discarded rows, and the number of rows not
found.
The sequence in which the tables are listed is the order in which these
tables were specified in the Extract File. The number of successful
and unsuccessful rows is provided on a table-by-table basis.
If Row Updated When MOVE deletes a row, the entire row is checked to ensure that it
matches the row in the Extract File exactly. If another user has
updated the row between the time the Extract Process was performed
and the time the Delete Process is performed, that row is not deleted.
DB2 RI Rules MOVE normally deletes rows from the child table before attempting
to delete rows in the parent table. However, for cascading deletes,
MOVE deletes the parent table first and DB2 deletes the child rows.
If any of the deleted child rows are included in the Extract File,
MOVE attempts to delete them later. Since they have been previously
deleted by DB2, these child rows are marked as NOT FOUND in the
DELETE Process Report.
Print Report While browsing the DELETE Process Report online, you can use the
OUTPUT command to direct the contents of the report to an output
file or SYSOUT. A panel is displayed prompting for the necessary
information based on the specified output destination. (For details on
the OUTPUT command, see the Relational Tools Command
Reference Manual.)
The Create Process does not load any data. Use the Insert and DB2
Load processes to load data. These processes will create any
destination tables that do not exist along with any other object
definitions for these tables, such as primary keys and relationships,
indexes, etc. that have been extracted. However, Insert and DB2
Load Processes do not automatically create any additional objects for
existing destination tables. The Create Process must be used to create
the additional objects when all of the destination tables exist.
When you select Option 5 from the Data Migration menu, the
following panel is displayed.
Extract File DSN Specify the name of the Extract File containing
the source object definitions. (The Extract File
must be one created with Release 2.0 or later of
MOVE.)
Table Defaults
You can specify values for any of the prompts on the following panel,
but all values are optional. If the DATABASE NAME is omitted, it
will be prompted for when a table is to be created. If you leave any
other field blank, MOVE omits that parameter when generating the
SQL. Therefore, the DB2 default is used when the object is created.
desired.
Tablespace Defaults
On the following panel you can specify values for any of the prompts
for default parameters for table spaces, but all values are optional. If
you leave any field blank, MOVE omits that parameter when
generating the SQL and the DB2 default values are used.
The values on the Tablespace Defaults panel are profiled. For the
initial display, the panel fields are blank. The following figure is
displayed when Version 5 of DB2 is installed:
YES Erase
NO Do not erase.
Specify:
Index Defaults
You can specify default values for the parameters for indexes, but all
values are optional. If you leave any field blank on the following panel,
the DB2 default value is applied.
YES Erase.
NO Do not erase.
NO Index is built.
This option is displayed only when Version
3 or greater of DB2 is installed.
Creator ID Defaults
When you select Option 1 Table Map from the CREATE Process
menu, the CREATE Process Table Map panel is displayed.
Assume the object definitions for three tables are specified in an
Extract File. The following panel is displayed:
TABLE A table
VIEW A view
UNKNOWN Not found or initial display
A-TABLE An alias of a table
A-VIEW An alias of a view
S-TABLE A synonym of a table
S-VIEW A synonym of a view
UNUSED A destination table is not
specified.
TEMPTBL Temporary table
Selection List The LIST command is available for aliases, synonyms, tables, and
views. For example, to obtain a selection list of available tables, use
the command LIST TABLES and position the cursor on the
destination table name you want to supply. A selection list of
available tables with the destination Creator ID is displayed. You can
override the destination Creator ID with the LIST TABLES command
as in LIST TABLES SMITH.%.
Use the Select line command, S, to select a table name from the
selection list. MOVE automatically places the name in the destination
table name field on which the cursor is positioned.
Duplicate table names are not allowed. Therefore, the same table
name cannot be specified twice as a destination table.
Use Existing Table You can use the APPLY command to populate the Table Map with
Map the specifications from a previously defined Table Map. If the source
tables in the process match the source tables in the Table Map,
MOVE populates the destination tables from the existing Table Map.
APPLY can be specified to populate all table names and the Dest CID
regardless of any entry, or populate only the blank fields.
Destination Table MOVE automatically revises the Type each time you modify a
Type destination table name. If you modify the Dest CID, any tables that
are specified without an explicit Creator ID automatically use the new
Dest CID. This may change the Type value and require review. You
can explicitly supply the Creator ID with the Destination Table
Name. Then, changing the Dest CID does not affect the table name.
pending object.
TABLE INDEX
VIEW JVIEW
PK(DB2) PK(PST)
FK(DB2) FK(PST
REL
ALIAS SYNONYM
TEMPTABLE
The source of existing or the destination of non-
existing primary keys and relationships is noted
appropriately with the type. Thus keys in the DB2
Catalog are designated as PK(DB2) and FK(DB2);
those in the Princeton Softech Directory are designated
as PK(PST) and FK(PST) or REL. The objects
designated FK(PST) follow the rules for DB2 Catalog
foreign keys and can be respecified to be created in the
DB2 Catalog. The objects designated as REL are
relationships in the Directory that are not based on
primary key/foreign key pairing and therefore cannot
be created in the DB2 Catalog. (For more information
about the differences in these relationships, see Section
4.2 Relationships.)
Database If the table exists, the name of the database that the
table belongs to is displayed. If the table does not
exist, the default value, as specified on the Table
Defaults panel, is specified. If a default value has not
been established, the field is blank.
Tablespace If the table exists, the name of the table space the table
belongs to is specified. If the table does not exist, the
default value, as specified on the Table Defaults panel,
is specified. If a default value has not been
established, the field is blank.
The display includes top and bottom markers to indicate the first and
last entries on the list. A count indicating the relative position of the
Initial Display On initial display, the CREATE Object List panel includes an entry
with the TABLE type for every destination table listed on the
CREATE Process Table Map panel. The table names are listed in
the order in which they are specified on the Table Map panel. The
Extract File is checked for the other types of object definitions.
Only the object definitions associated with the listed table definitions
are included on the CREATE Object List panel. Relationships and
joined views are included only if all prerequisite tables are included on
the CREATE Process Table Map panel.
Object Definition For the initial display, MOVE checks each object definition on the list
Status and assigns a status as follows:
The status determines which object definitions are created when the
CREATE ALL command is entered.
SELECT Status MOVE attempts to create only those object definitions assigned the
SELECT status when CREATE ALL is executed. From the initial
display, you can specify individual object definitions to be
“unselected” or assigned the UNSEL status using the Unselect line
command, U. The object definitions in UNSEL status are not created
when CREATE ALL is executed. You can reassign the SELECT
status using the Select line command, S.
CONFLICT Status The CONFLICT status results when the object definition for a named
object on the CREATE Object List panel conflicts with an existing
object at the destination. This can occur for indexes and
relationships. For example, an index definition on the panel has the
same name as an index defined at the destination but the indexes are
for different tables.
You can handle object definitions with the CONFLICT status by:
For TABLES, you can respecify the database on this panel or the
table name on the Table Map panel. (Changing the database
name will also affect the status of the object definitions associated
with that table definition.) When a TABLE is in CONFLICT
status, all related object definitions are also in CONFLICT status.
CREATED Status All objects successfully created during the current session are
assigned the CREATED status.
Modifying the List You can modify the names of the object definitions for any object
except TABLE by overtyping the values provided in the name fields.
If you do modify the names, MOVE amends the status for each object
definition appropriately.
You can redisplay the CREATE Process Table Map panel and
modify the destination table names. Any destination table names that
you remove from the Table Map are deleted from the CREATE
Object List along with their associated object definitions.
Conversely, any tables that you add to the Table Map, are included on
the CREATE Object List. You cannot insert or delete object
definitions from the list directly.
DEFAULTS You can use the DEFAULTS command to display the CREATE
Command Defaults menu. From this menu you can select an option and modify
the defaults. The changes you make on the default panels only affect
those object definitions that have not been explicitly modified by the
user and do not already exist. See Section 5.7.2 CREATE Process
Defaults for additional information.
DROP ALL Use the DROP ALL command to drop all objects in the destination
Command before creating the new objects. The DROP ALL command does not
drop objects in conflict, however.
DB2 or PST You can use the line commands DB2 and PST to switch the type of
primary key or foreign key that is created. By default, the key is
created based on the source type. However, using these line
commands you can switch from the DB2 Catalog to the Princeton
Softech Directory and vice versa.
You can determine the current destination with the type field. For
example, FK(PST) designates a relationship that adheres to DB2
requirements for a foreign key to be defined in the Princeton Softech
Directory, and PK(DB2) designates a primary key and is to be defined
in the DB2 Catalog.
Unlike the DB2 Catalog, the Directory does not require a primary
key/foreign key pairing to define a relationship. However, any
relationship in the Directory that conforms to the DB2 Catalog
requirements is indicated as FK(PST) on the CREATE Object List
panel. Indicating these relationships as FK(PST) enables users to
switch the destination from the Directory to the DB2 Catalog. Any
relationships in the Directory that do not conform to the DB2
requirements are indicated as REL and cannot be defined to the
catalog.
These different types are also evident in the SQL statement that is
generated. The following show the SQL that is generated for
relationships. The first is the SQL for a DB2 foreign key and the
second for a comparable PST key, and for a PST relationship that is
not based on a primary key/foreign key pairing.
PST to DB2 The SQL for a DB2 foreign key generated from a
PST relationship always includes the DELETE
RESTRICT rule. Assume the foreign key
RTCO, where SOFTECH.CUSTOMERS is the
parent to SOFTECH.ORDERS and the key
column is CUST_ID, is switched to DB2.
Handling the List In addition to scrolling facilities, the SHOW command can be used to
display only the object definitions for a specific type or a specific
status. (The object definitions for the type TABLE, regardless of
status, are always displayed.)
For example, the following figure shows the result when SHOW
INDEX is entered on the panel in Figure 196. CREATE Object
List:
Review SQL If you specify Yes, to Review SQL Before Create, the SQL
generated by MOVE to create the selected objects is displayed. Since
the SQL is displayed in the ISPF editor, you can edit it directly and
save it. Use RUN to execute the SQL; use END or CANCEL to
abandon execution.
SQL Line You can use the SQL line command to display the SQL for any object on
Command the list with the UNSEL, SELECT, or CREATED status. This display
is browse-only and the SQL will include any user modifications that were
made to create the object. (The SQL line command is not available to
display the SQL for existing object definitions because of the lengthy
catalog retrieval that would be required.)
Create Performed After the Create Process has executed, the resulting information from
DB2 is automatically displayed as browse-only data in SPUFI-format.
Assume the relationship RTCO for the ORDERS table, as shown in
Figure 196. CREATE Object List, is created.
Available The primary commands available on the CREATE Object List panel
Commands include:
If, on the CREATE Object List, you specify the name of a database
that does not exist, MOVE prompts for the information to create the
database. Note the "DATABASE NOT FOUND" message in the
upper right corner of the following panel.
If, on the CREATE Object List, you specify the name of a tablespace
that does not exist, MOVE prompts for the information to create the
tablespace. Note the "TABLESPACE NOT FOUND" message in the
upper right corner of the following panel.
ALTER INSERT
DELETE SELECT
INDEX UPDATE
Y Privilege is included.
T Tables
V Views
Y SQL is displayed.
You can scroll the list using UP, DOWN, TOP and BOTTOM if
necessary.
Selections When you are satisfied with your selections, use END or ENTER.
Complete
If you have responded N to Review SQL before Granting
Privileges, the request is executed.
5.7.6 SYNONYMS
Y Display SQL.
Specifications When you are satisfied with your selections, use CREATE ALL.
Complete
If you have responded N to Review SQL before Create, the request
is executed.
This option enables you to save the generated SQL in a data set for
editing and future use, but more importantly, it enables you to save
the SQL to create all object definitions on the CREATE Object List
regardless of whether they exist or not. With this stored SQL, the
objects can be created any number of times in any subsystem.
Output SQL for Specify whether the SQL for only the non-
(existent or existent objects, objects to be created, or the
nonexistent objects) SQL for all objects is to be output. Specify:
Output for SQL Specify whether only the selected objects are
(selected or all to be included or if all object definitions are
objects) to be included in the output SQL. Specify:
Review SQL after Specify whether you want to review the SQL
Output after it is output. Specify:
Y Display SQL.
Many sites use Convert to mask sensitive data before inserting it. In
this way, sensitive data is eliminated from the Extract File. An
Extract File does not have the same level of protection afforded by
DB2.
When you select Option 6 from the Data Migration menu, the
following panel is displayed.
Specify Data Set Names for Source Extract File and Control File:
Source Extract File DSN ===> SAMPLE.PST.SRCEXTR
Control File DSN ===> EXTRACT.CTRL
Source Extract Name of the Extract File that contains the source
File DSN data to be converted.
Age Date Values Specify whether date values are to be aged as part
of this process. Specify:
Sort Extract File Specify whether the data for destination tables
Rows with a cluster index are to be sorted. Specify:
Y Sort rows.
Selection List You can obtain a selection list of names of Extract File or names of
Control Files by specifying the wild cards, * or %, as the last
character in the name. When the list is displayed, use the Select line
command, S, to select an entry. A sample of the selection list
displayed for Extract File or Control File data set names is provided
in Figure 165. Select Extract Data Set on page 311.
Option 1 When you select Option 1 TABLE MAP, the CONVERT Process
TABLE MAP Table Map panel is displayed. (As noted previously, a discussion of
Table Maps is provided in Section 4.4 Table Maps.)
Online Execution If the process is executed online, a panel is displayed noting the
progress of the process.
The total number of rows that have been converted out of the total
number of rows to be converted is displayed. Also, the name of the
currently processing table, total number of rows that have been
converted, and total number of rows that could not be converted for
that table are displayed.
This is revised:
• Every 1000 rows for each table to display the current total
number of processed rows.
Batch Execution
If you specify batch execution, MOVE builds the necessary JCL. The
JOB card information is taken from the JCL specified on the Job
Card and Print Options panel.
When you have completed reviewing the JCL, use END. If you have
established that jobs are automatically submitted when END is used,
the job is submitted. Otherwise, you will have to explicitly SUBMIT
the job from the ISPF editor. (See Section 6.1 User Options, for
information on establishing whether jobs are automatically submitted
when END is used.)
Save If you specify Save to If Batch, Review or Save JCL, you are
prompted for the name of the file in which to save the JCL and
whether the job should be submitted after saving the JCL. (Details
are provided on page 358.)
Job Card Error If you submit the job and an error is encountered in the job card, a
message is displayed. You can review the job card and correct the
error or terminate the Convert Process.
Display Report The contents of the CONVERT Process Report can be browsed.
Contents When the process is executed online, the CONVERT Process Report
is automatically displayed. Standard ISPF scrolling functions are
available.
In batch, the report is placed in the output as specified in the JCL. You
can then display the report as you would the output from any job.
Data Exit
Extract Converted Conversion Routine
Convert Table Rows Rows Errors Discards
------------------------ -------- -------- ----------- ---------
1 PSTDEMO.CUSTOMERS 132 132 0 0
2 PSTDEMO.ORDERS 792 796 0 0
3 PSTDEMO.DETAILS 2176 2176 0 0
4 PSTDEMO.ITEMS 872 872 0 0
Report Format The report format includes headings to identify the information. These
are: the Extract File name, the Control File name, the destination Extract
File name, the user requesting the Convert Process, the date and time the
process was executed. This is followed by: the number of tables, the
number of rows in the Extract File to be converted, the number of rows
successfully converted, and the number of rows having conversion errors
and the number of rows discarded by an exit routine.
The tables are listed below this with a complete breakdown of the
totals for each table. The sequence in which the tables are listed is the
order in which these tables were specified in the Extract File.
Aging Parameters If aging parameters have been specified for the process, the report
also includes:
• The aging parameters specified for the process. These are listed after
the summary information. For example, the following lists
specifications for a Convert Process that uses many of the defaults.
Processing Parameters:
Default Aging Amount: =’2000/01/31’
Default Aging Table: PSAPRULE
Default Aging Rule: NEXTWORKDAY
Century Pivot Year: 65
Process Date Columns: Y
Report Invalid Dates: YES
Report Skipped Dates: YES
Output Rows With Invalid Dates: YES
Output Rows With Skipped Dates: YES
Print Report While browsing the CONVERT Process Report online, you can use
the OUTPUT command to direct the contents of the report to an
output file or SYSOUT. A panel is displayed prompting for the
necessary information based on the specified output destination. (For
details on the OUTPUT command, see Relational Tools Command
Reference Manual.)
After the Convert Process has executed, you can review the resulting
Extract File to ensure the transformation of the data. Use Option B
BROWSE on the Data Migration menu to display the contents of the
Extract File.
RETRY When one or more rows were discarded during the process, the
process can be retried. A row might be discarded because of RI
conflicts. For example, attempting to insert a child row that refers to
a non-existent parent row.
RESTART When a process does not execute to completion, the process can be
restarted. For example, a process may not complete if it exceeds the
allowable CPU limit.
Menu Option When you select Option R, RETRY/RESTART, from the Data
Migration menu, a list of pending processes initiated by the current
user is displayed.
Timestamp Date and time the process was performed. The list
is arranged by timestamp in ascending order.
DELETE
INSERT
UPDATE
List All Pending You can display a list of all pending processes for all users using the
Processes ALL command. The following is the display for all SQL IDs.
You can toggle between the display of all pending processes and only
the processes for the current user, by entering ALL, for the complete
list, and USER, for the user-specific list.
These pending process lists can be scrolled using the standard ISPF
scrolling facilities.
Information about You can display additional information about any of the listed pending
Process processes. Use the Information line command, I. For example, assume I
is entered for the first process, the following panel is displayed.
Select Process Use the Select line command, S, to select a process from the list. The
process is retried or restarted based on its status.
Parameters Panel When the process is retried or restarted, the Parameters panel for the
Redisplayed process is redisplayed appropriately. The panel title indicates whether
the process is Insert, Update/Insert, or Delete and whether the
execution will be a retry or a restart. Although you cannot change the
names of the Extract File DSN and the Control File DSN, you can
respecify the other parameters. For example, the following figure is
displayed when a Delete Process is restarted. (For details, see the
information about the specific process Parameters panel.)
Process Options:
Lock Tables During Process ===> Y (Y-Yes, N-No)
Commit Every Nth Row ===> 100 (1-1000, Blank-Site Limit)
Limit Number of Discarded Rows ===> 1000 (1-999999, Blank-No Limit)
Run Process in Batch or Online ===> B (B-Batch, O-Online)
If Batch, Review or Save JCL ===> (N-No, R-Review, S-Save)
When the Restart is invoked, the process is restarted with the row
after the last committed deleted row. Any discarded rows from the
original processing are retained. Any rows discarded by this
execution are marked accordingly.
Specify Extract File or Control File Data Set Name. Use Control File if
row status information is to be included in browsed data or if row status
information is to be used for filtering browsed data.
Provide Data Set Name if Output to Disk (Blank for Temporary Data Set):
DSN ===>
If Display Length Exceeds File Width ===> (C-Change File, W-Wrap Data)
LIST TABLES The LIST TABLES command is available to obtain a list of tables in
Command the named Extract or Control File. The LIST TABLES command
accepts no parameters.
To view the rows in the Control File from each table, scroll the
display. The following figure displays several rows from the
CUSTOMERS table. Note the status in the Status field on the left is
provided only when the Control File is used.
Possible Status The status of each row is listed on the left-hand side of the panel. The
possible values and their meaning are:
SQL Error Codes Rows with certain SQL error codes are treated as row errors. When
as Row Errors you specify X for the prompt Include Row Status, pertinent error
messages are included. The following are the SQL error codes and
the accompanying messages.
-161 THE RESULTING ROW DOES NOT SATISFY THE VIEW DEFINITION
About Conversion When a conversion error occurs, the column containing the error is
Errors displayed and a right-arrow, >, is placed to the left of the data in
error. The right-arrow highlights the location of the error and can be
used on the FIND command to locate these errors.
The contents of the Extract File or Control File can be printed. For
additional information see Appendix E. Printing Extract and
Control Files.
Available Primary Several primary commands are available to manipulate the display:
Commands
BOTTOM END LOCATE UP
CANCEL FIND RIGHT TOP
DOWN LEFT RFIND
Panel Format The format of these Options panels is either full-screen or pop-up
based on how the panel was accessed. When invoked from the
OPTIONS command, the panels are pop-up. The full screen format
is always displayed when selected through the Main Menu.
Values Profiled The values you specify on the Options panels are profiled.
Load Utility to Use Specifies the load utility to be used for the DB2
Load process. Site management may establish a
non-modifiable default value. If modifiable,
specify:
Data Set Prefix Specifies the default value to be used as the high
order qualifier for any data set name that is not
enclosed in apostrophes. Specify:
Review Job Card Specifies whether the job card prompts on the
Job Card and Print Options panel are
displayed enabling users to respecify the job
statement and several other job parameters
before submitting a batch job. (See Figure 219.
Job Card and Print Options.) Specify:
To reset any of the values to the site defaults, leave the field blank.
You use the Selection List Format option to specify whether the
description and security status are displayed on the selection list of
PST Directory objects. However, to specify the description and
security status, use the ATTRIBUTES command from the object
editor or the AT line command on the selection list to display prompts
for specifying these values.
Panel Fields The name of the object is displayed. You specify the following:
Security Status Specify the access privileges for the named object
as one of the following:
A set of editor and display options are available. When you select
Option 2 from the Options menu, the following prompts are
displayed.
displayed.
ENTER Exits Specifies when the ENTER key can be used to exit
Criteria Panels the Specify Selection Criteria panel, the SQL
WHERE Clause panel, and the Describe
Columns panel during a browse session. Specify:
Job Statement:
===>//SPECHTR JOB 'ACCT-INFO',MSGCLASS=8,CLASS=6,
===>// NOTIFY=SPECHTR
===>
===>
===>
Report Parameters:
Report Type ===> D D-Dataset, S-SYSOUT
If Dataset: DSN ===> PST.PRINT
Disposition ===> M M-MOD, O-OLD
If SYSOUT: SYSOUT Class ===> * A - Z, 0 - 9, *
Destination ===> LOCAL
Hold ===> Y Y-Yes, N-No
//name JOB
If Data Set: DSN Name of the data set to receive the report.
This must be a sequential file.
Job Card Profiled The Job Card information is profiled. If there is no profiled information,
the Job Card is filled in with the ISPF variables, ZLLGJOB1 through
ZLLGJOB4, from ISPF option 0.2 LOG AND LIST DEFAULTS.
(Note if the information profiled exceeds the display width of 66
characters, it is truncated.) Use the RESET command to reset the Job
Card to these original values.
Batch utilities also automate certain online functions such as, copying
PST objects in a Directory and migrating PST objects across
Directories.
JCL Requirements The JCL needed to migrate PST objects is described in Section 7.3
Utilities to Migrate PST Objects. The JCL needed to execute
utilities for information retrieval and Directory maintenance is:
// EXEC PGM=PDPMMAIN,REGION=0M,
// PARM=' CON UTILITY subsys planname sqlid userid '
//SYSPRINT DD SYSOUT=*
//SYSTERM DD SYSOUT=*
//PDPDDFLT DD DSN=your.loadlib.(PDPDDFLT) DEFAULT SITE OPTIONS
//PSTRACE DD SYSOUT=*
//PSDFASUM DD SYSOUT=* SUMMARY LISTING FILE
//PSDFADIR DD SYSOUT=* DIRECTORY LISTING FILE
//PSDFAREP DD SYSOUT=* REPORT LISTING FILE
//SYSIN DD *
control statements
/*
Also, block size must be a multiple of 132. The data set may be
sequential or partitioned. Note that, unlike a listing directed to
SYSOUT, there is no carriage control byte before each line.
Error Codes If no errors are found during the run, the return code is 0. If errors
are found, the return code is 12.
Control Insert control statements for the functions after the SYSIN DD *
Statements statement. Available control statements and their functions include
the PAGESIZE, ERROR, and OUTDD statements, which affect the
execution of other control statements. They are discussed in detail in
Section 7.4 General Batch Control Statements. The remaining
control statements, grouped according to function, are discussed on
the following pages of this section.
The syntax used on the following pages to describe the control statements
is:
DIRECTORY Statement
• Generic Relationships
DIR ( ECTORY )
TYPE { AD | CM | TM | R | PK | CD }
NAME name
[ MODIFIEDBY modifiedby ]
[ DESC desc ]
[ TABLE [ cid. ] tblname ]
[ DSNAME dsname ]
[ GROUP group ]
[ PNS { NO | YES } ]
[ ARC { NO | YES } ]
[ DB2 { NO | YES } ]
[ GENERIC { NO | YES } ]
[ SORT ( [ NAME, A | D ] [ GROUP, A | D ] [ DESC, A | D ]
[ DATE, A | D ] [ MODIFIEDBY, A | D ] ) ]
[ DETAIL { NO | YES } ]
[ PRINTCOL { ALL | NONE | SEL | ARC } ]
[ NEWPAGE { NO | YES } ]
Optional Criteria Use the following keywords to further refine the criteria for objects to be
Keywords: listed.
– For All PST MODIFIEDBY TSO ID of the last person to modify the objects.
Objects
modifiedby Specify as an explicit value or a
pattern, using SQL LIKE syntax.
– For Access DSNAME Data set name referenced in listed objects. The
Definitions or referenced data set may be a Point-and-Shoot File, a
Compare Compare File, an Extract File, or an Archive File.
Definitions
Use this keyword only if TYPE is AD or CD.
– For Primary Keys DB2 Type of primary keys or relationships to be listed. Use
or Relationships this keyword only if TYPE is R or PK.
Report Formatting Use the following optional keywords to format the Directory Report.
Keywords
SORT The sequence for list of objects in the report. If you do not
specify a SORT keyword, the items are listed in ascending
order, by name.
AD − Default Creator ID
− Start Table name
− Table List
− Relationship Usage
information
− Column information
(Optional, see
PRINTCOL keyword,
on page 469.)
NEWPAGE Page break processing for the report. Use this keyword
only if DETAIL is YES.
DELETE Statement
DELETE
TYPE { AD | CM | TM | R | PK | CD }
NAME name
[ MODIFIEDBY modifiedby ]
[ DESC desc ]
Optional Criteria Use the following keywords as necessary to further refine the criteria for
Keywords: objects to be deleted.
COPY Statement
Use a COPY statement to create one or more PST objects that are
exactly like specified existing objects, but have different names. The
COPY statement also generates a report of the new objects in the
Directory listing file.
COPY
TYPE { AD | CM | TM | R | PK | CD }
FROM objectname
TO objectname
[ MODIFIEDBY modifiedby ]
[ DESC desc ]
[ REPLACE { NO | YES } ]
Optional Criteria MODIFIEDBY TSO ID of the last person to modify the source objects.
Keywords
modifiedby Specify as an explicit value or a pattern,
using SQL LIKE syntax.
Optional Replace REPLACE Action taken when the name of a new object (taken from
Keyword the objectname operand for the TO keyword) matches
the name of an existing object in the Directory.
NO Do not reproduce.
YES Reproduce the object and replace the
preexisting object with the same name.
RENAME Statement
RENAME
TYPE { AD | CM | TM | R | PK | CD }
FROM objectname
TO objectname
[ MODIFIEDBY modifiedby ]
[ DESC desc ]
[ REPLACE { NO | YES } ]
Optional Criteria MODIFIEDBY TSO ID of the last person to modify the PST objects.
Keywords
modifiedby Specify as an explicit value or a pattern,
using SQL LIKE syntax.
Optional Replace REPLACE Action taken when the name of a new object (taken
Keyword from the objectname operand for the TO keyword)
matches the name of an existing object in the
Directory.
NO Do not rename.
The Relational Tools provide two batch utilities to migrate PST objects,
such as Access Definitions, Column Maps, Table Maps, Primary Keys,
or Relationships, stored in the Directory. You can export or import
objects in batch or online. Batch execution is documented in this section.
(See Section 4.5 Export and Import Processes for information about
online execution.)
You can also create a file of PST objects independently and use Import
batch processing to load the objects. (The format of the objects is
discussed in Section 4.5.3 File Format.)
JCL Requirements The JCL needed to export or import PST objects is somewhat different
from the JCL needed for other batch processes. For this reason, JCL
requirements are discussed with both the batch Export Utility and the
batch Import Utility.
// EXEC PGM=PDPMMAIN,REGION=0M,
// PARM=' CON OBJEXP subsys planname sqlid userid '
//SYSPRINT DD SYSOUT=*
//SYSTERM DD SYSOUT=*
//PDPDDFLT DD SYSOUT=*
//PSTRACE DD SYSOUT=*
//PSDFRPRT DD SYSOUT=* EXPORT OR IMPORT REPORT
//PSDFEXPT DD SYSOUT=* FILE
//SYSIN DD* DSN=* EXPORT DEFINITIONS FILE
control statements
/*
Define a data set for PSDFRPRT listings in the same manner as for the
other utilities. Error codes are the same as for the other batch utilities.
Control Insert control statements for functions after the SYSIN DD* statement.
Statements Export control statements and their functions are:
SUBDEF Statement
SUBDEF { NO | YES }
EXPORT Statement
EXPORT PK PSTDEMO.%
EXPORT R %.%.%
SUBDEF YES
EXPORT AD PSTDEMO.%.%
SUBDEF NO
EXPORT AD PST%.SMITH.%
EXPORT AD %.%.%
// EXEC PGM=PDPMMAIN,REGION=0M,
// PARM=' CON OBJIMP subsys planname sqlid userid '
//SYSPRINT DD SYSOUT=*
//SYSTERM DD SYSOUT=*
//PDPDDFLT DD SYSOUT=*
//PSTRACE DD SYSOUT=*
//PSDFRPRT DD SYSOUT=* EXPORT OR IMPORT REPORT
//PSDFIMPT DD SYSOUT=* FILE
//SYSIN DD* DSN=* DEFINITIONS DATA SET
control statements
/*
A sample of this JCL is provided in the install library, as member
JCLIMP. You can copy this JCL and modify it as needed.
Define a data set for PSDFRPRT listings in the same manner as for the
other utilities. Error codes are the same as for the other batch utilities.
Control Insert control statements for the functions after the SYSIN DD*
Statements statement. The Import control statement and its function is:
TYPE Statement
Use a TYPE statement to select PST objects from the PSDFIMPT file,
and copy the objects to the Directory. Any number of TYPE statements
may be used; objects are written to the Directory in the order specified.
TYPE { ALL | PK | R | CM | TM | AD | CD }
[ OVERWRITE { NO | YES } ]
Example To import all primary keys with the Creator ID "PSTDEMO" and
replace any primary keys with the same name:
PAGESIZE Statement
PAGESIZE 75
ERROR Statement
OUTDD Statement
OUTDD ddname
OUTDD ADREPT
MOVE only The following figure displays the Main Menu when only MOVE is
installed. Only the available options are displayed.
Remote Access When remote access is available, the LOCATION field is provided
for you to specify the site-defined name of the remote location.
Point-and-Shoot
Extract
Control
OUTPUT
Output SQL
Extract Browse
Export
Process Report
Panel fields Volume Serial The volume serial number of the volume on
which the dataset is to reside. Leave this field
blank to use the default volume for which you
are authorized. This value must contain only
alphanumerics, national characters, and the
hyphen. The value for volume serial number is
mutually exclusive with Generic Unit.
Defaults for Each external file type has defaults. The chart lists the files. The
Specific Files modifiable defaults are shown in italics. The other values cannot be
modified.
For more detailed information on these fields, refer to the IBM Job
Control Language documentation applicable to your operating system.
Extract File If you are transferring an Extract File from OS/2, you must allocate a
file that physically matches the characteristics used in creating the
file. Specifically, the DCB parameters should be:
BLKSIZE=7476
LRECL=7476
RECFM=FS
DSORG=PS
Also, when copying the file to the MVS machine, make sure that it is
transferred in Binary (not Text) format and that no carriage returns or
line feeds are inserted in the data. For example, the CRLF option of
some terminal emulators should not be used.
Column Maps allow you to specify the source data for each
destination column. User exits are supported when defining Column
Maps to allow you to set values for columns in the destination table
that could not be established otherwise. Exits can be used to:
• If the exit accesses DB2, the DBRM for that exit program
must be bound into the Relational Tools plan.
Parameters The exit is called for each row in the mapped table. The following
parameters are passed with every call:
Fixed length character fields are filled with spaces on the right.
Avoiding Since the exit may be called frequently, avoid unnecessary overhead.
Overhead For example, the exit should perform initialization processing in the
first call and save information for subsequent calls in the work area.
Also, there may be significant overhead when the PL/I runtime
environment is established. To avoid this, write the exits in
Assembler, SAS/C, or COBOL. (For COBOL, MOVE creates the
runtime environment only once if there are any COBOL II exits.)
Setting When the exit is called, all destination and source columns are
Destination available except those destination columns that are yet to be assigned
Values a value by an exit. To set the value in the destination column, the exit
can examine data in the source row or the data in other columns in the
destination row.
The exit is passed a copy of the destination row. The value for the
destination column supplied by the exit is moved back into the actual
row used by MOVE. Thus, an exit can only set a value in the column
that was specified. The exit must adhere to the following:
• The exit must clear or set the null indicator if the column
allows nulls.
Special Registers The destination columns which use the CURRENT DATE or
CURRENT_DATE, CURRENT TIME or CURRENT_TIME, or
CURRENT TIMESTAMP or CURRENT_TIMESTAMP special
registers are assigned values by DB2. These columns are marked in
the SQLDATA field as:
Return Codes The exit must set one of the following return codes:
Termination Call A termination call is made to the exit after all destination table
processing is completed. The call is identified by a value of 0 in the
destination column identifier field. The exit can use this call to clean up
any dynamically acquired storage.
Sample Exits Sample exits are included with MOVE. They illustrate how to use the
data areas available to the exit and the type of processing that can be
accomplished using an exit. These exits are distributed on the MOVE
installation tape. The source is available on the Installation Library.
PSRTEXTA and PSRTEY2K are available as load modules on the
product load library.
For more details on these sample exits, consult the program source.
• The data in the file must conform to DB2 syntax and rules for
column data types. Additionally, the data must match, by
data type and length, the attributes of the primary key
column(s) in the Start Table.
Example For example, assume you want to extract specific rows from the
DETAILS table using a list created by a method other than Point-and-
Shoot. The primary key for the DETAILS table consists of two
columns, ORDER_ID and ITEM_ID. These columns are defined as:
ORDER_ID DEC(5,0)
ITEM_ID CHAR(5)
Date/Time • All date and time data must be enclosed in single quotes. Any
valid DB2 format for these values is acceptable and will be
handled appropriately.
Numeric Data • Numeric data is not enclosed in quotes. The decimal can be
indicated by either a comma or a period and will be handled
appropriately.
Partial Primary You can use this information to create a Point-and-Shoot file to
Key specify an alternate key or a partial primary key. This is very useful
for selecting non-unique values or values that do not correspond to the
primary key definition. To indicate to MOVE that the data in this file
contains values for some set of the columns, prefix the file with:
COLUMN-LIST
END-COLUMN-LIST
The data for the columns is specified in the order in which the
columns are listed.
Example 1:
Assume you have a set of ITEMS rows that are not in your DB2
database. However, you want to extract the DETAILS rows from
your DB2 database for specific ITEMS. The primary key for the
DETAILS rows is comprised of two columns, ORDER_ID and
ITEM_ID. However, you prefer to extract rows based on only the
ITEM_ID. You can generate a file to be used as the Point-and-Shoot
file to extract the several DETAILS rows for each specified
ITEM_ID value regardless of the ORDER_ID value.
Example 2:
Using the List You can use the generated list for the Extract Process by performing
the following steps:
Option Description
Table Name cid.table Indicate one or more tables in the Extract File that
are to be printed. If you do not specify a value, all
tables are printed. This is the default. If you
specify:
Varchar Delimiter -VCDCnnn Indicate the value of the character to be used as the
varchar delimiter.
Null Field -NFCnnn Indicate the value of the character to be used as the
Indicator null field indicator.
Character
For nnn specify the decimal equivalent for the
character. For example, to define an asterisk as the
null field indicator character, specify -NFC92
where 92 is the decimal representation of the
asterisk.
Numeric Yes 2 2 3
Yes Yes Yes
Column
DATE Yes
Column
TIME Yes
Column
TIMESTAMP Yes
Column
Numeric 3
Yes
Constant
Verification MOVE verifies that corresponding columns are compatible when you
press ENTER on the Define Relationship or Modify Relationship
panel. If they are not, an error message is displayed. You must correct
the incompatibility before saving the relationship definition.
Character to Character columns are compatible with numeric columns when defined in
Numeric Columns a PST relationship. To compare character data to numeric data, it may
be necessary for MOVE to convert the numeric data to character format.
This may involve padding the data prior to the comparison. The data is
padded on the left with zeros so the length of the two strings are equal.
This operation is performed internally and does not affect your DB2 data.
To demonstrate, assume the following columns are defined in a
relationship:
If the data in COL2 is 43, MOVE pads the value with three leading zeros
to form “00043” prior to comparing it with the data in COL1, which is
five characters long. This automatic padding may affect how MOVE
retrieves related rows of data.
Different Length Corresponding CHAR and VARCHAR columns do not require the same
Columns length attribute. However, if the length of one column exceeds the length
of its corresponding column, MOVE truncates trailing blanks in the
longer column to obtain a length equal to the corresponding column. If
the data in the longer column does not have enough trailing blanks to
truncate, that data is not considered related and is not retrieved.
Truncation also occurs when the length of a concatenated expression
exceeds the length of its corresponding column.
Frequently, values that are not valid dates are inserted into date columns
to indicate special handling or conditions. Rather than treat these non-
date values as invalid or as errors, Relational Tools “skips” them. That
is, when a column contains such a value, the column is bypassed. Since
there is no error, processing continues with the next date column. The
user can indicate whether skipped values are noted in the Aging Report
and if rows with skipped dates are written to the output file.
• If the column does not contain only those values, Ager 2000
parses the column based on the specified date format or user exit,
if specified, and then examines the values for each unit of the
format. Based on site-specific definitions, the value may be
skipped. Typical skipped dates include 0000/00/00 and
99992/31. Check with site management for a list of skipped
values.
Date formats specify the format of a date column. These are encoded
internally as a list of possible data types in a single format table. New
formats can be added easily to the table without requiring coding for
each individual format.
The name will actually be qualified by the data type of the column.
This means MOVE supports a date format of MMDDYY as a
character column and also as a decimal column even though these are
processed differently.
CC Two-digit century
YY Two-digit year without century
YYY Three-digit year relative to 1900
YYYY or CCYY Four-digit year
MM Two-digit month
MMM Three-character abbreviation for name of month
(e.g., Jan or JAN).
DD Two-digit day
DDD Three-digit Julian day
DDDDDD Lilian date (number of days since Oct.14, 1582)
/ Slash in date
- Dash in date
* Any delimiter in date
U Unsigned decimal field. It precedes the format.
H.2 Examples
MMDDYY
YYMMDD
DDMMYY
YYDDD
MM*DD*YY
YY*MM*DD
DD*MM*YY
YYDDD
YY*DDD
YYMM
YY*MM
DDMMMCCYY
MMM*DD*CCYY
CCYYMMDD
CCYY*MM*DD
Choose a Definition Option panel ............ 177 NOT_INS, Column Map status..................... 237
Choose an Access Definition...................... 47 NOTUSED, Column Map status................... 235
Migration Menu ...................................... 303 NULL attribute, Point-and-Shoot display........ 92
LOCK command ............................................ 95 NULL Value option...................................... 454
LOCK Command NULL, Column Map status .......................... 236
Sidelabels format..................................... 104 Numeric data, converting ............................. 238
Locking, Sidelabels format ........................... 104
Locking columns ............................................ 95
Locking tables, Delete Process ..................... 384
O
LR line command......................................... 197 Object definitions
Create Process ......................................... 416
M Export Process................................... 276–83
Exporting subordinate objects.................. 277
Main Menu .................................................... 24 Extract Process ........................................ 307
MOVE Only............................................ 487 extracting ................................................ 308
Maintain Relationships panel ................. 193–95 Import Process................................... 283–86
Maintenance Utilities Insert Process ...................................352–353
Batch................................................463–486 Overview................................................... 17
categories ................................................ 463 Sample session .......................................... 33
MAP command, Column Maps..................... 223 Selecting for extract................................. 308
MAP ID Status for Extract Process ........................ 308
Column Map ........................................... 224 Object Definitions
Table Maps ............................................. 257 Create Process ......................................... 390
MAP NAME Dropping, Create Process..................408–412
Column Map ........................................... 224 Extract Process ........................................ 309
Table Maps ............................................. 257 Extract Process Report............................. 331
MAPPED, Column Map status ..................... 235 Option for Extract Process ....................... 311
MAPS command .......................................... 273 Selecting for extract................................. 309
MAX ROWS Command........................... 91–92 OBJECTS, Extract Process option
Maximum Fetch Rows option....................... 455 see also Object definitions ....................... 306
Maximum Fetch Rows options ONLY Command ........................................... 99
COUNT Command.................................... 91 Options
Maximum Rows Editor ...............................................454–458
Limit by Table........................................... 60 Job Card and Print................................... 460
MODEL command, for relationships ...... 215–16 Line Characters ....................................... 452
Modify DATEs and TIMESTAMPs menu ....................................................... 447
Insert Process .......................................... 344 User .................................................448–452
Modifying table names Output
in Access Definition .................................. 68 Create Process ......................................... 415
MORE, scroll indicator .................................. 95 OUTPUT command
MOVE Convert Process Report............................ 435
Naming conventions .................................. 18 Delete Process Report.............................. 389
Overview................................................... 14 from SHOW STEPS display .................... 151
Move for DB2 Relationship Usage Report ...................... 152
Main Menu ............................................... 24 Specify Relationship Usage panel ............ 150
Session overview ....................................... 23 OUTPUT Command..................................... 126
Extract Process Report............................. 331
Insert Process Report ............................... 362
N Output Date Format, Column Maps.............. 244
NAME Output DSN
Access Definition name ............................. 14 Export Process......................................... 277
Access Definition specification .................. 47 File Layout .......................................499–502
Profiled ..................................................... 48 Point-and-Shoot....................................... 135
Naming conventions................................. 17–19 Output file
Creator ID ................................................. 55 Allocating.........................................489–493
DB2 LIKE syntax ...................................... 18 Export Process format.............................. 286
DSN.......................................................... 19 Output Rows with Invalid Dates................... 348
NEW, Relationship status ............................ 142 Output Rows with Skipped Dates ................. 349
NONE, as aging rule .................................... 244 Output SQL, Create Process ..................426–427
GET TABLES RELATED command.... 63–64 columns when defining relationship......... 206
INDENT.................................................... 65 relationships...................................... 196–97
Line commands ......................................... 67 SEQ function ............................................... 251
LIST command .......................................... 61 Session options .............................447, 448, 455
LIST TABLES RELATED command ......... 63 Editor .............................................. 454, 458
Modify table names ................................... 68 Job Card and Print................................... 460
Row Limit ................................................. 60 User ................................................ 448, 452
Scrolling.................................................... 67 Severing a join ............................................. 117
selection list .............................................. 62 Short name, Tn .............................................. 90
Status indicator.......................................... 83 SHOW command
table criteria indicator................................ 57 Column Map status.................................. 239
Table criteria indicators............................. 57 CREATE Object List ............................... 414
Type indicator .......................................... 59 Primary keys selection list ....................... 185
Table name................................................ 58 SHOW SQL command
Selection criteria ...................................... 71–75 saving the output ..................................... 126
Defining .................................................... 80 SHOW STEPS Command
specifying............................................ 72–81 Extract Process ........................................ 321
Selection Criteria example........................................... 150, 151
ALL Command.......................................... 72 overview.................................................... 33
Defining ...................................73–74, 79–81 SHOW STEPS display, OUTPUT command. 151
Extract Process batch override ................. 323 SID line command........................................ 103
Group selection processing ...................... 140 Sidelabels
Group Selection Processing ..................... 138 considerations.......................................... 106
Random factor ........................................... 71 Display column attributes ........................ 107
Row limit .................................................. 71 expanding data ........................................ 105
Valid operators.......................................... 74 Expanding data........................................ 104
SELECTION CRITERIA command Joining during ......................................... 107
Point-and-Shoot......................................... 87 Line commands during ............................ 107
Select Tables/Views panel......................... 69 Max Disp Width option ........................... 456
Selection list Zoom....................................................... 107
Access Definition ...................................... 48 SIDELABELS command .............................. 103
Column Maps.......................................... 226 Sidelabels format
for Table Maps ................................... 269 Point-and-Shoot................................. 89–103
Column Maps from Table Map .........270–271 scrolling .................................................. 103
columns in primary key............................ 187 Single View Mode option............................. 458
Convert Process, Extract File/Control File431 Site and User Options .................................. 447
Column Map Skipped Dates
Copy........................................... 228, 261 DATE and TIMESTAMP ........................ 246
Rename ...................................... 229, 262 identifying ............................................... 509
Copy........................................................ 182 specify handling ...................................... 348
Export Process Object Definitions ........... 280 Sort, using LOADPLUS to ........................... 363
Extract File ............................................. 313 SORT command
Extract Process, Access Definition........... 307 Primary keys selection list ....................... 185
Grant privileges objects ........................... 423 Sort criteria.................................................... 76
indexes, primary keys .............................. 187 Source 2, Table type, Table Map .................. 268
Insert Process, Extract File/Control File... 336 Source name, Table Map...................... 264, 336
Pending Process List................................ 436 Source Types
POPULATE command............................. 272 Specify for Table Maps............................ 263
Primary Keys........................................... 182 Table Map Objects .................................. 265
Relationships, for joining......................... 112 SPC_REG, Column Map status .................... 236
Rename ................................................... 183 Special Registers
Table Colum Maps............................................ 242
browse Control File ............................ 442 Column Map ........................................... 238
browse Extract File ............................. 442 Column Map functions ............................ 251
Column Map specification .................. 233 Column Maps...................................236–238
related .................................................. 63 Specify Relationship Usage Panel..........141–144
Table Maps ............................................. 259 Commands .............................................. 144
Tables when joining ................................ 111 CREATE RELATIONSHIP command...... 144
Selection lists of Specify Selection Criteria panel...................... 73
columns for group selection ..................... 138 Column name ............................................ 74
LIST UNUSED example.......................... 266 UNSELECT command, Export Process ........ 280
MAP ID................................................... 257 UNSELECT RELATED command ................. 94
MAP NAME ........................................... 257 Unselect Related line commands .................... 94
MAPS command...................................... 273 Unzoom
Name, explicit values .............................. 258 Describe Columns/Specify Selection Criteria
Naming conventions .................................. 17 ............................................................. 78
Object Type............................................. 265 Up, scroll direction......................................... 95
Object Types ........................................... 265 Update Process
Overview............................................. 11–16 Insert vs Update................................339–340
POPULATE Command.....................271–272 overview.................................................. 340
Saving ..................................................... 268 Parameters .............................................. 341
SELECT Primary Command .................... 262 USE command ............................................. 148
Selection List .......................................... 259 USER
Source 2 Table Name Field...................... 265 Access Definition name ............................. 14
Specify Source Types............................... 263 Access Definition specification .................. 47
Src 1 CID ................................................ 264 Profiled ..................................................... 48
Src 2 CID ................................................ 264
Validation rules............................... 257, 258
Tables
V
creating relationships........................200–201 VALIDATION command.............................. 238
Name specification .................................... 58 Validation rules
Selecting for Access Definition .................. 54 Column Maps.......................................... 225
Selection List, for joining ........................ 111 Table Maps ............................................. 257
Tables Map, UNKNOWN ............................ 265 View
TABLES, Extract Process Option Creator ID defaults, Create Process...403–404
see also Select Tables/Views ................... 305 Name specification .................................... 58
Tablespace defaults, Create Process ......395–399 Single Mode option ................................. 458
Tablespace defaults, Create Process ............. 392 Type indicator ........................................... 59
Temporary Table, TEMPTABLE.................... 58 View identifier (Vn)....................................... 90
TEMPTABLE, Access Definition status ......... 58 VIEWERR ..................................................... 57
Terminating, Point-and-Shoot....................... 135 Vn, view identifier ......................................... 90
Terminology................................................... 14
TIMESTAMP, Aging DB2 column............... 246
Tn, table identifier ......................................... 90
W
Top, scroll direction ....................................... 95 Warnings, Extract Process.....................320–321
Tutorial.......................................................... 20
Help key.................................................... 20
Y
U YEAR, Insert Process batch override ............ 355
UNJOIN command
Multi-way join..................................123–124 Z
Unjoining tables........................................... 117 Zoom
UNKNOWN Describe Columns/Specify Selection Criteria
batch override ............................................................. 79
Extract Process ................................... 325 joined tables .................................... 115, 116
Insert Process...................................... 359 ZOOM command
Column Map status.................................. 236 Describe Columns ..................................... 79
Extract Process Warnings ........................ 320 Joined tables............................................ 115
Relationship status ...........................142–149 Specify Selection Criteria panel...................... 79
Table Map Table type.............................. 265
Table Map, Type value ............................ 337
UNKNWN, Relationship status .................... 149
UNLOAD PLUS .......................................... 328
UNLOAD PLUS utility
Extract Process .................................313–315
UNLOCK Command...................................... 97
Sidelabels format..................................... 104
UNSEL, Relationship status ......................... 142