Creates a transfer definition and stores it in the transfer database. A transfer definition contains all the information necessary to select a set of records from the source database and to define a target database. A transfer definition also can contain the views to be defined on the target database and the command procedures to be executed before and after the execution of the transfer. A source database for extraction transfers can be Oracle Rdb, or a database accessed through one of the Rdb Transparent Gateways. For replication transfers, the source database must be an Oracle Rdb database. NOTE The DEFINE TRANSFER statement, unlike the SQL CREATE TRANSFER statement, cannot be used to define transfers to existing databases (including replication transfers with the NO DELETE attribute). It also does not provide a checkpoint clause. Furthermore, unlike the SQL CREATE TRANSFER statement, the RDO utility does not support the MIA character set attributes. It is possible to create a transfer definition using RDO and name a database containing MIA features. However, the character set attributes of the resulting target database might not be correct. Use of RDO is recommended only when you want to manipulate databases that use only the DEC_MCS character set for text data.
1 – Format
(B)0[m[4mDEFINE[m [4mTRANSFER[m qq> transfer-name qqwqqq> [4mREPLICATION[m qqqqqqqqqwqqk tqqq> [4mEXTRACTION[m qqqqqqqqqqu x mqqq> [4mEXTRACTION[m [4mROLLUP[m qqqj x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqq<qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj mqqwq>qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqq> [4mTO[m qq> file-spec qk mq> [4mDESCRIPTION[m IS q> /* text */ qj x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq<qqqqqqqqqqqqqqqqqqqqqqqqqqqqj mqwq>qqqqqqqqqqqqqqqqqqqqqqqwqwqwq>qqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqwqk mq>target-db-param-clauseqj x tq>move-relations-clause qqqqqqqu x x x tq>move-views-clause qqqqqqqqqqqu x x x mq>move-relations-rollup-clauseqj x x mqqqqqqqqqqqqq<qqqqqqqqqqqqqqqqqqqqqj x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq<qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj mqqwqqqqqqqqqq>qqqqqqqqqqqqqqqqqqqqqqqqqwqqqqqqqqqqqqqqqqqqqqqqqqqqk mqqq> transfer-file-options-clause qqj x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq<qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj mqq> [4mEND[m qqqwqqqqqqqqq>qqqqqqqqqwqqwqqqqqqq>qqqqqqwqqqqqqq> . mq> transfer-name qqj mq> [4mTRANSFER[m qqj
1.1 – transfer-name
Identifies the transfer by name. The transfer name must be unique across all of the nodes at a given VAXcluster or VMScluster site because a single transfer database serves all nodes in a cluster environment. For example, you could have two users on the same server attempting to create a transfer called PERS_REC. One user would succeed while the other would receive an error message saying that the transfer already exists. To ensure that names are unique, you may wish to make the user identifier part of each transfer name. A valid transfer name has the following characteristics: o Has a length from 1 to 31 bytes (octets). o Can be formed using any of the set of ASCII characters: A B C ... Z 0 1 2 ... 9 _ $ a b c ... z Lower case letters may be used, but are treated as if they were uppercase. o Cannot include letters with diacritical marks (which are used in European languages for instance). o The first character of the name must either be a letter or the dollar sign ($). However, Oracle Corporation recommends that you do not use dollar signs in a transfer name; dollar signs are reserved for special use by Digital Equipment Corporation. The transfer-name parameter is required.
1.2 – REPLICATION
Specifies that Replication Option create a replication database at the target site. When a replication transfer executes, Replication Option creates a database at the target site during the initial execution and maintains a connection to that target database so the source can supply updates to the target. Subsequent transfers involve only those modifications that have been made to the selected records in the source database. (If the target and source database should become inconsistent with each other, you can use the REINITIALIZE TRANSFER statement to restore consistency.) In addition, the execution of a replication transfer generally creates special-purpose relations in the source database and the target database to handle updating. Because the source database is modified with the addition of these system relations, the transfer definer's account needs the DEFINE access right to the source database itself. Users are expected to access the replication target database only to retrieve data. Applications should not attempt to store, modify, or erase values in records of the replication database. Although data values should not be manipulated in a replication database, you can modify the target database by defining views and indexes, and adding access rights.
1.3 – EXTRACTION
Specifies that Replication Option create an extraction database at the target site. Because each extraction database is independent of the source database, users at the target directory can access extraction databases with read/write as well as read-only transactions. Each time an extraction mode transfer executes, Replication Option creates a new version of the target database and transfers a complete copy of the selected records to the target node. Indexes, constraints, and access rights are not transferred when the target database is created. Similarly, primary key and foreign key attributes for a particular relation are not transferred because key attributes are implemented as constraints. Once the target database has been created, you can define indexes, constraints, and triggers for it and modify the access rights.
1.4 – EXTRACTION_ROLLUP
Specifies that Replication Option create an extraction rollup database at the target site by transferring selected relations and fields from one or more source databases into a single target database. An extraction rollup database is created at the target site, and Replication Option reads data from the source databases and stores the data in a target database. Each time an extraction rollup transfer is executed, Replication Option creates a new version of the target database and transfers to it a complete copy of the selected records. The EXTRACTION ROLLUP option in the DEFINE TRANSFER statement has the following characteristics and limitations: o Replication Option issues an error message if you do not enter a MOVE RELATION clause or a SELECT FIELDS list in a move-relations-rollup-clause. o You must refer to each source database in the DEFINE TRANSFER statement by its database handle. o On the target database, relation names and field names must be unique. Consequently, all target relations of the same name must have the same definition, and all target fields of the same name must have the same data type. If the definitions or data types differ, Replication Option issues an error message and the transfer fails. o If any database specified in the transfer definition is on a node that is not available, Replication Option places the transfer in a waiting-to-retry state. Replication Option will retry the transfer at the time specified for retry in the schedule definition. o If any of the source nodes specified in the transfer definition fail during the transfer, the transfer will also fail. Replication Option will retry the transfer at the time specified for retry in the schedule definition. o If the transfer fails, the retry will start at the beginning, not where the transfer left off. Indexes, constraints, and access rights are not transferred when the target database is created. Similarly, primary key and foreign key attributes for a particular relation are not transferred because key attributes are implemented as constraints. Once the target database has been created, you can define indexes, constraints, and triggers for it and modify the access rights.
1.5 – text
A text string that allows you to associate a comment with the transfer definition. The text string, together with other parts of the transfer definition, appears in the SHOW TRANSFER DEFINITION display. The DESCRIPTION IS clause is optional.
1.6 – file-spec
Designates a file specification for the target database, which is an Oracle Rdb database. Replication Option uses the file specification to create and access the target database. You can use either a full or partial file specification or a logical name. The file-spec parameter is required. If you do not specify the node, device, or directory, Replication Option assumes the SYS$LOGIN of the user defining the transfer. If the file type is not .RDB, the transfer will fail during the creation of the target database. The default file type is .RDB. When you specify the name of a remote node as part of the file specification, you can include an access control list (ACL) for login. However, the most effective method of allowing access to a target node uses proxy accounts. If you use DECnet/OSI note that Replication Option expects node names in file specifications to be from one to six characters long. DECnet/OSI permits node names to be much longer than this. In order to use Replication Option in a DECnet/OSI environment, you must define and use short synonyms for the long node names. Node name synonyms can be registered either in a local or distributed name service database. For details on establishing node name synonyms, refer to the documentation for DECnet/OSI. Note that the file specification is resolved at run time. All logical names used for the file-spec parameter are resolved within the copy process after it executes the transfer definer's login initialization file, LOGIN.COM. If the target database name is a logical symbol name, when it is translated, the default directory is the one pointed to by SYS$LOGIN. Replication Option makes no attempt to verify whether a database or file of the same name already exists in the target directory. When you issue a duplicate file specification, Replication Option creates a second file with the same name, but a higher version number. If the database system (Oracle Rdb) returns an error while attempting to create a database in the target directory, the copy process writes the error in the copy process log file and returns the error status to the transfer monitor.
1.7 – target-db-param-clause
(B)0[mtarget-db-param-clause = qqqwqwq>qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqwqq> x tq> [4mALLOCATION[m IS qqqqqqqq> number-pages qq> PAGES qqqqu x x tq> [4mPAGE[m [4mSIZE[m IS qqq> page-blocks qqqqqq> BLOCKS qqqqqqu x x tq> [4mNUMBER[m OF [4mBUFFERS[m IS qq> number-buffers qqqqqqqqqqqu x x tq> [4mNUMBER[m OF [4mUSERS[m IS qqqq> number-users qqqqqqqqqqqqqu x x tq> [4mBUFFER[m [4mSIZE[m IS qq> buffer-blocks qqq> BLOCKS qqqqqqu x x tq> [4mEXTENT[m IS qqqqqqqqqqwq> ext-pages qqq> PAGES qqqwqqu x x x mq> (multi-vol-ext-clause) qj x x x tq> [4mSNAPSHOT[m IS qqqqwq> [4mENABLED[m qwq> [4mIMMEDIATE[m qqwqwqqqu x x x x mq> [4mDEFERRED[m qqj x x x x x mq> [4mDISABLED[m qqqqqq>qqqqqqqqqqqj x x x tq> [4mSNAPSHOT[m [4mALLOCATION[m IS q> snp-pages q> PAGES qqqqqqu x x mq> [4mSNAPSHOT[m [4mEXTENT[m IS qw> ext-pages qqqq> PAGES qqqqwqj x x m> (multi-vol-ext-clause) qqqj x mqqqqqqqqqqqqqqqqqq<qqqqqqqqqqqqqqqqqqqqqqqqqq<qqqqqqqqqqqqj Enables you to specify values for the parameters that affect the creation of the target database. This clause uses syntax similar to the Oracle Rdb DEFINE DATABASE statement. However, Replication Option does not support all the parameters that DEFINE DATABASE supports. Replication Option uses the values provided in this clause to create the target database.
1.7.1 – number-pages
The number of database pages initially allocated to the target database. Oracle Rdb automatically extends the allocation to handle the loading of data and subsequent expansion. The default is 400 pages. If you are transferring a large number of records, a large page allocation helps to prevent fragmented records.
1.7.2 – page-blocks
The size in blocks of each database page in the target directory. Page size is allocated in 512-byte blocks. The default is two blocks (1024 bytes). If your largest record has more than approximately 950 bytes, you can specify more blocks for each page to prevent records from being fragmented.
1.7.3 – number-buffers
The number of buffers Oracle Rdb allocates for each process using the target database. The value must be greater than zero. The default is 20 buffers.
1.7.4 – number-users
The maximum number of users allowed to access the target database at one time. The default is 50 users. After the maximum is reached, the next user who tries to invoke the database receives an error message and must wait for access. The largest number of users you can specify is 508, and the smallest is 1.
1.7.5 – buffer-blocks
The number of blocks Oracle Rdb allocates for each buffer. The value must be greater than zero. If you do not specify this parameter, Oracle Rdb uses a buffer size that is three times the page size value.
1.7.6 – ext-pages
The number of pages of each target database extent. This parameter provides direct control over the extent of the target database. For greater control, and particularly for multivolume databases, use the MINIMUM, MAXIMUM, and PERCENT GROWTH parameters of the multi-vol-ext-clause instead. The default extent is 100 pages.
1.7.7 – ENABLED_IMMEDIATE
Specifies that READ_WRITE transactions write previously updated copies of records they modify to the snapshot file, regardless of whether a read-only transaction is active. Snapshot writing is enabled immediately by default. With snapshots enabled, users or applications can read from either the snapshot file or the database file itself.
1.7.8 – ENABLED_DEFERRED
Specifies that READ_WRITE transactions not write previously updated copies of records they modify to the snapshot file unless a READ_ONLY transaction is already active. READ_ONLY transactions that attempt to start after an active READ_WRITE transaction must wait for all active READ_WRITE users to complete their transactions. With snapshots enabled, users or applications can read from either the snapshot file or the database file itself.
1.7.9 – DISABLED
Specifies that snapshot writing be disabled. There is usually some performance gain when snapshot writing is disabled because Oracle Rdb does not need to perform write operations to the snapshot file during updates to the database. You should not disable snapshots for replication databases. Although users are expected only to retrieve data from the replication database, retrieval can occur in either READ_ONLY or READ_WRITE transactions.
1.7.10 – snp-pages
The number of pages allocated for the snapshot file. The default is 100 pages. After the target database has been created, you can use the RDO CHANGE DATABASE statement to truncate the snapshot file. To truncate the file, specify an allocation size smaller than the current snapshot file size.
1.7.11 – multi-vol-ext-clause
(B)0[mmulti-vol-ext-clause = qqqqq> [4mMINIMUM[m OF qq> min-pages qqq> PAGES, qk lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj mqq> [4mMAXIMUM[m OF qq> max-pages qqq> PAGES, qk lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj mqq> [4mPERCENT[m [4mGROWTH[m IS qqq> growth qqqq>
1.7.11.1 – min-pages
The minimum number of pages of each target database extent. The default is 100 pages.
1.7.11.2 – max-pages
The maximum number of pages of each target database extent. The default is 10,000 pages.
1.7.11.3 – growth
The percent of growth for each target database extent. The default is 20 percent growth.
1.8 – move_relations_clause
(B)0[mmove-relations-clause = qwqq> [4mMOVE[m [4mRELATIONS[m [4mALL[m qqqqqqqqqqqqqqqqqqqqqqq>qqqqqqqqqqqwqqqq> x x mqwqq> [4mMOVE[m [4mRELATION[m qqwqqqqqqqqqqqqqqqwqq> rse qqqqqqk x x mq> /* text */ qj x x x lqqqqqqqqqqqqqqqqqqqqqqqq<qqqqqqqqqqqqqqqqqqqj x x mq> [4mSELECT[m [4mFIELDS[m qwqq> [4mALL[m qqqqqqqq>qqqqqqqwqqwqqj x mwq> select-field-name qwj x x mqqqqqqqq , <qqqqqqqqqqj x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq ; <qqqqqqqqqqqqqqqqqqqj Selects the records Replication Option transfers to the target database during an extraction or a replication transfer. The records selected for replications are specified with a restricted form of a record selection expression (RSE). You must specify a move-relations-clause for each user relation moved to the target database. If you do not include a move-relations-clause, Replication Option assumes the default, MOVE RELATIONS ALL. When you specify a view in a MOVE RELATION clause, the records selected by that view are created as a relation in the target database. You can also transfer views using the move-views- clause. You must have READ privilege for the relations of an Oracle Rdb source database that you specify in a MOVE RELATION clause or a MOVE RELATIONS ALL clause. For databases accessed through the Rdb Transparent Gateways, Replication Option does not check for READ privilege for views.
1.8.1 – MOVE_RELATIONS_ALL
Allows you to have Replication Option select all records and fields from all user relations, excluding views, that are in the source database at the time the transfer is defined. If you wish to move views, you must use the move-views-clause or the MOVE RELATION clause. Fields defined with a COMPUTED_BY clause are restricted to those that use the value expressions shown in the value-expr syntax diagram in this section. If a field is not defined by a supported value expression, you will receive a warning message, and the COMPUTED_BY fields will not be transferred. If you define a transfer on a source database that is itself a target extraction database, do not use the MOVE RELATIONS ALL clause. An error will result during transfer execution because Replication Option will attempt to define the DDAL$VINTAGE relation in the new target database twice. The second transfer would create a DDAL$VINTAGE relation in the target database. Then, using the MOVE RELATIONS ALL clause, it would attempt to copy the DDAL$VINTAGE relation that already exists in the source database. To avoid this error, specify explicitly each relation to be moved instead of using MOVE RELATIONS ALL. Do not use the MOVE RELATIONS ALL statement for an extraction rollup transfer. If you use the MOVE RELATIONS ALL statement to define an extraction rollup transfer, the transfer will fail on execution. Instead, you must name the individual relations you want to transfer to the extraction rollup target.
1.8.2 – text
A text string that allows you to associate a comment with the transfer definition. The text string, together with other parts of the transfer definition, appears in the SHOW DEFINITION display. The DESCRIPTION IS clause is optional.
1.8.3 – rse
The record selection expression (RSE) used to identify records from the source database that Replication Option includes in a record stream and transfers to the target database. The RSE specifies conditions that individual records must satisfy in order to be included in the transfer to the target database. Replication Option supports COMPUTED_BY fields named in an RSE if the fields are defined using the value expressions shown in the value-expr syntax diagram in this section. If the fields are not defined by a supported value expression, you will receive a fatal error message. In extraction, extraction rollup, and replication transfers, you can use a relation-clause and with-clause. In extraction and extraction rollup transfers, you can also use a first-clause, reduce-clause, and sort-clause.
1.8.4 – SELECT_FIELDS_ALL
Enables you to include every field in a specific relation. Fields defined with a COMPUTED_BY clause are restricted to those that use the value expressions shown in the value-expr syntax diagram in this section. If a field is not defined by a supported value expression, you will receive a warning message, and the COMPUTED_ BY fields will not be transferred. You cannot use the SELECT FIELDS ALL statement for an extraction rollup transfer.
1.8.5 – select-field-name
(B)0[mselect-field-name = qqqqqqqq> context-variable qq> . qqq> field-name qqqqq> Allows you to name a specific field or group of fields you want moved to the target database. You can specify only one SELECT clause for each MOVE clause. Replication Option moves only the named fields to the target database. If you do not specify SELECT FIELDS ALL, the select-field-name clause is required. Replication Option supports COMPUTED_BY fields named in the select-field-name clause if the fields are defined using the value expressions shown in the value-expr syntax diagram in this section. If the fields are not defined by a supported value expression, you will receive a fatal error message.
1.9 – move-views-clause
(B)0[mmove-views-clause = qqqq> [4mMOVE[m [4mVIEWS[m qqwqq> [4mALL[m qqqqqqqqqqqwqqq> mwq> view-name qqwqqj mqqqqqq , <qqqqqqj Selects the views Replication Option defines on the target database during an extraction or a replication transfer. All the relations, views, and fields on which the transferred views are based must also be explicitly or implicitly named in the DEFINE TRANSFER statement. The transfer definition will fail if any underlying relation, view, or field is not named when you define the transfer. Note that, if you omit the move-relations-clause, relations are implicitly named in the transfer definition because MOVE RELATIONS ALL is the default. If you specify a view name in this clause, the view definition is transferred to the target database. You can include only one move-views-clause in a DEFINE TRANSFER statement. However, you can specify two or more views in that move-views-clause. Transferring views is limited by the following restrictions: o COMPUTED_BY fields Replication Option transfers those COMPUTED_BY fields that depend only on the values of the relation in which the field is defined. Views that contain unsupported COMPUTED_BY fields cannot be transferred. If views that contain unsupported COMPUTED_BY fields are specified in the move-views-clause of a DEFINE TRANSFER statement, the transfer definition fails. You need to redefine the transfer, excluding the views that refer to the unsupported COMPUTED_BY fields. o READ privilege for the view For a view in an Oracle Rdb database to be transferred, Replication Option requires that you have Oracle Rdb READ privilege for the view and for the underlying relations. If you do not have READ privilege for views you specify in the move-views-clause of a DEFINE TRANSFER statement, the transfer will fail. You need to obtain READ privilege for these views before including them in a DEFINE TRANSFER statement. For databases accessed through the Rdb Transparent Gateways, Replication Option does not check for READ privilege for views. You can also move views with the move-relations-clause. However, when you use the move-relations-clause to move a view, the view becomes a relation in the target database.
1.9.1 – view-name
The name of the view Replication Option transfers to the target during a transfer. If you do not specify a view name, Replication Option assumes the default, MOVE VIEWS ALL.
1.10 – move-relations-rollup-clause
(B)0[mmove-relations-rollup-clause = qwq> [4mMOVE[m [4mRELATION[m qqqqwqqqqqqqq>qqqqqqqqwq> rse qqqqwqqqqwq> x mq> / *text*/qqqqqj x x x lqqqqqqqqqqqqqqqqqqqqqqqqq<qqqqqqqqqqqqqqqqqqqqj x x mqqwqqqqqqqqqqqqqqqqqqqqqq>qqqqqqqqqqqqqqqqqqqwqk x x mq> [4mINTO[m [4mRELATION[m qqqq> relation-name qqqqqj x x x lqqqqqqqqqqqqqqqqqqqqqqqqq<qqqqqqqqqqqqqqqqqqqqqj x x mq> [4mSELECT[m [4mFIELDS[m qqwqq> select-field-name qqqqqwqwqj x mqqqqqqqqqq , <qqqqqqqqqqqqqj x mqqqqqqqqqqqqqqqqqqqqqqqqqqq ; <qqqqqqqqqqqqqqqqqqqqqqqj Selects the records Replication Option transfers into the target database from a number of source databases during an extraction rollup transfer. The move-relations-rollup-clause has the following restrictions: o Replication Option requires you to invoke each source database with a different database handle. You must then use these handles in the move-relations-rollup-clause to identify tables of each source database. o The move-relations-rollup-clause must be used with the EXTRACTION ROLLUP parameter. Rollup transfers must be extractions. If you attempt to use the move-relations-rollup-clause with a replication transfer, the transfer definition will fail. o The MOVE RELATIONS ALL and SELECT FIELDS ALL clauses are not allowed in rollup transfers.
1.10.1 – rse
For more information on record selection expression, select the subtopic RSE under the DEFINE_TRANSFER Format subtopic.
1.10.2 – select-field-name
(B)0[mselect-field-name = qqqqqqqq> context-variable qq> . qqq> field-name qqqqq> Allows you to name a specific field or group of fields you want moved to the target database. You can specify only one SELECT clause for each MOVE clause. Replication Option moves only the named fields to the target database. If you do not specify SELECT FIELDS ALL, the select-field-name clause is required. All fields that you name in the record selection expression (RSE) must also be named in the SELECT FIELDS clause. Replication Option supports COMPUTED_BY fields named in the select-field-name clause if the fields are defined using the value expressions shown in the value-expr syntax diagram in this section. If the fields are not defined by a supported value expression, you will receive a fatal error message.
1.11 – transfer-file-options-clause
(B)0[mtransfer-file-options-clause qwqwqqqqqqqqqqqqqqqqqqqqqqqqq>qqqqqqqqqqqqqqqqqqqqqqqqqqqwqqqqqqq> x tqq> [4mPROLOGUE[m FILE IS qqqq> prologue-file-spec qqqqqqqu x tqq> [4mNOPROLOGUE[m qqqqqqqqqq>qqqqqqqqqqqqqqqqqqqqqqqqqqqu x tqq> [4mEPILOGUE[m FILE IS qqqq> epilogue-file-spec qqqqqqqu x tqq> [4mNOEPILOGUE[m qqqqqqqqqq>qqqqqqqqqqqqqqqqqqqqqqqqqqqu x tqq> [4mLOG[m FILE [4mIS[m qqqqqqqqq> log-file-spec qqqqqqqqqqqqu x mqq> [4mNOLOG[m qqqqqqqqqqqqqqq>qqqqqqqqqqqqqqqqqqqqqqqqqqqu mqqqqqqqqqqqqqqqqqqqqqqqqqqq<qqqqqqqqqqqqqqqqqqqqqqqqqqqj The DCL command procedures to be executed before or after transfers and the OpenVMS file where logging information related to the transfer execution is located.
1.11.1 – prologue-file-spec
The name of the prologue command procedure file to be run before the transfer executes. This file runs at the beginning of the first execution of the transfer and of all subsequent transfers. The prologue file is a DCL command file. You can include a version number and a remote node name in the file specification. The name is resolved when the transfer is defined. The prologue-file-spec parameter is optional. If you do not include this parameter, Replication Option assumes that NOPROLOGUE is in effect. The default file type is .COM. The default directory for the prologue file is SYS$LOGIN. If your file specification includes a node name and you are using DECnet/OSI, note that Replication Option expects node names in file specifications to be from one to six characters long. DECnet/OSI permits node names to be much longer than this. In order to use Replication Option in a DECnet/OSI environment, you must define and use short synonyms for the long node names. Node name synonyms can be registered either in a local or distributed name service database. For details on establishing node name synonyms, refer to the documentation for DECnet/OSI.
1.11.2 – epilogue-file-spec
The name of the epilogue command procedure file to be run after the transfer executes. This file runs after the first execution of the transfer and after all subsequent transfers. The epilogue file is a DCL command file. You can include a version number or a remote node name in the file specification. The name is resolved when the transfer is defined. The epilogue-file-spec parameter is optional. If you do not include this parameter, Replication Option assumes that NOEPILOGUE is in effect. The default file type is .COM. The default directory for the epilogue file is SYS$LOGIN. If your file specification includes a node name and you are using DECnet/OSI, note that Replication Option expects node names in file specifications to be from one to six characters long. DECnet/OSI permits node names to be much longer than this. In order to use Replication Option in a DECnet/OSI environment, you must define and use short synonyms for the long node names. Node name synonyms can be registered either in a local or distributed name service database. For details on establishing node name synonyms, refer to the documentation for DECnet/OSI.
1.11.3 – log-file-spec
The OpenVMS file where the Replication Option copy process writes any logging information related to the execution of the transfer. If you include a version number or a node name in the file specification, Replication Option returns an error. Replication Option creates a new log file every time a transfer executes. The name is resolved when the transfer is defined. The log-file-spec parameter is optional. If you do not include this parameter, Replication Option assumes that NOLOG is in effect. The default file type is .LOG. The default directory for the log file is SYS$LOGIN.
1.12 – RSE
(B)0[mrse = qqwqqqqqqqq>qqqqqqqqwqq> relation-clause qq>qqqqqqqqqqqqqqqqqqqqk mq> first-clause qj x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj mwqqqqqqq>qqqqqqqqwqwqqqqqqqq>qqqqqqqqqqwqqwqqqqqqqq>qqqqqqqqwqqq> mq> with-clause qj mq> reduce-clause qqj mq> sort-clause qqj The record selection expression (RSE) used to identify records from the source database that Replication Option includes in a record stream and transfers to the target database. The RSE specifies conditions that individual records must satisfy in order to be included in the transfer to the target database. Replication Option supports COMPUTED_BY fields named in an RSE if the fields are defined using the value expressions shown in the value-expr syntax diagram in this section. If the fields are not defined by a supported value expression, you will receive a fatal error message. In extraction, extraction rollup, and replication transfers, you can use a relation-clause and with-clause. In extraction and extraction rollup transfers, you can also use a first-clause, reduce-clause, and sort-clause.
1.12.1 – first-clause
(B)0[mfirst-clause = qqqq> [4mFIRST[m qqqqqq> value-expr qqqqqqqqqqq> (B)0[mvalue-expr = qqqqqqqwqqqq> database-field qqqqqqwqq> tqqqq> quoted-string qqqqqqqu tqqqq> numeric-literal qqqqqu tqqqq> arithmetic-expr qqqqqu tqqqq> missing-value qqqqqqqu tqqqq> concat-expr qqqqqqqqqu tqqqq> ( value-expr ) qqqqqqu mqqqq> q qq> value-expr qqqj Specifies how many records are selected from the record stream formed by the record selection expression (RSE). You can only use the first-clause for an extraction or an extraction rollup transfer. If you specify a first-clause for a replication transfer, Replication Option issues an error message.
1.12.2 – relation-clause
(B)0[mrelation-clause = q> context-variable q> [4mIN[m wqqqqqqqq>qqqqqqqqwq> relation-name q> m> db-handle q> . j The context variables and relations to be included in the record stream or loop. If you specify a view name in the relation-clause, the moved view becomes a relation in the target database. The context-variable supplies a temporary name to identify the record stream. Once you have associated a context-variable with a relation, you use the context-variable to refer to fields from that relation. The db-handle is a host variable or name used to refer to a specific database you have invoked. In extraction or replication transfers, you should not use database handles in the RSE of a MOVE RELATION clause. Replication Option returns an error message if you include a database handle in the RSE. However, in an extraction rollup transfer, you must use database handles in the RSE to specify the relation or Replication Option will return an error message.
1.12.3 – with-clause
(B)0[mwith-clause = qqqqqqqqqqqqq> [4mWITH[m qqqqqqqqqq> conditional-expr qqqqqqqqqqq> (B)0[mconditional-expr = qwqqq> conditional-expr qq> [4mAND[m qq> conditional-expr qqqwqqq> tqqq> conditional-expr qq> [4mOR[m qqq> conditional-expr qqqu tqqqqqqqqqqqqqqqqqqqqqqqq> [4mNOT[m qq> conditional-expr qqqu tqqq> value-expr1 qq> rel-oper qq> value-expr2 qqqqqqqqu tqqq> between-clause qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu tqqq> containing-clause qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu tqqq> matching-clause qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu tqqq> starting-with-clause qqqqqqqqqqqqqqqqqqqqqqqqqqqqu mqqq> missing-clause qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj The with-clause contains a conditional expression that allows you to specify conditions that must be true for a record to be included in a record stream.
1.12.4 – reduce-clause
(B)0[mreduce-clause = qqqqqqqqqqqqqq> [4mREDUCED[m [4mTO[m qqqwqqqqq> value-expr qqqwqqqqq> mqqqqqqqq , <qqqqqqqqqj (B)0[mvalue-expr = qqqqqqqwqqqq> database-field qqqqqqwqq> tqqqq> quoted-string qqqqqqqu tqqqq> numeric-literal qqqqqu tqqqq> arithmetic-expr qqqqqu tqqqq> missing-value qqqqqqqu tqqqq> concat-expr qqqqqqqqqu tqqqq> ( value-expr ) qqqqqqu mqqqq> q qq> value-expr qqqj Allows you to eliminate duplicate values for fields in a record stream. You can use the reduce-clause for an extraction or an extraction rollup transfer. If you specify a reduce-clause for a replication transfer, Replication Option issues an error message.
1.12.5 – sort-clause
(B)0[msort-clause = qqq> [4mSORTED[m [4mBY[m qqwqwqqqqqqqqqqqqqqqqqqwqqqqq> value-expr qqwqqq> x tqq> [4mASCENDING[m qqqqu x x mqq> [4mDESCENDING[m qqqj x mqqqqqqqqqqqqqqqqqqqqqq , <qqqqqqqqqqqqqqqj (B)0[mvalue-expr = qqqqqqqwqqqq> database-field qqqqqqwqq> tqqqq> quoted-string qqqqqqqu tqqqq> numeric-literal qqqqqu tqqqq> arithmetic-expr qqqqqu tqqqq> missing-value qqqqqqqu tqqqq> concat-expr qqqqqqqqqu tqqqq> ( value-expr ) qqqqqqu mqqqq> q qq> value-expr qqqj Allows you to sort the records in the record stream by the values of specific fields. You can sort the records according to a value expression called a sort key. The sort key determines the order of the records in the record stream. You can use the sort- clause for an extraction or an extraction rollup transfer. If you specify a sort-clause for a replication transfer, Replication Option issues an error message. Specifying ASCENDING (the default) causes the records to be sorted in ascending order. Specifying DESCENDING causes Oracle Rdb to sort the records in descending order. The value expression specifies the sort value. This value is called the sort key.
2 – More
After you issue the DEFINE TRANSFER statement, the transfer does not execute until one of the following events occurs: - The time specified in the corresponding DEFINE SCHEDULE statement arrives - You issue a START TRANSFER NOW statement You cannot alter a transfer using RDO. You must either drop the transfer and re-create it, or use the SQL ALTER TRANSFER statement. You must have READ privilege for the relations and views of a Oracle Rdb source database that you specify in a DEFINE TRANSFER statement. Replication Option returns an error message when you specify relations and views in a DEFINE TRANSFER statement for which you do not have READ privilege. Replication Option does not check for READ privilege for relations and views when you specify a database accessed through the Rdb Transparent Gateways. You must execute the DEFINE TRANSFER statement outside of the scope of a transaction. If you issue this statement when a transaction is outstanding, Replication Option returns an error message. You can refer to relations, fields, and views in a DEFINE TRANSFER statement either implicitly or explicitly. When you include either the MOVE RELATIONS ALL, SELECT FIELDS ALL, or MOVE VIEWS ALL clause, you refer to relations, fields, or views implicitly. Replication Option uses the current definitions of the relations, fields, and views in the source database and stores those names explicitly in the transfer definition. You refer to relations, fields, and views explicitly when you include the MOVE RELATION, SELECT FIELDS, or MOVE VIEWS clauses and supply specific relation, field, or view names. All fields that you name in the record selection expression (RSE) of the DEFINE TRANSFER statement must also be included in the SELECT FIELDS clause. If you do not name the fields explicitly in the SELECT FIELDS select-field-name statement or implicitly in the select-field-name clause, Replication Option returns an error message when the transfer executes, indicating that the field name is not found in the symbol table. Replication Option transfers those COMPUTED_BY fields that depend only on the values of a relation in which the field is defined. You cannot transfer views that contain unsupported COMPUTED_BY fields. If views that contain unsupported COMPUTED_ BY fields are specified in the move-views-clause of a DEFINE TRANSFER statement, the transfer definition fails. You need to redefine the transfer, excluding the views that refer to the unsupported COMPUTED_BY fields. Replication Option allows you to transfer views in two ways: o Using the move-views-clause Replication Option transfers the definition of the view when you specify MOVE VIEWS view-name or MOVE VIEWS ALL. You must also explicitly or implicitly name in the DEFINE TRANSFER statement all the relations, views, or fields on which the transferred view definitions are based. The transfer will fail if any underlying relations, views, or fields are not named. o Using the move-relations-clause Replication Option transfers a view by creating a relation in the target database containing the view's records when you use the MOVE RELATION clause. This method improves query performance in the target database. For example, you can achieve the effect of a CROSS clause by transferring a view that is a CROSS in the source. You specify the relations you wish to move in the move-relations- clause and the views in the move-views-clause of the DEFINE TRANSFER statement. When you are doing an extraction rollup transfer, you specify the relations you wish to move in the move-relations-rollup-clause of the DEFINE TRANSFER statement. The same clause can occur in a DEFINE TRANSFER statement no more than once. You cannot specify the same relation or view more than once in the move clauses. If a relation name or view name appears in more than one move clause, Replication Option returns an error. Individual move-relations clauses are separated by semicolons, as indicated in the syntax diagrams. You can implement the move- relations-clause in two ways: o Specify MOVE RELATIONS ALL o Specify a series of relations separated by semicolons The move-relations-clause has the following characteristics and limitations: o All fields in each move-relations-clause must reside in the same relation. o You cannot name the same relation in more than one MOVE clause of a single transfer definition. The move-relations-rollup-clause has the following characteristics and limitations: o All fields in each move-relations-rollup-clause must reside in the same relation. o You cannot name the same relation in more than one MOVE clause of a single transfer definition. o For each relation of a move-relations-rollup-clause that you enter, you can supply a target relation specification in the form of an INTO RELATION clause. You can create one or many relations in the target database from several source database relations by renaming the target relations in the transfer definition. o You cannot specify MOVE RELATIONS ALL or SELECT FIELDS ALL in a move-relations-rollup-clause. When you specify these clauses in the DEFINE TRANSFER statement, the transfer will fail at the time of definition. The format of record selection expressions (RSE) that you can include in a transfer definition for extraction and extraction rollup transfers is more limited than the RSE allowed by RDO. You cannot include the following expressions and clauses in the RSE of the MOVE clause of the DEFINE TRANSFER statement: o CROSS clause o ANY operator o UNIQUE operator o Host variable o Statistical expressions o FIRST FROM expression o Database key values o Segmented string expressions You can specify FIRST clauses, REDUCED clauses, and SORTED BY clauses in the RSE of both extraction and extraction rollup transfers. You can achieve the effect of a CROSS clause in an extraction or an extraction rollup transfer by transferring a relation, that is itself a view, defined in the source database as a cross of two or more relations. The next example shows an extraction transfer definition that specifies the FIRST, REDUCED, and SORTED BY clauses in the RSE. The transfer also achieves the capability of a CROSS clause by moving a view, CURRENT_SALARY. In the source database, CURRENT_ SALARY is a cross of the EMPLOYEES, SALARY_HISTORY, and JOB_ HISTORY relations. RDO> INVOKE DATABASE FILENAME PERSONNEL RDO> DEFINE TRANSFER SALARY_HISTORY EXTRACTION cont> TO NEWNODE::NEWDISK:[NEWDIR]EMP_SALARY cont> MOVE RELATION FIRST 1000 E IN EMPLOYEES cont> REDUCED TO E.LAST_NAME cont> SORTED BY ASCENDING E.LAST_NAME cont> SELECT FIELDS ALL; cont> MOVE RELATION C IN CURRENT_SALARY SELECT FIELDS ALL cont> LOG IS FIRSTDISK:[FIRSTDIR]EMP_SALARY.LOG cont> END. Because you cannot use certain expressions to identify required records, the resulting groups of records transferred to the extraction database might be larger than the number of extracted records users will actually use. However, local users on the target node can then include precise RSEs accessing the extraction database. The format of an RSE that you can include in the transfer definition for replication transfers is more limited than the RSE allowed by RDO. You cannot include the following forms of expressions or clauses in the RSE of the MOVE clause of the DEFINE TRANSFER statement: o FIRST clause o CROSS clause o REDUCED clause o SORTED BY clause o ANY operator o UNIQUE operator o Host variable o Statistical expressions o FIRST FROM expression o Database key values o Segmented string expression Because you cannot use certain expressions to identify required records, the resulting groups of records transferred to the replication database might be larger than the number of records users will actually use. However, local users on the target node can then include precise record selection expressions when using RDO to access the replication database. If a transfer fails during execution, the transfer will begin again at the next scheduled retry time if the failure results from a nonfatal error. This next transfer will start from the beginning to ensure consistency with any updates that might have been made to the source database. Replication Option transfers only definitions for the database, fields, and relations specified in the transfer definition. If the source database includes additional database entities such as indexes, constraints, or access control lists, these are not transferred to the target database. You must either directly access the individual target database and explicitly define these entities or run command procedures to define the entities after the transfer executes. When relations specified in the transfer definition are created in the target database, they are given the access control lists (ACLs) that have the Oracle Rdb default values. You can change the ACLs in the target database after it has been created. Replication Option does not support SQL ANSI-style privileges. Target databases that Replication Option creates use the default Oracle Rdb ACL-style privileges. SQL ANSI-style privileges assigned to a source database are not copied to or preserved on target databases during transfers. In a transfer definition, you can use logical symbol names to name the source database file, the target database file, the copy process log file, and the prologue and the epilogue command procedure files. However, Replication Option treats these file names differently: o Source database file logical names If the source file name is a logical symbol that translates to a standard OpenVMS file name specification, Replication Option performs the logical name translation. The SHOW TRANSFER DEFINITION statement shows the source file name in its translated form. The logical symbol can also translate into strings that, in turn, contain logical symbols. As long as the resulting string looks like a OpenVMS file specification and the logical symbol is not a concealed device name, the translation process is repeated. If the logical symbol translates into an Rdb Transparent Gateway access string (for example, /TYPE=VIDA/FILE=ACCESS_FILE/...), Replication Option does no further translations. Even if the VIDA name string contains logical symbol references, these references are not translated into OpenVMS file specifications. You can use a logical name in place of the string to identify an Rdb Transparent Gateway database. o Target database file logical name If the target database name is a logical name, it is not translated by Replication Option when it is stored in the transfer definition. o Copy process log file logical name Replication Option translates the log file logical name in the same way as source file logical names, with the following exceptions: o The log file specification is translated in RDO when the DEFINE TRANSFER statement is executed. o These log file names must be standard OpenVMS file specifications. Node names or version numbers are not allowed. o Prologue and epilogue command procedure file logical names Replication Option translates the prologue and epilogue file logical names in the same way as the source file logical name, with the following exceptions: o The prologue and epilogue file specifications are translated in RDO when the DEFINE TRANSFER statement is executed. o The log file names must be standard OpenVMS file specifications. Node names and version numbers are allowed. Replication Option expects node names in file specifications to be from one to six characters long. DECnet/OSI permits node names to be much longer than this. In order to use Replication Option in a DECnet/OSI environment, you must define and use short synonyms for the long node names. Node name synonyms can be registered either in a local or distributed name service database. For details on establishing node name synonyms, refer to the documentation for DECnet/OSI. Prior to Rdb/VMS Version 3.1, data values for text fields were sorted in ascending or descending order based on the ASCII character set. With Rdb/VMS Version 3.1 and higher (and Oracle Rdb Version 5.0 and higher), you can create databases that specify different sort sequences on a field-by-field basis. You can specify the default for the database as a whole. Replication Option has not enhanced transfer definitions to handle collation sequences in any way. In addition, target databases created by Replication Option do not have the collation sequence attributes defined. Sorting in a target database remains ASCII-based. Currently, there is no way that users can transfer default collation sequences for fields or databases. In an extraction transfer, you can change table definitions in the source database or definitions of columns on which the transferred tables are based. However, those changes are not reflected in the transfer definition. In replication transfers, you can make such changes until the initial transfer begins. Thereafter, any attempts to change or delete definitions for tables or columns in the replication transfer are not allowed, with the exception of the following four column attributes; these attributes can be modified even after the initial transfer begins: o Edit string o Default value for DATATRIEVE o Query name for DATATRIEVE o Query header However, note that if you do change the attributes listed in a source column, a comparable change is not made automatically to the target database column. If you want that to happen, you must make the change in both the source and the target databases. In both extraction and replication transfers, if you make changes that cause the source tables or columns to be incompatible with the transfer definitions, Replication Option detects these differences at the time of transfer execution. The transfer fails, the transfer status reflects the failure, and the transfer is suspended. However, with extractions or initial replications, the copy process does not detect changes to the data type of a field. For example, you can change a field from the data type CHAR to the data type INTEGER without causing a failure.
3 – Examples
Example 1 The following example defines a transfer, NH_EMPLOYEES, that creates an extraction database. The transfer definition selects New Hampshire employees' address records for transfer to the remote node. RDO> INVOKE DATABASE FILENAME PERSONNEL RDO> DEFINE TRANSFER NH_EMPLOYEES EXTRACTION cont> DESCRIPTION IS /* Employees who live in New Hampshire */ cont> TO NODE1::DISK1:[ADAMS]NH_EMP cont> MOVE RELATION E IN EMPLOYEES WITH E.STATE = "NH" cont> SELECT FIELDS E.EMPLOYEE_ID, cont> E.LAST_NAME, cont> E.FIRST_NAME, cont> E.MIDDLE_INITIAL, cont> E.ADDRESS_DATA_1, cont> E.ADDRESS_DATA_2, cont> E.CITY, cont> E.STATE, cont> E.POSTAL_CODE cont> LOG IS NH_EMPLOYEES.LOG cont> END. Example 2 This example shows an extraction from a remote source database to a local target database. The DEFINE TRANSFER statement specifies the transfer of all personnel records to the target node. RDO> INVOKE DATABASE FILENAME NODE1::DISK1:[DIR1]PERSONNEL RDO> DEFINE TRANSFER PERS_EXAMP EXTRACTION cont> DESCRIPTION IS /* Extraction of personnel records*/ cont> TO [LEARNER.PERS]PERS_COPY cont> MOVE RELATIONS ALL cont> LOG IS [LEARNER.PERS]PERS_EXAMP.LOG cont> END. Example 3 This example shows an extraction transfer from a remote source to a remote target database. The log file, PERS_EXAMP.LOG, is located on the source node. RDO> INVOKE DATABASE FILENAME NODE1::DISK1:[DIR1]PERSONNEL RDO> DEFINE TRANSFER PERS_EXAMP EXTRACTION cont> DESCRIPTION IS /* Extraction of personnel records*/ cont> TO NODE2::DISK2:[PROTO]PERS_TARGET cont> MOVE RELATIONS ALL cont> LOG IS PERS_EXAMP.LOG cont> END. Example 4 This example of a replication transfer definition sends the entire colleges relation and the entire degrees relation to the target database. The replication database can be accessed for information about employees' college and degree histories. The transfer definition includes some database parameters for the target database. RDO> INVOKE DATABASE FILENAME PERSONNEL RDO> DEFINE TRANSFER COLLEGE_INFO REPLICATION cont> DESCRIPTION IS /* Info about employees' colleges only */ cont> TO NODE1::DISK1:[BURTON]EMP_COLLEGE cont> NUMBER OF USERS IS 25 cont> SNAPSHOT ALLOCATION IS 150 PAGES cont> MOVE RELATION C IN COLLEGES cont> SELECT FIELDS ALL; cont> MOVE RELATION D IN DEGREES cont> SELECT FIELDS ALL cont> LOG IS COLLEGE_INFO.LOG cont> END. Example 5 This replication transfer specifies three fields from the CREDIT_ CARDS source database for transfer to the target database. The fields are CARD_NUM, EXPIRATION_DATE, and VALID. Only invalid credit card records are selected for the transfer. RDO> DEFINE TRANSFER BAD_CARDS REPLICATION cont> DESCRIPTION IS /* Invalid credit cards */ cont> TO NODE1::DISK1:[CREDIT]BAD_CARDS cont> MOVE RELATION C IN CARDS WITH C.VALID = "N" cont> SELECT FIELDS C.CARD_NUM, cont> C.EXPIRATION_DATE, cont> C.VALID cont> LOG IS BAD_CARDS.LOG cont> END. Example 6 The following example defines a replication transfer that sends the entire EMPLOYEES, JOB_HISTORY, SALARY_HISTORY, DEPARTMENTS, and JOBS relations. The definition also selects three views for transfer: CURRENT_INFO, CURRENT_JOB, and CURRENT_SALARY. RDO> INVOKE DATABASE FILENAME PERSONNEL RDO> DEFINE TRANSFER NH_PERSONNEL REPLICATION cont> TO NODE1::DISK1:[DBADMIN]NHP.RDB cont> MOVE RELATION E IN EMPLOYEES SELECT FIELDS ALL; cont> MOVE RELATION JH IN JOB_HISTORY SELECT FIELDS ALL; cont> MOVE RELATION SH IN SALARY_HISTORY SELECT FIELDS ALL; cont> MOVE RELATION D IN DEPARTMENTS SELECT FIELDS ALL; cont> MOVE RELATION J IN JOBS SELECT FIELDS ALL cont> MOVE VIEWS CURRENT_INFO, CURRENT_JOB, CURRENT_SALARY cont> LOG FILE IS DISK1:[DBADMIN]NHP.LOG cont> END. Example 7 The following example moves the CURRENT_JOB view defined in the source database as a CROSS of the EMPLOYEES relation and the JOB_ HISTORY relation. You can achieve the effect of a CROSS clause by transferring a view that is a CROSS in the source database. On the target database, the records selected by the view are created as a relation. RDO> INVOKE DATABASE FILENAME PERSONNEL RDO> DEFINE TRANSFER CJOB EXTRACTION cont> TO NODE1::DISK1:[RAMESH]JOB_DB cont> MOVE RELATION C IN CURRENT_JOB WITH C.JOB_CODE = "SEII" cont> SELECT FIELDS C.LAST_NAME, C.FIRST_NAME, C.ADDRESS cont> LOG FILE IS CJOB.LOG cont> END TRANSFER. Example 8 The following example shows an extraction rollup transfer that invokes several source databases: PERSONNEL, WORKERS, and STAFF. The transfer selects fields in the EMPLOYEES relations from the three databases identified by the database handles DB1, DB2, and DB3 and located on three different nodes and in the JOBS relation from DB1. Then the transfer moves these relations to a single target database, LOCAL_DB. RDO> INVOKE DATABASE DB1=FILENAME "NODE1::DISK1:[DIR1]PERSONNEL" RDO> INVOKE DATABASE DB2=FILENAME "NODE2::DISK2:[DIR2]WORKERS" RDO> INVOKE DATABASE DB3=FILENAME "NODE3::DISK3:[DIR1]STAFF" RDO> DEFINE TRANSFER LABOR EXTRACTION ROLLUP cont> TO NODE4::DISK4:[DIR4]LOCAL_DB cont> MOVE RELATION E IN DB1.EMPLOYEES WITH E.EMP_CODE= "A+" cont> INTO RELATION EXEMPT_EMPLOYEES cont> SELECT FIELDS E.EMP.ID,E.SALARY,E.JOB_CODE; cont> MOVE RELATION E IN DB2.EMPLOYEES WITH E.EMP_CODE= "A+" cont> INTO RELATION EXEMPT_EMPLOYEES cont> SELECT FIELDS E.EMP_ID,E.SALARY,E.JOB_CODE; cont> MOVE RELATION E IN DB3.EMPLOYEES WITH E.EMP_CODE= "A+" cont> INTO RELATION EXEMPT_EMPLOYEES cont> SELECT FIELDS E.EMP.ID,E.SALARY,E.JOB_CODE; cont> MOVE RELATION J IN DB1.JOBS WITH J.JOB_CODE= "J17" cont> INTO RELATION ENTRY_JOBS cont> SELECT FIELDS J.JOB_NAME,J.JOB_CODE cont> LOG FILE IS DISK4:[DIR4]LOCAL.LOG cont> END. Example 9 The following EMPLOYEES transfer creates an extraction database. The transfer selects records using a first-clause, with-clause, reduce-clause, and sort-clause. RDO> INVOKE DATABASE FILENAME PERSONNEL RDO> DEFINE TRANSFER EMPLOYEES EXTRACTION cont> TO NODE1::DISK1:[NELSON]EMPLOYEES_INFO cont> MOVE RELATION FIRST 10 E IN EMPLOYEES cont> WITH E.CITY = "BOSTON" cont> REDUCED TO E.LAST_NAME, E.FIRST_NAME, E.ADDRESS cont> SORTED BY DESCENDING E.LAST_NAME cont> SELECT FIELDS E.LAST_NAME, E.FIRST_NAME, E.ADDRESS cont> LOG FILE IS DISK1:[NELSON]EMPLOYEES.LOG cont> END TRANSFER. Example 10 The following extraction transfer includes two command files. The prologue command procedure establishes a connection to a remote node, and the epilogue command procedure terminates the connection. This example shows how to specify the prologue file and epilogue file; it does not show the command procedures. RDO> INVOKE DATABASE FILENAME NODE1::DISK1:[DBADMIN.PERS]PERSONNEL RDO> DEFINE TRANSFER PERS_SAMPLE EXTRACTION cont> TO PERS_COPY cont> MOVE RELATIONS ALL cont> PROLOGUE FILE IS DIALUP.COM cont> EPILOGUE FILE IS HANGUP.COM cont> LOG IS PERS_SAMPLE.LOG cont> END.