168
IBM ® DATAMIRROR TRANSFORMATION SERVER ® for AS/400 Version 6.1 End-user documentation

Transformation Server for AS400 - Version 6.1

Embed Size (px)

Citation preview

Page 1: Transformation Server for AS400 - Version 6.1

IBM® DATAMIRROR TRANSFORMATION SERVER® for AS/400

Version 6.1

End-user documentation

Page 2: Transformation Server for AS400 - Version 6.1
Page 3: Transformation Server for AS400 - Version 6.1

Table of Contents

Table of ContentsAbout Transformation Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11Installing Transformation Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13

Before You Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15Specifying Transformation Server Product Library Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15Specifying D_MIRROR User Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15Previous Installation of Transformation Server and Existing D_MIRROR User Profile . . . . . . . . . . . . . .15Port Requirements for Transformation Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16

Installing Transformation Server for AS/400 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17Step 1—Sign on with authorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Step 2—Restore the installation program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Step 3—Run the Installation Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Step 4—Specify CD ROM Device Name or Save File Information . . . . . . . . . . . . . . . . . . . . . . . . 17Step 5—Select D_Mirror User Profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Step 6—Accept the Software License Agreement and Start the Installation . . . . . . . . . . . . . . . . . 19Step 7—Specify the Authorization Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Step 8—Specify Product and Tutorial Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Step 9—Specify a Full Product Installation or Only Work Library Installation . . . . . . . . . . . . . . . . 20Step 10 (Optional)—Specify Product and Tutorial Libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

After You Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23Configuring Transformation Server to use TCP/IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23Verifying the Configuration of Your Domain Name Server (DNS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24Verifying Journal and Journal Receiver Authorities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24

To verify the journal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25To verify journal receivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Starting the Subsystem and the Listener. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25Securing Transformation Server Product Library (Optional) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26Scheduling Transformation Server Start Up and Shut Down (Optional) . . . . . . . . . . . . . . . . . . . . . . . . .26

To schedule Transformation Server to start up or shut down automatically . . . . . . . . . . . . . . . . . 26Upgrading Transformation Server for AS/400 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27

Before You Upgrade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27Upgrading Transformation Server for AS/400 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28Updating Transformation Server for AS/400 to the Latest Service Pack. . . . . . . . . . . . . . . . . . . . . . . . .29

To update Transformation Server for AS/400 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Creating Multiple Installations of Transformation Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31

Creating Multiple Installations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31To create multiple installations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Verifying Additional Installations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32To verify the authority of the D_MIRROR User Profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

© DataMirror Corporation, an IBM Company Printed in Canada 3

Page 4: Transformation Server for AS400 - Version 6.1

Table of Contents

To verify the attributes of the renamed subsystems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32To verify the library list of each additional installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Running Additional Transformation Server Installations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33To run the additional installations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Uninstalling Transformation Server for AS/400 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35Before You Uninstall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35Uninstalling Transformation Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35Removing the Transformation Server Service and Port Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35

To remove ‘dmirror’ service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36To remove the port number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

Installing and Configuring Transformation Server to Replicate Data from a Remote Journal . . . . . .37Installing and Configuring Transformation Server to Replicate Data from a Remote Journal . . . . . . . . . . .39

About Installing Transformation Server for AS/400 on the Data Origin Server . . . . . . . . . . . . . . . . . . . .40About Installing Transformation Server for AS/400 on the Source Server . . . . . . . . . . . . . . . . . . . . . . .40About Installing Transformation Server on the Target Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41Verifying the creation of the SQL package on the TS/400 Data Origin Server . . . . . . . . . . . . . . . . . . . .41

To create the SQL package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41D_MIRROR User Profile considerations for remote journals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41Configuring Remote Journaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42

To configure remote journaling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Configuring TS/400 Source Server to retrieve source files from the TS/400 Data Origin Server . . . . . .43

To add a relational database directory that references the Data Origin Server . . . . . . . . . . . . . . . 43To enable the TS/400 Source Server to retrieve source files from the TS/400 Data Origin Server 43

Remote Journal Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47CHGJRNDM—Change Remote Journal Receivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47RTVDMJENT—Retrieve Transformation Server Remote Journal Entry . . . . . . . . . . . . . . . . . . . . . . . . .47VFYTSJRN—Verify Remote Journal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48

Commands for Transformation Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49Command and Parameter Formats and Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51About Issuing Commands in Transformation Server for AS/400 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51Replication Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53

ENDDTAMIR—End Continuous Mirroring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53ENDDTAMIR—End Net Change Mirroring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54ENDDTARSH—End Data Refresh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55STRDTARSH—Start Data Refresh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55STRDTAMIR—Start Continuous Mirroring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56STRDTAMIR—Start Net Change Mirroring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58

Source Table Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61ADDTBL—Add Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61CHGREPMTD—Change Replication Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62DSLTGTTBL—Deselect Source Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63

4 Printed in Canada IBM DataMirror Transformation Server

Page 5: Transformation Server for AS400 - Version 6.1

Table of Contents

READDTBL—Update Definition of Source Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64RMVTBL—Remove Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64STRDTAMIR—Describe Source Tables to Target Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65SETMIRSTS—Set Table Status for Mirroring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66SETRSHSTS—Set Table Status for Refresh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68SLTTGTTBL—Select Source Tables for Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69SETTSSYNC—Set Synchronization Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72SETJRNPOS—Set Journal Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72

Table Mapping Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75ASNTGTTBL—Map Source and Target Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75DASTGTTBL—Unmap Source and Target Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77

Copy Subscription Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79CPYTGTASN—Copy Target Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79CPYTGTTBL—Copy Source Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80

Promote Subscription Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83DUPTBL—Duplicate Added Table Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83DUPTGTASN—Duplicate Subscriber Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83DUPTGTTBL—Duplicate Selected Source table Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .84

Table-Level Operation Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87DMSQL—Enable/Disable SQL Statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87

Database Journal Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89CHGJRNDM—Change Journal Receivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90DMVWBKMK—Retrieve Bookmark Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92RTVDMJENT—Retrieve Transformation Server Journal Entry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94VFYTSJRN—Verify Journal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94

Communication Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97STRDMTCP—Start Transformation Server TCP/IP Communications . . . . . . . . . . . . . . . . . . . . . . . . . .97STRDMUDP—Start UDP Listener. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99ENDDMTCP—End Transformation Server TCP/IP Communications . . . . . . . . . . . . . . . . . . . . . . . . . .100ENDDMUDP—End UDP Listener . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103

End and Shut Down Transformation Server Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105DMENDPROC—End Transformation Server Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105

Other Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107ADDS36TBL—Add S/36 Flat File Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107DMCMVFY—Run Communications Verifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .108RTVDMVSTS—Retrieve Transformation Server Installation Information . . . . . . . . . . . . . . . . . . . . . . .111CHGDMSVAL—Set Source System Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111CHGDMTVAL—Set Target System Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120

System Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .127System Parameters for Transformation Server for AS/400 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129

General Product System Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129

© DataMirror Corporation, an IBM Company Printed in Canada 5

Page 6: Transformation Server for AS400 - Version 6.1

Table of Contents

Authorization Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129Enable *MAXOPT3 Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130Record Format Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130Startup Timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130TCP_KEEPALIVE_SECS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

Replication System Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131Allow Refresh While Active . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131End on Error During Mirroring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131End on Error During Refresh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131Refresh After Restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

Cascading Replication System Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .132Enable Cascading Replicates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

Database Journal System Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .132Default Journal Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Default Journal Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Replicate User Defined Journal Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133Report Position Interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133Synchronization Interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

Remote Journal System Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134Data Origin TCP/IP Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134Data Origin Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134Relational Database Directory Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

Commitment Control System Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134Commitment Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

Multibyte Character Set System Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135Unicode Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

Latency System Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136Deadband Percentage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136Monitor Sample Interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

Notifications System Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137Heartbeat Timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138Messages on Column Not Null Capable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138Messages on Invalid Numerics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138Progress Status Interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .139Numeric Column Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

Date/Time Column Function System Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .139Default Date On Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

Row and Column Filtering System Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140Audit Filtered Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140

6 Printed in Canada IBM DataMirror Transformation Server

Page 7: Transformation Server for AS400 - Version 6.1

Table of Contents

Critical Column Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140Event Log System Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141

Notify Message Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141Notify Message Queue Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141Notify Message Threshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

Lock Detection System Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141Lock Timeout Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

User Exits for Transformation Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143Invoking User Exit Programs Before and After Table and Row-Level Operations . . . . . . . . . . . . . . . . . . .145

Entry Parameters for Table/Row-Level User Exits in RPG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146Entry Parameters for Table/Row-Level User Exits in COBOL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .150Entry Parameters for Table/Row-Level User Exits in C/C++. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .153

Invoking User Exit Programs from Expressions and Row-Filtering Expressions. . . . . . . . . . . . . . . . . . . .155Invoking User Exit Programs After Receiving a Notification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157Invoking User Exit Programs for Conflict Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161

Entry Parameter List Descriptions for Conflict Resolution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162Sample User Exit Programs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163

Contacting DataMirror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165Contacting Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165Training and Education . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165Send us your Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165Troubleshooting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165

Printable PDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .167Copyright Notice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .169

© DataMirror Corporation, an IBM Company Printed in Canada 7

Page 8: Transformation Server for AS400 - Version 6.1

Table of Contents

8 Printed in Canada IBM DataMirror Transformation Server

Page 9: Transformation Server for AS400 - Version 6.1

About Transformation ServerTransformation Server is designed to transfer data seamlessly from any iSeries file system to any supported target database. It also supports data transfers from any supported source database to iSeries file systems. It is intended for database administrators and managers with organizational control over iSeries data. To use Transformation Server, you must configure it in Management Console. In the source environment, use Management Console to select the tables that will have its data sent to other servers, choose the replication method, and start data transfers. In the target environment, use Management Console to define column mappings and data transformations that will be applied to the target tables.

© DataMirror Corporation, an IBM Company Printed in Canada 9

Page 10: Transformation Server for AS400 - Version 6.1

10 Printed in Canada IBM DataMirror Transformation Server

Page 11: Transformation Server for AS400 - Version 6.1

System RequirementsHardware RequirementsDisk Space: 60 megabytesRAM: 64 megabytes of available pooled memory (512 megabytesrecommended)

Software RequirementsOperating System: OS/400 V4R4 or greaterFor correct product operation, you may require Program Temporary Fixes (PTFs). Contact IBM for PTF information for your operating system.

© DataMirror Corporation, an IBM Company Printed in Canada 11

Page 12: Transformation Server for AS400 - Version 6.1

12 Printed in Canada IBM DataMirror Transformation Server

Page 13: Transformation Server for AS400 - Version 6.1

Installing Transformation ServerThe following topics provide you information on what to do before an install, how to install, what to do after an install, how to upgrade, and how to install multiple instances of Transformation Server:• Before You Install on page 15• Installing Transformation Server for AS/400 on page 17• After You Install on page 23• Upgrading Transformation Server for AS/400 on page 27• Creating Multiple Installations of Transformation Server on page 31• Uninstalling Transformation Server for AS/400 on page 35

© DataMirror Corporation, an IBM Company Printed in Canada 13

Page 14: Transformation Server for AS400 - Version 6.1

14 Printed in Canada IBM DataMirror Transformation Server

Page 15: Transformation Server for AS400 - Version 6.1

Before You Install

Before You Install In this section, you will learn:• Specifying Transformation Server Product Library Name on page 15• Specifying D_MIRROR User Profile on page 15• Previous Installation of Transformation Server and Existing D_MIRROR User Profile on page 15• Port Requirements for Transformation Server on page 16

Specifying Transformation Server Product Library NameDuring an installation, you need to specify the name that you want to assign to the Transformation Server product library. DMIRROR is the default name. During an upgrade, the installation uses the previous product library, and you are not asked to specify the Transformation Server product library.If you are upgrading Transformation Server to Version 6.1, or migrating to Transformation Server Version 5.3, you must obtain a new authorization code. This authorization code is not requested during the upgrade or migration process. However, you must update the Transformation Server system parameter to identify the new authorization code. For more information about setting the Authorization Code system parameter, see Authorization Code on page 129.If you have not obtained a valid authorization code from DataMirror, you can still install, upgrade, migrate and configure replication. However, you must have a valid code to start replication. If you have not obtained a valid authorization code from DataMirror, you can still install, upgrade, migrate and configure replication. However, you must have a valid code to start replication.

Specifying D_MIRROR User ProfileTransformation Server automatically creates a user profile (D_MIRROR) during installation. Transformation Server uses this user profile to supervise replication operations. The password for this user profile is intentionally set to *NONE, and should not be changed. The D_MIRROR user profile should be reserved for Transformation Server. Do not use this profile to log on or for other purposes.If you are installing Transformation Server for AS/400 to replicate data from a remote journal, then you must grant the D_MIRROR user profile enough object authority to access objects on the TS/400 Data Origin Server.

Related Topics• D_MIRROR User Profile considerations for remote journals on page 41

Previous Installation of Transformation Server and Existing D_MIRROR User ProfileIf the D_MIRROR user profile already exists from an installation of a previous Transformation Server version, you can leave the user profile unchanged, re-configure the profile for Transformation Server Version 6.1, or cancel the installation or upgrade in order to verify whether or not the profile is configured properly. You can verify whether or not the user profile is configured properly by issuing the following command:DSPUSRPRF USRPRF(D_MIRROR)

Verify that the following parameters are set to the indicated values:• Special authority: *JOBCTL• Password: *NONE• Password expiration: *NO

© DataMirror Corporation, an IBM Company Printed in Canada 15

Page 16: Transformation Server for AS400 - Version 6.1

Before You Install

• Message queue: QUSRSYS/D_MIRROR

Port Requirements for Transformation Server Transformation Server requires that you allocate a set of ports for communications with client workstations running Transformation Server Management Console and other servers. The ports must be accessible through firewalls.

Related Topics• Installing Management Console, see Transformation Server Management Console Administration Guide • Installing Access Manager, see Transformation Server Access Manager Configuration Guide

• Connecting to a datastore, see Transformation Server Management Console Administration Guide

• Defining a subscription, see Transformation Server Management Console Administration Guide

• Detecting Available Replication Agents on your Network with Auto-Discovery, see Transformation Server Access Manager Configuration Guide

Table 1 Port Requirements

Protocol Default Port IN/OUT Purpose

TCP 11111 IN Accepts connections from:• Transformation Server Management

Console• Access Manager• Other installations of Transformation

Server as a source of replication• Command line utilities

UDP 2222 IN Auto-discoveryOnly required if you have enabled the autodiscovery feature in Access Manager. This port listens for broadcasts from Access Manager which detects all running installations of Transformation Server.

TCP 11111 OUT When you add a subscription in Transformation Server Management Console, if the subscription uses the datastore you configured as a source of data (source datastore), then you need a TCP port so that the subscription can to connect to the target datastore.

UDP 10101 OUT Auto-discovery replies are sent back to Access Manager on this port. Auto-discovery is enabled by default.

16 Printed in Canada IBM DataMirror Transformation Server

Page 17: Transformation Server for AS400 - Version 6.1

Installing Transformation Server for AS/400

Installing Transformation Server for AS/400The following steps help you install Transformation Server for AS/400.

Step 1—Sign on with authoritiesBefore you install Transformation Server for AS/400, you need to sign on with a user profile that has the *SECADM,*JOBCTL *ALLOBJ, *SAVSYS, *AUDIT, *IOSYSCFG, *SPLCTL authorities.Note: Do not sign on with the user profile D_MIRROR.

Step 2—Restore the installation programTo restore from the CD-ROM, issue the following command:RSTOBJ OBJ(*ALL) SAVLIB(V6R1M0) DEV(<CD-ROM device name>) OPTFILE(‘/DTS/V6/AS400/D_INITIAL/V6R1M0INIT’) RSTLIB(QTEMP)

To restore from a save file, issue the following command:RSTOBJ OBJ(DMCINSTALL) SAVLIB(V6R1M0) DEV(*SAVF) SAVF(<save file library>/V6R1M0) RSTLIB(QTEMP)

Step 3—Run the Installation ProgramAfter you have restored the installation program, issue the following command to run the installation program:?QTEMP/DMCINSTALL

Press F4 to access the installation prompt screen.

Step 4—Specify CD ROM Device Name or Save File InformationThe Device/Save File Name screen appears:

Enter the following information:

Device Name The device (CD ROM device name) OR save file (*SAVF) that you are using to run the installation program.

© DataMirror Corporation, an IBM Company Printed in Canada 17

Page 18: Transformation Server for AS400 - Version 6.1

Installing Transformation Server for AS/400

If you are restoring the installation program from a save file, then enter the following information:

Press Enter to continue.Note: If the D_MIRROR user profile does not exist in the QSYS library on the server where Transformation Server is

being installed, proceed to accept the license agreement Step 6—Accept the Software License Agreement and Start the Installation on page 19.

Step 5—Select D_Mirror User Profile The DataMirror D_MIRROR User Profile Exists screen appears:

This screen indicates that the installation program has detected the existence of the D_MIRROR user profile. This user profile may exist through a previous installation of Transformation Server. Transformation Server requires that the D_MIRROR user profile be configured properly for Version 6.1. Use this screen to determine if you want to configure the D_MIRROR user profile.Press one of the following keys:

Savefile Name for Product Library Name

V6R1M0

Library Name The name of the library where the save file is located. You must transfer the save file to this library.

Savefile Name for Tutorial Name

V6R1M0TUT

Library Name The library name where the save file for the tutorial tables is located. You must transfer the save file to this library. You can also enter *LIBL to specify the set of libraries in your list. The installation program searches libraries in order of the first occurrence of the specified library.

F2 Leaves the D_MIRROR user profile unchanged. If the user profile was created during an installation of a previous Transformation Server version, and its configuration has not been changed, then the user profile should still be valid for Version 6.1.

18 Printed in Canada IBM DataMirror Transformation Server

Page 19: Transformation Server for AS400 - Version 6.1

Installing Transformation Server for AS/400

Press Enter to continue.

Step 6—Accept the Software License Agreement and Start the InstallationThe Software Licensing Agreement screen appears. Press F2 to accept the terms expressed in the DataMirror software license agreement and start the installation.Press Enter to continue.

Step 7—Specify the Authorization CodeThe Authorization Code screen appears:

Enter the following information:

Press Enter to continue.

Step 8—Specify Product and Tutorial LibrariesThe Product and Tutorial Library screen appears:

F4 Reconfigures the D_MIRROR user profile for Version 6.1.

F3 Cancels the installation. You may want to cancel the installation to verify that you have configured the user profile. You can verify whether or not the user profile is configured properly by issuing the following command:DSPUSRPRF USRPRF(D_MIRROR)

Verify that the following parameters are set to the indicated values:• Special authority: *JOBCTL• Password: *NONE• Password expiration: *NO• Message queue: QUSRSYS/D_MIRROR

Authorization Code The Transformation Server authorization code, as provided by DataMirror Technical Support or obtained from the DataMirror web site.

© DataMirror Corporation, an IBM Company Printed in Canada 19

Page 20: Transformation Server for AS400 - Version 6.1

Installing Transformation Server for AS/400

Enter the following information:

You must install Transformation Server and the tutorial tables into different libraries. The default tutorial library is DTUTOR.Press Enter to install Transformation Server on your server. Note: The installation program creates the specified library and installs Transformation Server on your system. After

the installation has been completed, a final message is generated to indicate whether or not the installation was successful. If the installation was unsuccessful, error messages are placed in the job log. Use the DSPJOBLOG command to identify the errors and take the necessary corrective actions before running the installation program again.

Step 9—Specify a Full Product Installation or Only Work Library Installation If you specified the name of an Independant Auxiliary Storage Pool (IASP) device, then the following screen appears:

DTS/400 Product Library The name of the library where you want to install Transformation Server. The default product library is DMIRROR. If you specified the name of an existing library, proceed to Step 10 (Optional)—Specify Product and Tutorial Libraries on page 21.

DTS/400 Tutorial Library The name of the library where you want to install the tutorial tables (optional).

DTS/400 IASP Device The name of your Independant Auxiliary Storage Pool (IASP) device where you want to install Transformation Server. Enter the name of the IASP device if you want to install Transformation Server on an IASP. If you do not have an ASP device, then accept the default value as *SYSBAS.

20 Printed in Canada IBM DataMirror Transformation Server

Page 21: Transformation Server for AS400 - Version 6.1

Installing Transformation Server for AS/400

Step 10 (Optional)—Specify Product and Tutorial LibrariesIf you specified the name of an existing library, then the Existing Library Specified screen appears:

F (Full product installation) Installs Transformation Server for AS/400 product into the specified IASP device and required support objects (*SBSD, *CLSD, and *JOBQ) into a work library on the system ASP of the machine currently connected to the IASP device.

W (Work library only) Only installs the required support objects (*SBSD, *CLSD, and *JOBQ) into the work library on the system ASP of the machine that is connected to the IASP device. Specify this option if you already have a full product installation of Transformation Server for AS/400 on the connected IASP device. You can also specify this option when you have implemented a switchable IASP environment and require another copy of the work library on a secondary machine.The installation program automatically creates the work library. The name of the work library is the first eight characters of your product library appended with 01. For example, TS60SP101. If the library exists, then the installation program ends.

© DataMirror Corporation, an IBM Company Printed in Canada 21

Page 22: Transformation Server for AS400 - Version 6.1

Installing Transformation Server for AS/400

Enter the following information:

Press Enter to install Transformation Server on your server.Note: The installation program creates the specified library and installs Transformation Server on your system. After

the installation has been completed, a final message is generated to indicate whether or not the installation was successful. If the installation was unsuccessful, error messages are placed in the job log. Use the DSPJOBLOG command to identify the errors and take the necessary corrective actions before running the installation program again.

Replace Specified Library

The name of the library where you want to install Transformation Server. The default product library is DMIRROR. Enter Y if you want to install Transformation Server in the specified product library, or N if you want to install into a different library. If you entered N, specify the name of a different library.Selecting Y deletes all existing contents of this library.

22 Printed in Canada IBM DataMirror Transformation Server

Page 23: Transformation Server for AS400 - Version 6.1

After You Install

After You InstallIn this section, you will learn about the tasks you must perform after installing Transformation Server:• Configuring Transformation Server to use TCP/IP on page 23• Verifying the Configuration of Your Domain Name Server (DNS) on page 24• Verifying Journal and Journal Receiver Authorities on page 24• Starting the Subsystem and the Listener on page 25• Securing Transformation Server Product Library (Optional) on page 26• Scheduling Transformation Server Start Up and Shut Down (Optional) on page 26

Configuring Transformation Server to use TCP/IPAfter installing Transformation Server, you need to allocate a TCP/IP service for communication with Transformation Server Management Console that you have installed on each client workstation. The TCP/IP service is called ‘dmirror’.

Step 1—Run the Configuration UtilityIssue the following command:CFGTCP

The Configure TCP/IP screen appears.

Step 2—Configure related tables (Option 21)The Configure Related Tables screen appears.

Step 3—Work with service table entries (Option 1)The Work with Service Table Entries screen appears:

Enter 1 in the Opt Column.Press Enter to continue.

Step 4—Add Service Table EntryThe Add Service Table Entry screen appears:

© DataMirror Corporation, an IBM Company Printed in Canada 23

Page 24: Transformation Server for AS400 - Version 6.1

After You Install

Enter the following information:

Verifying the Configuration of Your Domain Name Server (DNS)If you are using a local host table as the hostname, then you need to verify the DNS configuration to ensure that the local host table is searched for as the hostname.

Step 1—Run the Configuration UtilityIssue the following command:CFGTCP

The Configure TCP/IP screen appears.

Step 2—Select change TCP/IP domain information (Option 12)Press Enter to continue.

Step 3—Change TCP/IP Domain (CHGTCPDMN)The Change TCP/IP Domain (CHGTCPDMN) screen appears.Verify that the hostname search priority field is set to *LOCAL.Specifying *LOCAL indicates that you want to use the local host table. If you want to search a domain name server initially before searching the local host table, you should set this field to *REMOTE (this is the default setting) and specify the IP address of the domain name server.Press Enter to complete the verification.

Verifying Journal and Journal Receiver AuthoritiesYou need to verify that all user profiles, including the D_MIRROR user profile, that start mirroring jobs have sufficient authorities to access journals and journal receivers that are used by Transformation Server.

Service ‘dmirror’

(in single quotes)

Port Field A port number between 1 and 65535.

Protocol ‘tcp’

(in single quotes)

Text ‘description’ A description for the service table entry.

24 Printed in Canada IBM DataMirror Transformation Server

Page 25: Transformation Server for AS400 - Version 6.1

After You Install

Related Topics• To verify the journal on page 25• To verify journal receivers on page 25

To verify the journal1 From the command line, issue the following command:

WRKOBJ OBJ(<journal library>/<journal name>) OBJTYPE(*JRN)

The Work with Objects screen appears.2 Select Option 5 beside the journal.

The Display Object Authority screen appears.3 Press F11.4 Make sure that each user profile including D_MIRROR have the minimum authorities required to with objects. Opr, Mgt, and

Exist should be selected.5 Press F11 again.6 Make sure that each user profile including D_MIRROR have the minimum authorities required to work with the data. Read,

Add, Update, and Execute should be selected. 7 If the minimum authorities are not selected, issue the AS/400 command EDTOBJAUT to make the necessary changes.

To verify journal receivers1 From the command line, issue the following command:

WRKOBJ OBJ(<journal receiver library>/<journal receiver name>) OBJTYPE(*JRNRCV)

The Work with Objects screen appears.2 Select Option 5 beside the journal receiver.

The Display Object Authority screen appears.3 Press F11.4 Make sure that each user profile including D_MIRROR have the minimum authorities required to with objects. Opr, Mgt, and

Exist should be selected.5 Press F11 again.6 Make sure that each user profile including D_MIRROR have the minimum authorities required to work with the data. Read,

Add, Update, and Execute should be selected. 7 If the minimum authorities are not defined, issue the iSeries EDTOBJAUT command to make the necessary changes.

Starting the Subsystem and the Listener After installing Transformation Server, you must start the subsystem and the listener.1 If you have installed Transformation Server on an Independant Auxiliary Storage Pool (IASP) device, you must start the

subsystem and the listener from the computer that is currently connected to the IASP device. To set the ASP group for the interactive session, issue the following command:SETASPGRP <IASP NAME>

2 To change the current library to the product library, issue the following command:CHGCURLIB <Transformation Server product library>

© DataMirror Corporation, an IBM Company Printed in Canada 25

Page 26: Transformation Server for AS400 - Version 6.1

After You Install

3 To start the subsystem, issue the following command:STRSBS <WORK LIBRARY/DMIRROR>

4 To start the listener, issue the following command:STRDMTCP SERVICE (<SERVICE>) JOBD(<PRODUCT LIBRARY/DMCJOBD)

Securing Transformation Server Product Library (Optional)You can authorize the use of the Transformation Server product library to specific users. The default name of this library is DMIRROR.To authorize the use of Transformation Server to specific users, edit the authority of the Transformation Server library object using the following command:EDTOBJAUT OBJ(QSYS[/<Transformation Server product library>]) OBJTYPE(*LIB)

Note: If you revoke authority for the user *PUBLIC, make sure that you add the user D_MIRROR with object authority *CHANGE to the list of authorized users.

Scheduling Transformation Server Start Up and Shut Down (Optional)You can schedule Transformation Server to start up or shut down automatically at scheduled times on your iSeries system. You can add an entry to the iSeries job scheduler using the iSeries command ADDJOBSCDE (Add Job Schedule Entry).

Related Topics• To schedule Transformation Server to start up or shut down automatically on page 26

To schedule Transformation Server to start up or shut down automatically1 Create a Control Language (CL) program to set the current library to the Transformation Server product library name and

issue Transformation Server commands. The sample CL program named DM_START sets the current library to DMIRROR and starts continuous mirroring (STRDTAMIR) for the subscriber AS400TGT. For a detailed description of all available Transformation Server commands, see the Transformation Server for AS/400 Commands Reference.CL Program: DM_START

1 *************** Beginning of data *************************************0001.00 PGM0002.00 CHGCURLIB CURLIB(DMIRROR)0003.00 STRDTAMIR TARGET(AS400TGT) IDLE(*WAIT) FORMAT(*NO)0004.00 ENDPGM****************** End of data ****************************************

2 Add an entry to the iSeries job scheduler.In the following example, continuous mirroring is scheduled to start daily at 8 AM.ADDJOBSCDE JOB(DM_START) CMD(Call <library name>/DM_START) FRQ(*WEEKLY) SCDDATE(*NONE) SCDDAY(*ALL) SCDTIME(080000) JOBD(<Transformation Server product library>/DMCJOBD)

where:• <library name> is the library where the CL program DM_START is located, and• <Transformation Server product library> is the library where you installed or upgraded Transformation Server.

26 Printed in Canada IBM DataMirror Transformation Server

Page 27: Transformation Server for AS400 - Version 6.1

Upgrading Transformation Server for AS/400

Upgrading Transformation Server for AS/400In this section, you will learn about:• Before You Upgrade on page 27• Upgrading Transformation Server for AS/400 on page 28• Updating Transformation Server for AS/400 to the Latest Service Pack on page 29

Before You Upgrade Before you upgrade to a new release or to the latest service pack of Transformation Server for AS/400, make sure you end all replication activities, online activities, and save the metadata of your existing installation of Transformation Server.

Step 1—End All Transformation Server Version 6.0 Replication1 Add the Transformation Server product library to the library list. You can issue the following command:

ADDLIBLE LIB(<Transformation Server product library>)

2 End mirroring in a controlled manner. You can issue the following command:ENDDTAMIR TARGET(*ALL) ENDTYP(*CNTRLD)

3 Verify that all Transformation Server replication jobs have stopped. You can issue the following iSeries command:WRKACTOBJ

4 Stop the Transformation Server TCPLISTEN listener job. You can issue the following command:ENDDMTCP ENDTYP(*IMMED)

5 Remove the Transformation Server product library from the library list. You can issue the following command:RMVLIBLE LIB(<Transformation Server product library>)

6 End the Transformation Server subsystem. You can issue the following command:ENDSBS SBS(<Version 6.0 subsystem>) OPTION(*CNTRLD) DELAY(*NOLIMIT)

Step 2—End All Online Transformation Server Version 6.0 ActivitiesUse the iSeries WRKACTJOB command to determine if there are any Transformation Server jobs running under the Version 5.3 subsystem. All Transformation Server jobs have to be stopped before starting the upgrade.

Step 3—Save Transformation Server Version 6.0 MetadataSaving your Transformation Server metadata is a precautionary operation that allows you to recover data if an unforeseen situation occurs during the upgrade process.1 Create the save file where Transformation Server metadata is stored. You can issue the following command:

CRTSAVF <save file library name>/<save file name> Place the save file in a library other than the Transformation Server product library.

2 Save the metadata objects into the save file that was created by the CRTSAVF command. You can issue the following command:SAVOBJ OBJ(DMFS* DMFT*) LIB(<Transformation Server product library>) DEV(*SAVF) OBJTYPE(*FILE) SAVF(<save file library name>/<save file name>)

© DataMirror Corporation, an IBM Company Printed in Canada 27

Page 28: Transformation Server for AS400 - Version 6.1

Upgrading Transformation Server for AS/400

Upgrading Transformation Server for AS/400Step 1—Restore the Upgrade Program Restore the upgrade program from a CD-ROM device or from a save file.

To restore from the CD-ROM, issue the following command:• RSTOBJ OBJ(*ALL) SAVLIB(V6R1M0) DEV(<CD-ROM device name>)

OPTFILE(‘/DTS/V6/AS400/D_INITIAL/V6R1M0INIT’) RSTLIB(QTEMP)

To restore from a save file, issue the following command:• RSTOBJ OBJ(DMCINST610 DMS903 DMUMESSAGE DMTRACE) SAVLIB(V6R1M0)DEV(*SAVF)

SAVF(<save file library name>/V6R1M0) RSTLIB(QTEMP)

Step 2—Run the Upgrade ProgramAfter you have restored the installation program, issue the following command:?QTEMP/DMCINST610

Press F4 to access the installation prompt screen.

Step 3—Specify Device or Save File InformationThe Device/Save File Name screen appears:

Enter the following information:

If you are restoring the installation program from a save file, then enter the following information:

Press Enter to continue.

Device Name The device (CD ROM device name) OR *SAVF that you are using to run the installation program.

Savefile Name for Product Library Name

V6R1M0

Library Name The name of the library where the save file is located. You must transfer the save file to this library.

Savefile Name V6R1M0TUT

Library Name The library name where the save file for the tutorial tables is located. You must transfer the save file to this library. You can also enter *LIBL to specify the set of libraries in your list. The installation program searches libraries in order of the first occurrence of the specified library

28 Printed in Canada IBM DataMirror Transformation Server

Page 29: Transformation Server for AS400 - Version 6.1

Upgrading Transformation Server for AS/400

If the D_MIRROR user profile does not exist in the QSYS library on the server where Transformation Server is being installed, proceed to Step 4—Accept the Software License Agreement on page 29.

Step 4—Accept the Software License AgreementThe Software Licensing Agreement screen appears. Press F2 to accept the terms expressed in the DataMirror software license agreement and start the installation.Press Enter to continue.

Updating Transformation Server for AS/400 to the Latest Service PackUpdating your Transformation Server product to the latest service pack replaces existing objects in the Transformation Server product library. To identify the objects in the existing product library, issue the DSPSAVF command. You should also backup existing objects before updating to the latest service pack.

Related Topics• To update Transformation Server for AS/400 on page 29

To update Transformation Server for AS/4001 Ensure that you have ended replication, ended all replication activities, and saved Transformation Server metadata.2 Restore the service pack from a CD-ROM device or from a save file.

To restore from the CD-ROM, issue the following command:• RSTOBJ OBJ(*ALL) SAVLIB(V6R1M0UPD) DEV(<CD-ROM device name>)

OPTFILE(‘/DTS/V6/AS400/D_UPDATE/V6R1M0UPD’) RSTLIB(<Transformation Server product library>)

To restore from a save file, issue the following command:• RSTOBJ OBJ(*ALL) SAVLIB(V6R1M0UPD) DEV(*SAVF) SAVF(<save file library

name>/V6R1M0UPD) RSTLIB(<Transformation Server product library>)

Related Topics• Step 1—End All Transformation Server Version 6.0 Replication on page 27• Step 2—End All Online Transformation Server Version 6.0 Activities on page 27• Step 3—Save Transformation Server Version 6.0 Metadata on page 27

© DataMirror Corporation, an IBM Company Printed in Canada 29

Page 30: Transformation Server for AS400 - Version 6.1

Upgrading Transformation Server for AS/400

30 Printed in Canada IBM DataMirror Transformation Server

Page 31: Transformation Server for AS400 - Version 6.1

Creating Multiple Installations of Transformation Server

Creating Multiple Installations of Transformation Server In this section, you will learn:• Creating Multiple Installations on page 31• Verifying Additional Installations on page 32• Running Additional Transformation Server Installations on page 33

Creating Multiple InstallationsYou can install Transformation Server for AS/400 multiple times.

Related TopicsTo create multiple installations on page 31

To create multiple installations1 Sign on and install Transformation Server multiple times. 2 Configure Transformation Server to use TCP/IP by adding a new service table entry for each installation. 3 Start Transformation Server TCP/IP communications.

To start Transformation Server TCP/IP communications, issue the STRDMTCP command.Make sure you specify the new service table entry for each additional installation.

4 Rename additional subsystems. To rename the subsystem for the additional installation, issue the following command: RNMOBJ OBJ(<Transformation Server product library of additional installation>/DMIRROR) OBJTYPE(*SBSD) NEWOBJ(<new name for subsystem>)

5 Modify the Transformation Server communication registry value.To modify the Transformation Server communication registry, issue the following command: TSSETREG PRODLIB(<Transformation Server product library of additional installation>) SUBSNAME(<renamed subsystem of additional installation>)

6 Remove the autostart job entry. To remove the autostart job entry, issue the following command:RMVAJE SBSD(<Transformation Server product library of additional installation>/<renamed subsystem of additional installation>) JOB(TCPLISTEN)

7 If you want the D_MIRROR profile to refer to the first installation by default, then issue the following command:CHGUSRPRF USRPRF(D_MIRROR) CURLIB(<Transformation Server product library of first installation>)

Any of the Transformation Server product libraries can be set to the default.8 Verify additional installations by verifying the authority of the D_MIRROR profile, the attributes of the renamed subsystems,

and the library list of each additional installation.

Related Topics• Installing Transformation Server for AS/400 on page 17

© DataMirror Corporation, an IBM Company Printed in Canada 31

Page 32: Transformation Server for AS400 - Version 6.1

Creating Multiple Installations of Transformation Server

• Configuring Transformation Server to use TCP/IP on page 23

Verifying Additional Installations Verifying D_MIRROR User Profile—DataMirror recommends that you verify the D_MIRROR profile and make sure it has not changed since the last installation.Verifying attributes of renamed subsystems—DataMirror recommends that you ensure the renamed subsystem of the additional installation meets your needs. If you decide to change the name of a subsystem so that you can run Transformation Server on a different subsystem than the default, then verify the attributes of the subystem. For example, you may only want a certain number of jobs to load on your machine at a specific time and may want to configure the subsystem further to handle these objectives. Verify the library list of each additional install—Datamirror recommends that you ensure the job description specifies the correct library name in which you have installed Transformation Server. Transformation Server uses the configuration file DMCJOBD to identify libraries for executable programs and job queues.

Related Topics• To verify the authority of the D_MIRROR User Profile on page 32• To verify the attributes of the renamed subsystems on page 32• To verify the library list of each additional installation on page 33

To verify the authority of the D_MIRROR User Profile1 To verify the D_MIRROR user profile, issue the following command:

WRKOBJ OBJ(QSYS/D_MIRROR) OBJTYPE(*USRPRF)

The Work with Objects screen is displayed.2 Select Option 5 beside the user profile.

The Display Object Authority screen is displayed.3 Press F11.4 If the object authorities differ from the following, then issue the iSeries EDTOBJAUT command to make the necessary

changes.

To verify the attributes of the renamed subsystemsFor each renamed subsystem, you should verify that the subsystem attributes, such as authority levels, autostart entry, job queue entry, and routing entry, have been set properly. To check the subsystem attributes, issue the following command:DSPSBSD SBSD(<Transformation Server product library of additional installation>/<re-named subsystem of additional installation>)

User Group Object Authority

Object Operational

Object Existence

Object Management

Object Reference

Object Alter

QSECOFR *ALL X X X X

D_MIRROR USER DEF X X

*PUBLIC *EXCLUDE

32 Printed in Canada IBM DataMirror Transformation Server

Page 33: Transformation Server for AS400 - Version 6.1

Creating Multiple Installations of Transformation Server

To verify the library list of each additional installationFor each additional installation, you should verify that the job descriptions for DMCJOBD and DMTCPJOBD are correct. For each of the DMCJOBD and DMTCPJOBD job descriptions, issue the following command:DSPJOBD(<Transformation Server product library>/<job description name>)

If it is not correct, you can change the library list for the job description using the iSeries CHGJOBD command.

Running Additional Transformation Server InstallationsYou can run additional installations of Transformation Server.

Related TopicsTo run the additional installations on page 33

To run the additional installations1 Run the TCPLISTEN job manually after each subsystem has been re-named. To change to the current library of the additional

installation, issue the following command: CHGCURLIB (<Transformation Server product library for the additional installation>)

2 Start the TCPLISTEN job. You can issue the following command: STRDMTCP

3 Change to the new service name you specified for the additional installation

© DataMirror Corporation, an IBM Company Printed in Canada 33

Page 34: Transformation Server for AS400 - Version 6.1

Creating Multiple Installations of Transformation Server

34 Printed in Canada IBM DataMirror Transformation Server

Page 35: Transformation Server for AS400 - Version 6.1

Uninstalling Transformation Server for AS/400

Uninstalling Transformation Server for AS/400In this section, you will learn:• Before You Uninstall on page 35• Uninstalling Transformation Server on page 35• Removing the Transformation Server Service and Port Number on page 35

Before You UninstallBefore you can uninstall Transformation Server, you need to: • Sign on with a user profile that has specific authorities• End Transformation Server replication • End all Online Transformation Server activities• End journaling

To end journaling, issue the the following command:ENDJRNPF FILE(*ALL) JRN(<Transformation Server product library>/DMCJRN)

Related Topics• Step 1—Sign on with authorities on page 17• Step 1—End All Transformation Server Version 6.0 Replication on page 27• Step 2—End All Online Transformation Server Version 6.0 Activities on page 27

Uninstalling Transformation Server1 Ensure that you are in the Transformation Server product library. You can issue the following command:

CHGCURLIB CURLIB(<Transformation Server product library>)

2 To run the uninstall program, issue the following command:?UNINSTALL

After issuing the command, identify the Transformation Server installation that you want to remove by specifying the product and tutorial library names.

3 Press Enter to continue.4 Press Enter to uninstall Transformation Server.Note: If you had specified the name of an Independant Auxiliary Storage Pool (IASP) device during the installation,

then the installation program automatically creates the work library on the system ASP of the machine that is connected to the IASP device. You must manually delete the work library. The name of the work library is the first eight characters of your product library appended with 01. For example, TS60SP101.

Removing the Transformation Server Service and Port NumberAfter uninstalling Transformation Server, you should remove the ‘dmirror’ service and the port number you allocated. Related Topics• To remove ‘dmirror’ service on page 36• To remove the port number on page 36

© DataMirror Corporation, an IBM Company Printed in Canada 35

Page 36: Transformation Server for AS400 - Version 6.1

Uninstalling Transformation Server for AS/400

To remove ‘dmirror’ service1 On the command line, issue the following command:

CFGTCP

The Configure TCP/IP screen appears.2 Select Configure related tables (Option 21)3 Select Work with service table entries (Option 1)

The Work with Service Table Entries screen appears.

Locate the dmirror service and enter 4 in the Opt column.4 Press Enter to remove the service.

To remove the port number 1 On the command line, issue the following command:

CFGTCP

The Configure TCP/IP screen appears.2 Select Work with TCP/IP Port Restrictions (Option 4)

The Work with TCP/IP Port Restrictions screen appears.Enter 4 beside the port number used by Transformation Server.

3 Press Enter.If you have allocated port numbers for additional installations of Transformation Server, repeat the steps above to remove port number restrictions.

36 Printed in Canada IBM DataMirror Transformation Server

Page 37: Transformation Server for AS400 - Version 6.1

Installing and Configuring Transformation Server to Replicate Data from a Remote JournalRemote journaling is a System i feature that copies local journal entries to another system. Identical journal entries and receivers are added to another server. You can install and setup Transformation Server to support data replication from a remote journal. Setting up data replication for remote journaling improves system performance as replication jobs are running on another server and do not impact your production environment. When you install and setup Transformation Server to replicate from a remote journal, Transformation Server scrapes entries from the remote journal and applies the changes to any target system where Transformation Server is installed.The following topics are included:• Installing and Configuring Transformation Server to Replicate Data from a Remote Journal on page 39• Remote Journal Commands on page 47

© DataMirror Corporation, an IBM Company Printed in Canada 37

Page 38: Transformation Server for AS400 - Version 6.1

38 Printed in Canada IBM DataMirror Transformation Server

Page 39: Transformation Server for AS400 - Version 6.1

Installing and Configuring Transformation Server to Replicate Data from a Remote Journal

Installing and Configuring Transformation Server to Replicate Data from a Remote JournalIn a typical replication scenario where Transformation Server for AS/400 has been installed to replicate data from a local journal, you need to allocate at least a source system (your production database) and a target system that runs on any database platform supported by Transformation Server for AS/400. The source system is required so that Transformation Server for AS/400 can run SCRAPE and REFRESH jobs. The target system is required so that any Transformation Server product you have installed can receive the data and run APPLY jobs. In a replication scenario where Transformation Server for AS/400 has been setup to replicate data from a remote journal, you need to install Transformation Server for AS/400 on the system where your local journals reside, and install Transformation Server for AS/400 on the system where your remote journals reside. Also, you must install any Transformation Server product on any target database platform that can receive and apply data sent by Transformation Server for AS/400.The following image illustrates where Transformation Server for AS/400 replication jobs run when replicating from a remote journal.

The following sections refer to the system where your local journals reside as the Data Origin Server and refer to the system where your remote journals reside as the Source Server.In this section, you will learn:• About Installing Transformation Server for AS/400 on the Data Origin Server on page 40• About Installing Transformation Server for AS/400 on the Source Server on page 40• About Installing Transformation Server on the Target Server on page 41• Verifying the creation of the SQL package on the TS/400 Data Origin Server on page 41• D_MIRROR User Profile considerations for remote journals on page 41• Configuring Remote Journaling on page 42• Configuring TS/400 Source Server to retrieve source files from the TS/400 Data Origin Server on page 43

© DataMirror Corporation, an IBM Company Printed in Canada 39

Page 40: Transformation Server for AS400 - Version 6.1

Installing and Configuring Transformation Server to Replicate Data from a Remote Journal

About Installing Transformation Server for AS/400 on the Data Origin Server The Data Origin Server represents an AS/400/iSeries/System i production machine where your source files and local journal objects and receivers reside. You must install Transformation Server for AS/400 on this system when setting up replication from a remote journal. When you start the subsystem and the listener, Transformation Server only runs occassionally used service jobs and does not run replication jobs. When you install Transformation Server for AS/400 on the Data Origin Server, you must install Transformation Server for AS/400 in the same product library on the Source Server.Note: The following sections refer to this system as the TS/400 Data Origin Server to indicate that Transformation

Server for AS/400 must be installed.Note: After installing Transformation Server for AS/400 on the Data Origin Server, you must start the subsystem

and the listener.

Related Topics• To install Transformation Server for AS/400 on a Data Origin Server, see the steps in Installing Transformation Server for

AS/400 on page 17• After installing Transformation Server for AS/400 on each system, make sure you start the subsystem and the listener, see

Starting the Subsystem and the Listener on page 25

About Installing Transformation Server for AS/400 on the Source Server The Source Server represents a AS/400/iSeries/System i machine where your remote journal objects and receivers reside. In addition to installing on the Data Origin Server, you must install Transformation Server for AS/400 as a source product on this system when setting up replication from a remote journal. Transformation Server will run source replication jobs (SCRAPE and REFRESH). After installing Transformation Server for AS/400 on the Data Origin Server, you must install Transformation Server for AS/400 in the same product library on the Source Server.It is important to note that although your source files reside on the Data Origin Server, Transformation Server Management Console connects to the Source Server and uses this as the source datastore within a subscription. Using system parameters, you must configure your installation of Transformation Server for AS/400 on the Source Server to retrieve data from actual source files which reside on the Data Origin Server. Note: The following sections refer to this system as the TS/400 Source Server to indicate that Transformation

Server for AS/400 must be installed.Note: After installing Transformation Server for AS/400 on the Source Server, you must start the subsystem and

the listener.If the target files also reside on the same server (for example, the Source Server), then you will have to install another instance of Transformation Server for AS/400 on the same machine. In this scenario, you will have to install two instances of Transformation for AS/400 to run both source (SCRAPE and REFRESH) and target (APPLY) replication jobs.

Related Topics• To install Transformation Server for AS/400 on a Source Server, see the steps in Installing Transformation Server for AS/400

on page 17• After installing Transformation Server for AS/400 on each system, make sure you start the subsystem and the listener, see

Starting the Subsystem and the Listener on page 25

40 Printed in Canada IBM DataMirror Transformation Server

Page 41: Transformation Server for AS400 - Version 6.1

Installing and Configuring Transformation Server to Replicate Data from a Remote Journal

About Installing Transformation Server on the Target Server The Target Server represents your target system and can be any operating system and database supported by Transformation Server. When you start replication on the TS/400 Source Server and have added a remote journal to this system, Transformation Server receives and applies changes from the remote journal to your target files/tables. Transformation Server runs target replication jobs (APPLY) on this system. You can install any Transformation Server product on this system. It does not have to be Transformation Server for AS/400.Note: If you have installed Transformation Server for AS/400 on the Target Server, you must start the subsystem

and the listener. The following diagram illustrates on which system Transformation Server replication jobs run when you need to replicate from a remote journal.

Related Topics• If you have installed Transformation Server for AS/400 on the Target Server, make sure you start the subsystem and the

listener, see Starting the Subsystem and the Listener on page 25

Verifying the creation of the SQL package on the TS/400 Data Origin ServerAfter installing Transformation Server for AS/400 on the Data Origin Server, Source Server, and installing a Transformation Server product on the Target Server, you need to ensure that a SQL package named ‘DMS125SQL’ in the QGPL folder on the TS/400 Data Origin Server is created. When you start a refresh on the TS/400 Source Server, Transformation Server attempts to create this object if it does not exist and uses the SQL package to retrieve data from the source files on the TS/400 Data Origin Server.

To create the SQL package1 On the TS/400 Source Server, change the current library to the product library.2 At the command line, issue the following:

CRTSQLPKG PGM(<productlib>/DMS125) RDB(<rdb entry>) OBJTYPE(*SRVPGM)

The RDB entry must be a valid RDB entry on the TS/400 Source Server whose remote location is the TS/400 Data Origin Server. This RDB entry is the same value you specified in the System Parameter field ‘Remote DB Entry’ on the TS/400 Source Server.

3 Verify that a *SQLPKG named ‘DMS125SQL’ was created in the QGPL folder on the DOS system. Note: If the package is deleted for whatever reason, you must be re-create it before a performing a refresh on a

subscription. Note: To ensure that Transformation Server for AS/400 automatically creates this package whenever required, grant

the D_MIRROR userprofile *IOSYSCFG authority using the ‘CHGUSRPRF’ command. If this is done, no manual intervention is needed.

Related Topics• Installing and Configuring Transformation Server to Replicate Data from a Remote Journal on page 39

D_MIRROR User Profile considerations for remote journalsTransformation Server automatically creates a user profile called D_MIRROR during installation. Transformation Server uses this user profile to supervise replication operations. After installing Transformation Server for AS/400 on the Source Server and Data Origin Server, you need to make sure that the D_MIRROR user profile can access the objects you want to replicate on the TS/400 Data Origin Server.Grant the D_MIRROR user profile both the required Object operational and Object management authorities on the TS/400 Data Origin Server.

© DataMirror Corporation, an IBM Company Printed in Canada 41

Page 42: Transformation Server for AS400 - Version 6.1

Installing and Configuring Transformation Server to Replicate Data from a Remote Journal

Related Topics• Specifying D_MIRROR User Profile on page 15• Installing and Configuring Transformation Server to Replicate Data from a Remote Journal on page 39

Configuring Remote JournalingIn order for Transformation Server to process journal entries from a remote journal, you must configure remote journaling on your operating system. The examples in the following procedure illustrate the required parameters you must set on each system. See your iSeries documentation for a description of each command and a complete list of parameters.Before configuring remote journaling, make sure you have:• Installed Transformation Server for AS/400 on the Data Origin Server. The following procedure refers to this system as

TS/400 Data Origin Server.• Installed Transformation Server for AS/400 on the Source Server. The following procedure refers to this system as the TS/400

Source Server.

To configure remote journaling1 On the TS/400 Source Server, add a relational database directory entry by running the ADDRDBDIRE command.

Transformation Server requires that you give this database entry the same name as the name of the machine. For example, the following command creates the relational database directory entry on a machine named NEWYORK:> ADDRDBDIRE RDB(NEWYORK) RMTLOCNAME(*LOCAL)

2 On the TS/400 Data Origin Server, add a relational database entry for the database on the TS/400 Source Server by running the ADDRDBDIRE command. For example,> ADDRDBDIRE RDB(NEWYORK) RMTLOCNAME(192.168.0.10)

3 On the TS/400 Data Origin Server, identify the journal you want to use for remote journaling. For example, you may want to use TORLIB/MYJRN. If the journal does not exist, you can create the journal using the following commands: • Create a journal receiver by running the CRTJRNRCV command. For example, the following command creates a journal

receiver and has a threshold of 5000 KB:> CRTJRNRCV JRNRCV(TORLIB/MYJRNRCV) THRESHOLD(5000)

• Create a journal for the receiver by running the CRTJRN command. For example, the following command creates a journal:> CRTJRN JRN(TORLIB/MYJRN) JRNRCV(TORLIB/MYJRNRCV) MNGRCV(*SYSTEM)

4 On the TS/400 Data Origin Server, add a remote journal by running the ADDRMTJRN command. Transformation Server requires that you do the following for this command:• Set the relational database to the database directory entry you created in Step 1.• Set the names of the local journal and remote journal to the journal you created in Step 3. • Set the local journal library to the library of the journal you created in Step 3.• As a best practise, set the remote journal library to a library that is different from the local journal library.• Create both the local journal library and the remote journal library on the TS/400 Source Server.• Set the remote journal type to either *TYPE1 or *TYPE2.

For example, the following command creates the remote journal NYLIB/MYJRN on the TS/400 Source Server:> ADDRMTJRN RDB(NEWYORK) SRCJRN(TORLIB/MYJRN) TGTJRN(NYLIB/MYJRN) RMTRCVLIB (NYLIB) RMTJRNTYPE(*TYPE1)

42 Printed in Canada IBM DataMirror Transformation Server

Page 43: Transformation Server for AS400 - Version 6.1

Installing and Configuring Transformation Server to Replicate Data from a Remote Journal

5 On the TS/400 Data Origin Server, activate the remote journal by running the CHGRMTJRN command with the JRNSTATE(*ACTIVE) parameter. For example, the following command activates the remote journal:> CHGRMTJRN RDB(NEWYORK) SRCJRN(TORLIB/MYJRN) TGTJRN(NYLIB/MYJRN) JRNSTATE(*ACTIVE)

Related Topics• About Installing Transformation Server for AS/400 on the Data Origin Server on page 40• About Installing Transformation Server for AS/400 on the Source Server on page 40

Configuring TS/400 Source Server to retrieve source files from the TS/400 Data Origin Server After adding a remote journal and installing Transformation Server for AS/400 on the Source Server, you must do the following on the Source Server:• Add a relational database directory entry—This relational database directory entry must reference the Data Origin Server. • Enable Transformation Server to retrieve source files from the Data Origin Server—Using system parameters, you can

configure Transformation Server to use the IP address/hostname and port number of the Data Origin Server and to use the relational database directory entry that references this server.

Before configuring Transformation Server to retrieve source files from the Data Origin Server, make sure you have:• Installed Transformation Server for AS/400 on both the Data Origin Server and the Source Server. The following procedures

refer to these systems as the TS/400 Data Origin Server and the TS/400 Source Server.• Ensure that the iSeries user profile for both the Data Origin Server and the Source server have the same name. You will use

this user profile to connect to the replication agent you created on the Source server.

Related Topics• To add a replication agent in Access Manager, see Transformation Server Access Manager Configuration Guide.• To connect to a replication agent in Access Manager, see Specifying Database Access Parameters in the Transformation

Server Access Manager Configuration Guide.

To add a relational database directory that references the Data Origin Server1 On the TS/400 Source Server, add a relational database directory entry that references the database where the source files

reside on the TS/400 Data Origin Server by running the ADDRDBDIRE command. For example, if the name of the database on the TS/400 Data Origin Server is TORONTO, then the following command creates this relational database directory entry:> ADDRDBDIRE RDB(TORONTO) RMTLOCNAME(192.168.0.15)

2 On the TS/400 Data Origin Server, add a relational database entry that references the local database where the source files reside by running the ADDRDBDIRE command. For example,> ADDRDBDIRE RDB(TORONTO) RMTLOCNAME(*LOCAL)

Related Topics• About Installing Transformation Server for AS/400 on the Data Origin Server on page 40• About Installing Transformation Server for AS/400 on the Source Server on page 40

To enable the TS/400 Source Server to retrieve source files from the TS/400 Data Origin Server1 Ensure you have already created a publisher-type replication agent for TS/400 Source Server. You can create replication

agents in Access Manager. This replication agent will use the IP address/hostname and port number of the TS/400 Source Server.

© DataMirror Corporation, an IBM Company Printed in Canada 43

Page 44: Transformation Server for AS400 - Version 6.1

Installing and Configuring Transformation Server to Replicate Data from a Remote Journal

2 Start Transformation Server Management Console and connect to the publisher-type replication agent (displayed as a datastore) you created in Access Manager.

3 Add the following system parameters for the publisher-type replication agent (source datastore) you connected to:• Data Origin TCP/IP Name—Specify the IP address or hostname of the TS/400 Data Origin Server. This enables

Transformation Server (installed on the TS/400 Source Server) to use the IP address of the TS/400 Data Origin Server. For example, the IP address of the TS/400 Data Origin Server is ‘192.168.0.15’. This is the value you would enter for Data Origin TCP/Name system parameter.

• Data Origin Port—Specify the TCP listener port number of the TS/400 Data Origin Server. This enables Transformation Server (installed on the TS/400 Source Server) to use the port number of the TS/400 Data Origin Server.For example, the port number of the TS/400 Data Origin Server is ‘10101’. This is the value you would enter for Data Origin Port system parameter.

• Relational Database Directory Entry—Specify the relational database directory entry that you added for Transformation Server (installed on the TS/400 Source Server). This entry should reference the TS/400 Data Origin Server.For example, the relational database directory that references the database where the source files reside is ‘TORONTO’. This is the value you would enter for Relational Database Directory Entry system parameter.

44 Printed in Canada IBM DataMirror Transformation Server

Page 45: Transformation Server for AS400 - Version 6.1

Installing and Configuring Transformation Server to Replicate Data from a Remote Journal

The following diagram illustrates the system parameters you need to set on the Source System so that Transformation Server for AS/400 can retrieve source data on the Data Origin Server and the systems Management Console is connected to.

Related Topics• To install and start Access Manager, see Transformation Server Access Manager Installation Guide.• To create a replication agent, see Adding a New Replication Agent in Transformation Server Access Manager Configuration

Guide.• To install and start Transformation Server Management Console, see Installing Management Console in the Transformation

Server Management Console Administration Guide.• To connect to a datastore, see Connecting to a datastore in Transformation Server Management Console Administration

Guide.• To add system parameters, see Adding System Parameters in Transformation Server Management Console Administration

Guide.• For more information about the Data Origin TCP/IP Name system parameter, see Data Origin TCP/IP Name on page 134.• For more information about the Data Origin Port system parameter, see Data Origin Port on page 134.• For more information about the Relational Database Directory Entry system parameter, see Relational Database Directory

Entry on page 134.

© DataMirror Corporation, an IBM Company Printed in Canada 45

Page 46: Transformation Server for AS400 - Version 6.1

Installing and Configuring Transformation Server to Replicate Data from a Remote Journal

46 Printed in Canada IBM DataMirror Transformation Server

Page 47: Transformation Server for AS400 - Version 6.1

Remote Journal Commands

Remote Journal CommandsTransformation Server for AS/400 provides commands that let you manage the remote journal during replication. In this section, you will learn:• CHGJRNDM—Change Remote Journal Receivers on page 47• RTVDMJENT—Retrieve Transformation Server Remote Journal Entry on page 47• VFYTSJRN—Verify Remote Journal on page 48

CHGJRNDM—Change Remote Journal Receivers Transformation Server for AS/400 provides the CHGJRNDM command which lets you generate new journal receivers for a journal on the source server or delete processed and obsolete journal receivers. In a data replication scenario where Transformation Server has been installed and configured to replicate data from a remote journal, you can use the CHGJRNDM command to generate new or delete existing journal receivers when Transformation Server no longer needs them. You must run this command on Source Server where the remote journal resides and where Transformation Server for AS/400 has been installed as the source product. If you decide to delete a journal receiver, then Transformation Server deletes both the local and remote journal receivers. Note: Local journal receivers reside on your Data Origin Server and remote journal receivers reside on your

Source Server. Note: Transformation Server for AS/400 must be installed on both systems.

Related Topics• For more information about the Change Journal Receiver command, see CHGJRNDM—Change Journal Receivers on

page 90.• For a description of the Data Origin Server and Source Server , see About Installing Transformation Server for AS/400 on the

Data Origin Server and About Installing Transformation Server for AS/400 on the Source Server on page 40.

RTVDMJENT—Retrieve Transformation Server Remote Journal EntryTransformation Server for AS/400 provides the RTVDMJENT command which lets you determine whether a user-specified journal receiver is being used by Transformation Server. Based on a specified journal, this command returns the sequence number and journal receiver name of the last confirmed journal entry processed by Transformation Server.In a data replication scenario where Transformation Server has been installed and configured to replicate data from a remote journal, you can use the RTVDMJENT command to retrieve the sequence number and journal receiver name of the last confirmed journal entry.You must run this command on Source Server where the remote journal resides and where Transformation Server for AS/400 has been installed as the source product. Transformation Server returns the sequence number and journal receivers of the remote journal.Note: Local journal receivers reside on your Data Origin Server and remote journal receivers reside on your

Source Server.

Related Topics• For more information about the Retrieve Transformation Server Journal Entry command, see RTVDMJENT—Retrieve

Transformation Server Journal Entry on page 94.• For a description of the Data Origin Server and Source Server, see About Installing Transformation Server for AS/400 on the

Data Origin Server and About Installing Transformation Server for AS/400 on the Source Server on page 40.

© DataMirror Corporation, an IBM Company Printed in Canada 47

Page 48: Transformation Server for AS400 - Version 6.1

Remote Journal Commands

VFYTSJRN—Verify Remote JournalTransformation Server for AS/400 provides the VFYTSJRN command which lets you verify if the required journal exists for all tables you have selected for replication to the named subscription.In a data replication scenario where Transformation Server has been installed and configured to replicate data from a remote journal, you can use the VFYTSJRN command to verify if the remote journal exists on the Source Server. Note: Local journal receivers reside on your Data Origin Server and remote journal receivers reside on your

Source Server.

Related Topics• For more information about the Retrieve Transformation Server Journal Entry command, see VFYTSJRN—Verify Journal on

page 94.• For a description of the Data Origin Server and Source Server, see About Installing Transformation Server for AS/400 on the

Data Origin Server and About Installing Transformation Server for AS/400 on the Source Server on page 40.

48 Printed in Canada IBM DataMirror Transformation Server

Page 49: Transformation Server for AS400 - Version 6.1

Commands for Transformation ServerThe following topics introduce commands and the kind of commands available to you in Transformation Server for AS/400:• Command and Parameter Formats and Conventions on page 51• About Issuing Commands in Transformation Server for AS/400 on page 51• Replication Commands on page 53• Source Table Commands on page 61• Table Mapping Commands on page 75• Copy Subscription Commands on page 79• Promote Subscription Commands on page 83• Table-Level Operation Commands on page 87• Database Journal Commands on page 89• Communication Commands on page 97• End and Shut Down Transformation Server Commands on page 105• Other Commands on page 107

© DataMirror Corporation, an IBM Company Printed in Canada 49

Page 50: Transformation Server for AS400 - Version 6.1

50 Printed in Canada IBM DataMirror Transformation Server

Page 51: Transformation Server for AS400 - Version 6.1

Command and Parameter Formats and Conventions

Command and Parameter Formats and ConventionsFor each command that is described, the following items of information are provided, if applicable:• Command—Identifies the name of the command and lists the command parameters.• Description—Briefly explains what the command does when it is invoked.• Input Parameters—Describes each parameter in the command and identifies the values that can be specified.• Result—Specifies the information, if any, which is displayed on the screen as a result of running the command.• Examples—Provides one or more examples of invoking the command.• Use—Identifies limitations and recommendations that determine where and when the command can be invoked.• Related Topics—Identifies other commands that may be related in some way to the current command.

Conventions • Underline ( ___ ) indicates mandatory parameters..• Square brackets ( [ ] ) indicate an optional parameter sequence. If a parameter sequence is omitted, one or more default

values may be used.• Braces ( { } ) group multiple parameters together.• A vertical bar ( | ) indicates that only one of the parameters in the list can be selected. When one or more vertical bars appear

in a list of parameters that is enclosed by square brackets ( [ ] ), the choices are limited to the parameters in the list, but you have the option to not specify any of the parameter sequences.

• Ellipsis ( ... ) mean that a parameter or option can be repeated more than once.

About Issuing Commands in Transformation Server for AS/400You should note the following information about issuing commands in Transformation Server:• You can issue commands from an iSeries command line or include them in job schedulers or CL programs. Specific

restrictions may apply. • You can display the job log to verify operations and to view any errors.• When invoking any of the commands, you need to make sure that the current library (CHGCURLIB) is set to the

Transformation Server product library (the default product library is D_MIRROR). This includes the invocation of commands outside of Transformation Server (for example, commands invoked via CL programs, Submit Job, iSeries job scheduled entry, or third party job scheduler).

• You can also issue equivalent commands remotely from client workstations running Management Console. Instead of issuing Transformation Server commands on each server, you can apply Management Console commands to specific servers in your replication configuration from a client workstation. For information about issuing Management Console commands, see the Transformation Server Management Console Commands Reference.

© DataMirror Corporation, an IBM Company Printed in Canada 51

Page 52: Transformation Server for AS400 - Version 6.1

About Issuing Commands in Transformation Server for AS/400

52 Printed in Canada IBM DataMirror Transformation Server

Page 53: Transformation Server for AS400 - Version 6.1

Replication Commands

Replication CommandsIn this section, you will learn about commands that control replication:• ENDDTAMIR—End Continuous Mirroring on page 53• ENDDTAMIR—End Net Change Mirroring on page 54• ENDDTARSH—End Data Refresh on page 55• STRDTARSH—Start Data Refresh on page 55• STRDTAMIR—Start Continuous Mirroring on page 56• STRDTAMIR—Start Net Change Mirroring on page 58

ENDDTAMIR—End Continuous Mirroring Use this command to end mirroring on a subscription. This command ends continuous mirroring.Command Syntax

ENDDTAMIR TARGET( ) [ENDTYP( )]Applies To

Source

ResultMessages are placed in the Event Log.

Examples• ENDDTAMIR TARGET(SUB1)

Parameter Description

TARGET Always required.Specifies the name of the subscription. This must be the same name defined in Transformation Server Management Console. Enter one of the following:• The name of a subscription • Generic names of subscriptions (for example 'abc*' specifies all subscriptions

starting with abc) • *ALL (all subscriptions).

ENDTYP Indicates how you want to end replication. You can end replication immediately or when Transformation Server completes replication (controlled). Enter one of the following:• *CNTRLD (controlled): Replication is ended when Transformation Server completes

replication. This is the recommended setting.• *IMMED (immediate): Mirroring is ended immediately. Use this setting only if you

cannot end data mirroring in a controlled manner.Default Setting

*CNTRLD

© DataMirror Corporation, an IBM Company Printed in Canada 53

Page 54: Transformation Server for AS400 - Version 6.1

Replication Commands

Transformation Server ends continuous mirroring on source tables selected to subscription SUB1 in a controlled manner.• ENDDTAMIR TARGET(SUB1) ENDTYP(*IMMED)

Transformation Server ends continuous mirroring on source tables selected to subscription SUB1 immediately.• ENDDTAMIR TARGET(*ALL) ENDTYP(*IMMED)

Transformation Server ends continuous mirroring of source tables to all subscriptions immediately.

ENDDTAMIR—End Net Change MirroringUse this command to end net change mirroring on a subscription. For more information about net-change mirroring, see Transformation Server Management Console Administration Guide.Command Syntax

ENDDTAMIR TARGET( ) [ENDTYP( )]Applies To

Source

• ENDDTAMIR TARGET(SUB1)Transformation Server ends net-change mirroring on subscription SUB1 in a controlled manner.

• ENDDTAMIR TARGET(SUB1) ENDTYP(*IMMED)Transformation Server ends net-change mirroring on subscription SUB1 immediately.

• ENDDTAMIR TARGET(*ALL) ENDTYP(*IMMED)Transformation Server ends net-change mirroring on subscriptions immediately.

Parameter Description

TARGET Always required.Specifies the name of the subscription. This must be the same name defined in Transformation Server Management Console. Enter one of the following:• The name of a subscription • Generic names of subscriptions (for example 'abc*' specifies all subscriptions

starting with abc) • *ALL (all subscriptions).

ENDTYP Indicates how you want to end replication. You can end replication immediately or when Transformation Server completes replication (controlled). Enter one of the following:• *CNTRLD (controlled): Replication is ended when Transformation Server completes

replication. This is the recommended setting.• *IMMED (immediate): Mirroring is ended immediately. Use this setting only if you

cannot end data mirroring in a controlled manner.Default Setting

*CNTRLD

54 Printed in Canada IBM DataMirror Transformation Server

Page 55: Transformation Server for AS400 - Version 6.1

Replication Commands

ENDDTARSH—End Data RefreshUse this command to specify how you want Transformation Server to end a refresh operation to the specified target table. By default, Transformation Server ends a refresh operation to the target table in a controlled manner.

Command Syntax

ENDDTARSH TARGET( ) [ENDTYP( )]Applies To

SourceParameters

ResultNone

Examples• ENDDTARSH TARGET(SUB1)

Transformation Server ends the refresh on subscription SUB1 end in a controlled manner.• ENDDTARSH TARGET(SUB1) ENDTYP(*IMMED)

Transformation Server ends the refresh on subscription SUB1 immediately.• ENDDTARSH TARGET(*ALL) ENDTYP(*IMMED)

Transformation Server ends the refresh on all subscriptions immediately.

STRDTARSH—Start Data RefreshUse this command to start a refresh on a subscription.

Parameters Description

TARGET Always required.Specifies the name of the subscription. This must be the same name defined in Transformation Server Management Console. Enter one of the following:• The name of a subscription • Generic names of subscriptions (for example 'abc*' specifies all subscriptions starting

with abc) • *ALL (all subscriptions).

ENDTYP Indicates how you want to end replication. You can end replication immediately or when Transformation Server completes replication (controlled). Enter one of the following:• *CNTRLD (controlled): Specifies a controlled end to a refresh. This is the recommended

setting.• *IMMED (immediate): Transformation Server ends a refresh immediately.Default Setting

*CNTRLD

© DataMirror Corporation, an IBM Company Printed in Canada 55

Page 56: Transformation Server for AS400 - Version 6.1

Replication Commands

Depending on the value set for the Allow Refresh While Active system parameter, Transformation Server can allocate and exclude source tables until it completes a refresh operation. This ensures complete synchronization between the source and target tables. As a result, you should schedule a refresh so as not to interfere with normal operations. For more information about the Allow Refresh While Active system parameter, see the Allow Refresh While Active on page 131.Command Syntax

STRDTARSH TARGET( ) [TABLES( )]

Result Messages are placed in the Event Log.

Examples • STRDTARSH TARGET(SUB1)

Transformation Server refreshes all target tables that have a status of Refresh on subscription SUB1.• STRDTARSH TARGET(SUB1) TABLES(*ALL)

Transformation Server refreshes all target tables on subscription SUB1.• STRDTARSH TARGET(*ALL) TABLES(*FLAG)

Transformation Server refreshes all target tables flagged for a refresh on all subscriptions.

STRDTAMIR—Start Continuous MirroringUse this command to start mirroring on a subscription. This command initiates mirroring for any subscription with a replication method of Mirror and a status of Refresh or Active. Before Transformation Server starts mirroring, all tables with replication method set to Mirror and status set to Refresh are initially refreshed to the target system.Command Syntax

STRDTAMIR TARGET( ) [IDLE( )] [FORMAT( )]

Parameters Description

TARGET Always required.Specifies the name of the subscription. This must be the same name defined in Transformation Server Management Console. Enter one of the following:• The name of a subscription • Generic names of subscriptions (for example abc* specifies all subscriptions starting with

abc) • *ALL (all subscriptions).

TABLES Indicates which tables will be refreshed.Enter one of the following values:• *ALL

All source tables selected to the subscription(s) will be refreshed.• *FLAG

Only tables that have a status of Refresh will be refreshed.Default Setting—*FLAG

56 Printed in Canada IBM DataMirror Transformation Server

Page 57: Transformation Server for AS400 - Version 6.1

Replication Commands

Applies ToSource

ResultMessages are placed in the Event Log.

Examples• STRDTAMIR TARGET(SUB1)

Starts continuous mirroring on subscription SUB1. Transformation Server starts continuous mirroring on tables that have a replication method set to mirroring, and a table status set to Refresh or Active. Transformation Server continues to monitor the journal for activity after all available data has been mirrored.

• STRDTAMIR TARGET(SUB1) IDLE(*WAIT) FORMAT(*NO)Starts continuous mirroring on subscription SUB1. Tranformation Server starts continuous mirroring of tables that have a replication method set to mirroring, and a table status set to Refresh or Active. Transformation Server continues to monitor the journal for activity after all available data has been mirrored.

Parameters Description

TARGET Always required.Specifies the name of the subscription. This must be the same name defined in Transformation Server Management Console. Enter one of the following:• The name of a subscription • Generic names of subscriptions (for example abc* specifies all subscriptions starting with

abc) • *ALL (all subscriptions).

IDLE Specifies the action that Transformation Server will take when it determines that all available data has been replicated to the target.Enter one of the following values:• *WAIT

Transformation Server replication process remains active after all changes are replicated to the target.

• *END Transformation Server replication process ends after all changes are replicated to the target.

Default Setting—*WAIT

FORMAT Indicates if Transformation Server should start continuous mirroring.Enter one of the following values:• *ONLY

Indicates that Transformation Server will not start continuous mirroring.• *NO

Indicates that Transformation Server will start continuous mirroring.Default Setting—*NO

© DataMirror Corporation, an IBM Company Printed in Canada 57

Page 58: Transformation Server for AS400 - Version 6.1

Replication Commands

• STRDTAMIR TARGET(*ALL) IDLE(*WAIT) FORMAT(*NO)Starts continuous mirroring on all subscriptions. Transformation Server starts continuous mirroring of tables that have a replication method set to mirroring, and a table status set to Refresh or Active. Transformation Server continues to monitor the journal for activity after all available data has been mirrored.

STRDTAMIR—Start Net Change MirroringUse this command to start net change mirroring on a subscription. This command starts mirroring of any table with a replication method set to mirroring, and a table status set to Refresh or Active. For information about net change mirroring, see the Transformation Server Management Console Administration Guide.Command Syntax

STRDTAMIR TARGET( ) [IDLE( )] [FORMAT( )]Applies To

Source

Parameters Description

TARGET Always required.Specifies the name of the subscription. This must be the same name defined in Transformation Server Management Console. Enter one of the following:• The name of a subscription • Generic names of subscriptions (for example abc* specifies all subscriptions starting with

abc) • *ALL (all subscriptions).

58 Printed in Canada IBM DataMirror Transformation Server

Page 59: Transformation Server for AS400 - Version 6.1

Replication Commands

Examples• STRDTAMIR TARGET(SUB1) IDLE(*END)

Transformation Server starts net change mirroring on subscription SUB1. All Transformation Server processes end after all available data has been mirrored.

• STRDTAMIR TARGET(SUB1) IDLE(*END) FORMAT(*NO)Transformation Server starts net change mirroring on subscription SUB1. All Transformation Server processes end after all available data has been mirrored.

• STRDTAMIR TARGET(*ALL) IDLE(*END) FORMAT(*NO)Transformation Server starts net change mirroring on all subscriptions. All Transformation Server processes end after all available data has been mirrored.

IDLE Specifies the action that Transformation Server will take when it determines that all available data has been replicated to the target.Enter one of the following values:• *WAIT

Transformation Server replication process will remain active after all changes have been replicated.

• *END Transformation Server replication process will end after all changes have been replicated.

Default Setting—*WAIT

Note: If you want to start net-change mirroring, you must specify *END.

FORMAT Indicates if Transformation Server should start continuous mirroring.Enter one of the following values:• *ONLY

Indicates that Transformation Server will not start continuous mirroring.• *NO

Indicates that Transformation Server will start continuous mirroring.Default Setting—*NO

Note: If you want to start net change mirroring, you must specify *NO.

Parameters Description

© DataMirror Corporation, an IBM Company Printed in Canada 59

Page 60: Transformation Server for AS400 - Version 6.1

Replication Commands

60 Printed in Canada IBM DataMirror Transformation Server

Page 61: Transformation Server for AS400 - Version 6.1

Source Table Commands

Source Table CommandsIn this section, you will learn about commands that let you manage your source tables in a subscription.• ADDTBL—Add Tables on page 61• CHGREPMTD—Change Replication Method on page 62• DSLTGTTBL—Deselect Source Tables on page 63• READDTBL—Update Definition of Source Tables on page 64• RMVTBL—Remove Tables on page 64• STRDTAMIR—Describe Source Tables to Target Tables on page 65• SETMIRSTS—Set Table Status for Mirroring on page 66• SETRSHSTS—Set Table Status for Refresh on page 68• SLTTGTTBL—Select Source Tables for Replication on page 69• SETTSSYNC—Set Synchronization Point on page 72• SETJRNPOS—Set Journal Position on page 72

ADDTBL—Add TablesUse this command to add source tables to the catalog for possible replication. You can add individual tables, generic groups of tables, or all tables within a library with a single execution of this command. After adding the tables you want to replicate, you need to select the table for replication using the SLTTGTTBL command. For more information, see the SLTTGTTBL—Select Source Tables for Replication on page 69. You can remove added tables by using the RMVTBL command. For more information, see the RMVTBL—Remove Tables on page 64.Command Syntax

ADDTBL TABLE()

Applies To

Source

Result Relevant messages are produced to the job log.

Examples ADDTBL TABLE(PRODLIB/CUSTOMER)Adds the source table named CUSTOMER that resides in library PRODLIB to the catalog.ADDTBL TABLE(DTUTOR/*ALL)Adds all source tables that reside in library DTUTOR to the catalog.

Parameters Description

TABLE The name of the source table to add to the Source Tables area in Management Console. Enter the name of a table, a generic name (for example, abc* specifies all tables starting with abc), or the following value:*ALL – Specifies all source tables in the library.The name of the library where the table resides must precede the source table specification. For example, PRODLIB/CUSTOMER.

© DataMirror Corporation, an IBM Company Printed in Canada 61

Page 62: Transformation Server for AS400 - Version 6.1

Source Table Commands

CHGREPMTD—Change Replication MethodUse this command to change the replication method of a source table in a subscription. If you want to change the replication method of multiple source tables, then you need to issue this command for each one. You can change the replication method for invidual source tables, generic groups source tables, or all source tables within a library.Command Syntax

CHGREPMTD TARGET() TABLE() REPMTD() UPDMTD()

Applies ToSource

Default SettingNot Applicable

Parameters Description

TARGET Always required.Specifies the name of the subscription to which the source table belongs. The name of the subscription is defined in Transformation Server Management Console.

TABLE Always required.The name of the source table. Enter one of the following values:• The name of a source table • Generic names (for example 'abc*' specifies all source tables starting with abc)• *ALL (all source tables in a library) Note: Identify the name of the library for each source table. Specify the library

and then the source table.

REPMTD Always required.Specifies the replication method that you want to use.Enter one of the following values:• *REFRESH

Specifies replication by refresh.• *MIRROR

Specifies replication by mirroring.

UPDMTD Always required.Specifies the update method you want Transformation Server to use when applying data to the target.Enter one of the following values:• *KEYED

Specifies that Transformation Server will apply data using unique keys.• *RRN

Specifies that Transformation Server will apply data using relative record numbers.

62 Printed in Canada IBM DataMirror Transformation Server

Page 63: Transformation Server for AS400 - Version 6.1

Source Table Commands

ResultThe next time you start replication, Transformation Server applies data using the new replication method. When you issue this command, you should see the appropriate messages in the Event Log.

Examples• CHGREPMTD TARGET(SUB1) TABLE(DTUTOR/CUSTOMER) REPMTD(*REFRESH) UPDMTD(*KEYED)

The source table CUSTOMER (in library DTUTOR) has its replication method changed to *REFRESH in the subscription (SUB1).Transformation Server will update the target table using unique keyed access paths. Since the replication method is *REFRESH, this parameter is not applicable in this command invocation.

• CHGREPMTD TARGET(SUB1) TABLE(DTUTOR/*ALL) REPMTD(*MIRROR) UPDMTD(*KEYED)All source tables (in library DTUTOR) have their replication methods changed to *MIRROR in the subscription (SUB1). Transformation Server will update the target table using unique keyed access paths.

• CHGREPMTD TARGET(SUB1) TABLE(DTUTOR/SALES) REPMTD(*MIRROR) UPDMTD(*RRN)The source table SALES (in library DTUTOR) has its replication method changed to *MIRROR in the subscription (SUB1). Transformation Server will update the target table using its relative record number.

DSLTGTTBL—Deselect Source TablesUse this command to de-select a source table from a subscription. After deselecting a source table, you cannot replicate this source table to the target. You can de-select individual tables, generic groups of tables or all tables in a library from a subscription with a single execution of this command. Only tables that have already been selected for replication are affected by this command.Command Syntax

DSLTGTTBL TARGET()TABLE()

Applies To

Source

Result Relevant messages are produced to the job log.

Examples DSLTGTTBL TARGET(SUB1) TABLE(DTUTOR/*ALL)All source tables in library DTUTOR selected to subscription SUB1 are deTransformation selected.DSLTGTTBL TARGET(SUB1) TABLE(DTUTOR/CUSTOMER)

Parameters Description

TARGET The name of the subscription, as defined in Management Console, to which the source table is selected. For information about subscriptions, see the Transformation Server Management Console Administration Guide.

TABLE The name of the source table that is de-selected from the subscription.Enter the name of a table, a generic name (for example, abc* specifies all tablesstarting with abc), or the following value:*ALL – Specifies all tables in the library that are selected to the subscription.The name of the library where the table resides must precede the source tablespecification.

© DataMirror Corporation, an IBM Company Printed in Canada 63

Page 64: Transformation Server for AS400 - Version 6.1

Source Table Commands

Source table CUSTOMER in library DTUTOR selected to subscription SUB1 is deselected.

READDTBL—Update Definition of Source TablesUse this command when you have changed the definition of a source table after the table has been added to the Transformation Server metadata tables (or the Source Tables are of the Transformation Server Management Console). These changes can include adding new columns, or modifying the column name, type, or length. This command modifies the source table definition stored within Transformation Server accordingly. After issuing this command, you need to re-describe the source table definition to all required target systems. For more information, see STRDTAMIR—Describe Source Tables to Target Tables on page 65. You then need to map this source table to the target table to link the source and target table definitions. For more information, see ASNTGTTBL—Map Source and Target Tables on page 75.Warning: This command disables mirroring for all subscription that use mirroring as the mode of replication. Before

issuing this command, you should perform a refresh on the subscription to ensure that the source and target tables are synchronized.

Command SyntaxREADDTBL TABLE()LIB()

Applies To Source

ResultTransformation Server adds the source table to the metadata table. If you are using

Transformation Server Management Console, you should see the table in the Source Tables area. Also, when you issue this command, you should see relevant messages in the Event Log.

ExamplesREADDTBL TABLE(MYSRCTABLE) LIB(MYLIB)Changes the definition of MYSRCTABLE which resides in MYLIB.

RMVTBL—Remove TablesUse this command to remove source tables that were added to a catalog for possible replication. For more information about adding tables, see the ADDTBL command. You can remove individual tables, generic groups of tables or all tables in a library with a single execution of this command. Only source tables that have been added are considered when you issue this command.Before using this command to remove the source tables, you should de-assign target tables and de-select source tables. For more information about deassigning tables, see the DASTGTTBL—Unmap Source and Target Tables on page 77. For more information about deselecting tables, see the DSLTGTTBL—Deselect Source Tables on page 63.Command Syntax

RMVTBL TABLE( ) [ENDJRN( )]

Parameters Description

TABLE The name of the source table that you have updated and want to make available for replication by either:• Adding it Transformation Server metadata (using the command line).• Adding it to the source tables area in the Transformation Server Management Console

(using the Management Console GUI).

LIB The name of the library in which the updated source table resides.

64 Printed in Canada IBM DataMirror Transformation Server

Page 65: Transformation Server for AS400 - Version 6.1

Source Table Commands

Applies To

Source

Result Relevant messages are sent to the job log.

Examples RMVTBL TABLE(DTUTOR/SALES)Source table SALES in library DTUTOR is removed from the catalog.Journaling is stopped for the SALES table.RMVTBL TABLE(DTUTOR/*ALL) ENDJRN(Y)All added source tables in library DTUTOR are removed from the catalog.Journaling is stopped for the removed source tables in library DTUTOR.RMVTBL TABLE(DTUTOR/CUSTOMER) ENDJRN(N)Source tableublication table CUSTOMER in library DTUTOR is removed from the catalog.Journaling continues for the CUSTOMER table.

STRDTAMIR—Describe Source Tables to Target TablesUse this command when you have updated the definition of your source table. Command Syntax

STRDTAMIR TARGET() [IDLE()] [FORMAT()]

Applies To

Parameters Description

TABLE The name of the source table that is removed from the catalog.Enter the name of a table, a generic name (for example, abc* specifies all tablesstarting with abc), or the following value:*ALL – Specifies all added tables in the library.The name of the library where the table resides must precede the source tablespecification.

ENDJRN Indicates whether or not journaling to the default Transformation Server journal shouldstop or continue for the specified table.Specify one of the following values:Y – Specifies that journaling stop for the specified table.N – Specifies that journaling continue for the specified table.Default Setting: YThis parameter does not have any effect if a user-defined journal, as opposed to thedefault journal, is being used.

© DataMirror Corporation, an IBM Company Printed in Canada 65

Page 66: Transformation Server for AS400 - Version 6.1

Source Table Commands

Source

Result None.Examples• STRDTAMIR TARGET(SUB1) IDLE(*END) FORMAT(*ONLY)

Sends definitions of all source tables selected to subscription SUB1. After the transfer has been completed, all Transformation Server jobs end.

• STRDTAMIR TARGET(*ALL) IDLE(*END) FORMAT(*ONLY)Sends definitions of all source tables selected to all subscriptions. After the transfer has been completed, all Transformation Server jobs end.

SETMIRSTS—Set Table Status for MirroringUse this command to change the status of a table that you have selected for mirroring.Warning: You must stop replication before you can issue this command.

Parameters Description

TARGET Always required.Specifies the name of the subscription. The name of the subscription is defined in Transformation Server Management Console.Enter one of the following:• The name of a subscription • Generic names (for example 'abc*' specifies all subscriptions starting with abc)• *ALL (all subscriptions)

IDLE Specifies the action that Transformation Server will take when it determines that all definitions have been sent to the subscription.Enter one of the following values:• *WAIT

Transformation Server will remain active after all source tables have been described.• *END

Transformation Server will end after all source tables have been described.Default Setting—*WAIT

FORMAT Specify one of the following values:• *NO

Indicates that Transformation Server will start mirroring without sending the updated source table definition to the target.

• *ONLY

Indicates Transformation Server will send the updated source table definition to the target but will not start mirroring.

Default Setting—*NO

66 Printed in Canada IBM DataMirror Transformation Server

Page 67: Transformation Server for AS400 - Version 6.1

Source Table Commands

Command SyntaxSETMIRSTS TARGET() TABLE() [STATUS()]

Applies ToSource

Result Transformation Server changes the status of a source table you set for mirroring to either idle, refresh, or active. You should also receive the apprioprate messages in the Event Log.

Examples• SETMIRSTS TARGET(SUB1) TABLE(DTUTOR/SALES)

Sets the status of the selected source table SALES (in library DTUTOR) to Refresh (*RFSH). The status change applies to the SALES source table selected to the subscription SUB1 for mirroring.

• SETMIRSTS TARGET(SUB1) TABLE(PRODLIB/CUSTOMER) STATUS(*ACTV)

Parameters Description

TARGET Always required.Specifies the name of the subscription to which the source table belongs. The name of the subscription is defined in Transformation Server Management Console.Enter one of the following values:• The name of a subscription• Generic names (for example 'abc*' specifies all subscriptions tables starting with abc)• *ALL (all subscriptions)

TABLE Always required.Enter one of the following:• The name of a source table• Generic names (for example, 'abc*' specifies all source tables starting with abc)• *ALL (all source tables in the library that are mapped to target tables in a subscription)Note: Identify the name of the library for each source table. Specify the library

and then the source table.

STATUS Specifies the status of the selected source table.Enter one of the following values:• *IDLE

Sets the status to Idle (inactive).• *RFSH

Sets the status to Refresh (refresh before mirroring).• *ACTV

Sets the status to Active (mirroring). Set the status to *ACTV only when the target table is synchronized with the source table.

Default Setting—*RFSH

© DataMirror Corporation, an IBM Company Printed in Canada 67

Page 68: Transformation Server for AS400 - Version 6.1

Source Table Commands

Sets the status of the selected source table CUSTOMER (in library PRODLIB) to Active (*ACTV). The status change applies to the CUSTOMER source table selected to the subscription SUB1 for mirroring.

• SETMIRSTS TARGET(*ALL) TABLE(PRODLIB/CUSTOMER) STATUS(*IDLE)Sets the status of the selected source table CUSTOMER (in library PRODLIB) to Idle (*IDLE). The status change applies to all CUSTOMER source tables selected to any subscription for mirroring.

• SETMIRSTS TARGET(*ALL) TABLE(*ALL/*ALL) STATUS(*RFSH)Sets the status of all selected source tables (in all libraries) to Refresh (*RFSH). The status change applies to all source tables selected to any subscription for mirroring.

SETRSHSTS—Set Table Status for RefreshUse this command to change the status of a selected table or group of tables that you want to refresh. Only tables that will be refreshed are considered in this command. Tables that will be mirrored are ignored. For more information on how to start mirroring, see the STRDTAMIR—Start Continuous Mirroring on page 56.Warning: You must stop replication before you can issue this command.Command Syntax

SETRSHSTS TARGET( ) TABLE( ) [STATUS( )]Applies To

Source

Parameters Description

TARGET Always required.Specifies the name of the subscription to which the source table belongs. The name of the subscription is defined in Transformation Server Management Console.Enter one of the following values:• The name of a subscription• Generic names (for example 'abc*' specifies all subscriptions tables starting with abc)• *ALL (all subscriptions)

TABLE Always required.Enter one of the following:• The name of a source table• Generic names (for example, 'abc*' specifies all source tables starting with abc)• *ALL (all source tables in the library that are mapped to target tables in a subscription)Note: Identify the name of the library for each source table. Specify the library

and then the source table.

STATUS Specifies the status of the selected source table.Enter one of the following values:• *IDLE

Sets the status to Idle (do not refresh).• *RFSH

Sets the status to Refresh.

68 Printed in Canada IBM DataMirror Transformation Server

Page 69: Transformation Server for AS400 - Version 6.1

Source Table Commands

Result NoneExamples• SETRSHSTS TARGET(SUB1) TABLE(DTUTOR/SALES)

Sets the status of the selected source table SALES (in library DTUTOR) to Refresh (*RFSH). The status change applies to the SALES source table selected to subscription SUB1 for refresh.

• SETRSHSTS TARGET(SUB1) TABLE(PRODLIB/CUSTOMER) STATUS(*IDLE)Sets the status of the selected source table CUSTOMER (in library PRODLIB) to Idle (*IDLE). The status change applies to the CUSTOMER source table selected to subscription SUB1 for refresh.

• SETRSHSTS TARGET(*ALL) TABLE(PRODLIB/CUSTOMER) STATUS(*RFSH)Sets the status of the selected source table CUSTOMER (in library PRODLIB) to Refresh (*RFSH). The status change applies to all CUSTOMER source tables selected to any subscription for refresh.

• SETRSHSTS TARGET(*ALL) TABLE(*ALL/*ALL) STATUS(*RFSH)Sets the status of all selected source tables (in all libraries) to Refresh (*RFSH). The status change applies to all source tables selected to any subscription for refresh.

SLTTGTTBL—Select Source Tables for ReplicationUse this command to select a source table for replication to a subscription. You can select individual tables, generic groups of tables, or all tables within a library to one subscription with a single execution of this command. Only tables that have been added to the catalog and not already selected to the subscription are considered when you issue this command.For multiple member files, all members are selected by default. After selecting the source tables you want to replicate, subscription metadata needs to be described to the subscriber using the STRDTAMIR command. Then the source tables need to be assigned to the target tables using the ASNTGTTBL command on the subscriber. For more information, see ASNTGTTBL—Map Source and Target Tables on page 75.You cannot configure unicode handling and MBCS with this command. By default, this command will pick up the default unicode and MBCS settings which you can configure in Management Console. See the Transformation Server Management Console Administration Guide for more information.Command Syntax

SLTTGTTBL TARGET( ) TABLE( ) REPMTD( ) UPDMTD( ) INITSTS( ) [ROWSELTYP( ) ROWSELEXP( )]Applies To

© DataMirror Corporation, an IBM Company Printed in Canada 69

Page 70: Transformation Server for AS400 - Version 6.1

Source Table Commands

Source

Parameters Description

TARGET Always required.Specifies the name of the subscription to which the source table belongs. The name of the subscription is defined in Transformation Server Management Console.Enter one of the following values:• The name of a subscription• Generic names (for example 'abc*' specifies all subscriptions tables starting with abc)• *ALL (all subscriptions)

TABLE Always required.Enter one of the following:• The name of a source table• Generic names (for example, 'abc*' specifies all source tables starting with abc)• *ALL (all source tables in the library that are mapped to target tables in a subscription)Note: Identify the name of the library for each source table. Specify the library

and then the source table.

REPMTD The replication method of the selected source table.Enter one of the following values:• *REFRESH

Specifies replication by refresh.• *MIRROR

Specifies replication by mirroring.

UPDMTD The update method Transformation Server uses to apply mirrored data to the target. This parameter applies only if you selected mirroring for the source table.Enter one of the following values:• *KEYED

Indicates that Transformation Server is applying data is using unique access paths.• *RRN

Indicates that Transformation Server is applying data using relative record numbers.

70 Printed in Canada IBM DataMirror Transformation Server

Page 71: Transformation Server for AS400 - Version 6.1

Source Table Commands

ResultMessages are sent to the Event Log.

Examples• SLTTGTTBL TARGET(SUB1) TABLE(DTUTOR/*ALL) REPMTD(*MIRROR) UPDMTD(*KEYED) INITSTS(*ACTIVE)

Selects all source tables (in library DTUTOR) to subscription SUB1. The replication method for the tables is mirroring. The update method is by unique access paths. The initial status for the tables is Active (*ACTIVE). This means that an initial refresh is not performed before mirroring begins. A row selection expression is not defined for each source table in library DTUTOR.

• SLTTGTTBL TARGET(SUB1) TABLE(DTUTOR/AP*) REPMTD(*MIRROR) UPDMTD(*RRN) INITSTS(*REFRESH) ROWSELTYP(*OMIT) ROWSELEXP("STATE =NY")Selects all source tables starting with the letters AP (in library DTUTOR) to subscription SUB1. The replication method for the tables is mirroring. The update method is by relative record number. The initial status for the tables is Refresh (*REFRESH). This ensures that the table is refreshed before mirroring begins. A row selection expression is defined for each source table. Only rows in the source tables where STATE is not set to NY are replicated.

• SLTTGTTBL TARGET(SUB1) TABLE(DTUTOR/CUSTOMER) REPMTD(*REFRESH) INITSTS(*REFRESH) ROWSELTYP(*SELECT) ROWSELEXP("SALES > 10000")

INITSTS The initial status of the selected source table.Enter one of the following values:• *IDLE

Specifies a status of Idle.• *REFRESH

Specifies a status of Refresh.• *ACTIVE

Specifies a status of Active.Note: If the replication method is *REFRESH (see REPMTD parameter above),

then values of *IDLE or *REFRESH are allowed. If the replication method is *MIRROR (see REPMTD parameter above), then all values are valid. The actions performed as a result of table status differ across replication methods (refresh or mirroring).

ROWSELTYP The type of row selection applied to the source table.Specify one of the following values:• *SELECT

Replicate rows that satisfy the row selection expression.• *OMIT

Do not replicate rows that satisfy the row selection expression. All other rows that do not satisfy the row selection expression are replicated.

ROWSELEXP The row selection expression that determines which rows in the source table are replicated. You must enter a row selection expression based on columns in the source table.

Parameters Description

© DataMirror Corporation, an IBM Company Printed in Canada 71

Page 72: Transformation Server for AS400 - Version 6.1

Source Table Commands

Selects the source table CUSTOMER (in library DTUTOR) to subscription SUB1. The replication method for the table is refresh. The initial status for the table is Refresh (*REFRESH). This ensures that the table is refreshed. A row selection expression is defined for the CUSTOMER table. Only rows in the CUSTOMER table where SALES is greater that 10,000 are replicated.

SETTSSYNC—Set Synchronization PointUse this command to synchronize mirroring to start at the earliest backup point for all tables selected to the named subscription. This command is to be used when it is necessary to start mirroring from the time that the last backup was performed. The earliest backup point is determined by identifying the time and date of the most recent ‘file save’ journal entry for all journals associated with the selected tables. The earliest timestamp determines the backup point. In each journal, SETTSSYNC sets the journal position to this backup point. When mirroring is started, the sequence of journal entries following the backup point are read.Only tables that are mirrored (by unique key or relative record number) are considered in the determination of the earliest backup point. If a ‘file save’ journal entry is found for a selected table, the replication status of this table is set to *ACTIVE. Otherwise, the replication status is set to *IDLE, and a message is issued.Command Syntax

SETTSSYNC TARGET( )Applies To

Source

Result Relevant messages are produced to the job log.

Example • SETTSSYNC TARGET(SUB1)

Sets the synchronization point for all tables selected for mirroring to subscription SUB1.

SETJRNPOS—Set Journal PositionUse this command to position Transformation Server to start mirroring at a specific journal entry. You can enter the specific journal entry directly or it can be determined by the command if you enter a date and time.Command Syntax

SETJRNPOS JOURNAL( ) TARGET( ) JRNRCVNME( ) {STRDTE( ) STRTIM( ) | STRSEQNBR( )}Applies To

Parameters Description

TARGET The name of the subscription, as defined in Management Console, for which the earliest backup point should be determined and set. For information about subscriptions, see the Transformation Server Management Console Administration Guide.

72 Printed in Canada IBM DataMirror Transformation Server

Page 73: Transformation Server for AS400 - Version 6.1

Source Table Commands

Source

Result Relevant messages are produced to the job log.

Examples • SETJRNPOS JOURNAL(D_MIRROR/DMCJRN) TARGET(SUB1) JRNRCVNME(D_MIRROR/DMCRCV004)

STRDTE('07052004') STRTIM('141200')The search for the specified entry starts with journal receiver D_MIRROR/DMCRCV004 associated with journal D_MIRROR/DMCJRN. Positions Transformation Server to start mirroring at the entry in a journal receiver that was timestamped on July 5, 2004 at 2:12 PM.

• SETJRNPOS JOURNAL(D_MIRROR/DMCJRN) TARGET(SUB2) JRNRCVNME(D_MIRROR/DMCRCV006) STRSEQNBR(127855)The search for the specified entry starts with journal receiver D_MIRROR/DMCRCV006 associated with journal D_MIRROR/DMCJRN. Positions Transformation Server to start mirroring at the entry that has a sequence number of 127855.

Parameters Description

JOURNAL The name of the journal associated with the journal receiver that has its position changed by this command. The library where the journal resides must be identified. Prefix the journal with the name of the library where the journal is located.

TARGET The name of the subscription, as defined in Management Console, which is affected by this command. For information about subscriptions, see the Transformation Server Management Console Administration Guide.

JRNRCVNME The name of the first or starting journal receiver to be searched for the specified sequence number or date and time. The library where the journal receiver resides must be identified. Prefix the journal receiver with the name of the library where the journal receiver is located.

STRDTE The date of the journal entry that Transformation Server processes first when mirroring is started. The date must be specified in the format 'MMDDYYYY'. For example, '09302004'.

STRTIM The time of the journal entry that Transformation Server processes first when mirroring is started. The date must be specified in the format 'HHMMSS'. For example, '184304'.

STRSEQNBR The sequence number that Transformation Server processes first when mirroring is started.

© DataMirror Corporation, an IBM Company Printed in Canada 73

Page 74: Transformation Server for AS400 - Version 6.1

Source Table Commands

74 Printed in Canada IBM DataMirror Transformation Server

Page 75: Transformation Server for AS400 - Version 6.1

Table Mapping Commands

Table Mapping CommandsIn this section, you will learn about commands that:• ASNTGTTBL—Map Source and Target Tables on page 75• DASTGTTBL—Unmap Source and Target Tables on page 77

ASNTGTTBL—Map Source and Target TablesUse this command to assign source tables to target tables that have the same names. Only tables that have not previously been assigned to a target table are considered when you issue this command. Physical and logical files must have the same record format name and structure on the subscription server. Use the DASTGTTBL command to de-assign publication and target tables. For more information, see the DASTGTTBL command.Command Syntax

ASNTGTTBL FROMSYS( ) SRCTBL( ) SRCLIB( ) TGTLIB( ) TGTMBRNME( ) [ASNTYP( )] [MULTISRC( )]Applies To

Target

Parameters Description

FROMSYS The name of the subscription containing the source table. This name is the source identifier, as defined in Management Console. For information about source identifiersource identifiers, see the Transformation Server Management Console Administration Guide.

SRCTBL The name of the source table to assign. The table name is case-sensitive. The type of database where the source table resides determines the case that has to be used.

SRCLIB The name of the library or database where the source table resides. This setting is case-sensitive. The location where the source table resides determines the case that has to be used.

TGTLIB The name of the library where the target table resides. In this library, a target table that has the same name as a source table is assigned. If the selected mode of replication for a source table is keyed file processing, then a unique keyed access path is required in the target table library. If the command cannot find a unique access path (keyed physical or logical), then the assignment is not completed and an error is logged.

TGTMBRNME The name of a member in the subscription physical file. Enter the name of a member or one of the following values: *ONLY – Specifies the only member in the subscription physical file. You can specify this value only when the subscription physical file is limited to one member.The MAXMBR attribute for the subscription physical file must be equal to one.Specify this value if you want a source table to be assigned to a target table.

© DataMirror Corporation, an IBM Company Printed in Canada 75

Page 76: Transformation Server for AS400 - Version 6.1

Table Mapping Commands

Result Relevant messages are produced to the job log.

Examples ASNTGTTBL FROMSYS(PUB1) SRCTBL(MBR1) SRCLIB(PRODLIB) TGTLIB(SUBLIB) TGTMBRNME(*MEMBER) ASNTYP(*ADA)Assigns the publication member named MBR1 that resides in library PRODLIB to the subscription member of the same name in library SUBLIB. The members are assigned under adaptive apply.ASNTGTTBL FROMSYS(PUB1) SRCTBL(EMPLOYEE) SRCLIB(EMPSRC)TGTLIB(EMPTGT) TGTMBRNME(*ONLY) ASNTYP(*AUD)Assigns the source table named EMPLOYEE that resides in library EMPSRC to the target table of the same name in library EMPTGT. The tables are assigned under auditing (LiveAudit).ASNTGTTBL FROMSYS(PUB1) SRCTBL(CUSTOMER) SRCLIB(PRODLIB) TGTLIB(SUBLIB) TGTMBRNME(*ONLY) ASNTYP(*SUM) MULTISRC(*YES)Assigns the source table named CUSTOMER that resides in library PRODLIB to thetarget table of the same name in library SUBLIB. The tables are assigned under summarization, and data from more than one source table is summarized in the target table.

ASNTYP Indicates the type of assignment. The assignment type defines how replicated data is applied to the target table. Enter one of the following values:• *STD—Specifies the standard replication assignment type.• *AUD—Specifies the audit assignment type (LiveAudit).• *SUM—Specifies the summarization assignment type.• *CN1—Specifies the row consolidation - one-to-one assignment type.• *CN2—Specifies the row consolidation - one-to-many assignment type.• *ADA—Specifies the adaptive apply assignment type.Default Setting: *STDFor more information about assignment types, see the Transformation Server Management Console Administration Guide.

MULTISRC Indicates whether or not the target table is populated by more than one source table. For more information about mapping source and target tables, see the Transformation Server Management Console Administration Guide. This parameter applies only when *SUM (Summarization) is selected for the ASNTYP parameter.Enter one of the following values:• *NO—Indicates that the target table does not contain summarized data from multiple

source tables.• *YES—Indicates that the target table does contain summarized data from multiple

source tables.Default Setting: *NO

Parameters Description

76 Printed in Canada IBM DataMirror Transformation Server

Page 77: Transformation Server for AS400 - Version 6.1

Table Mapping Commands

DASTGTTBL—Unmap Source and Target TablesUse this command to de-assign publication and target tables. Only source tables that have been previously assigned to target tables are affected by this command.Command Syntax

DASTGTTBL FROMSYS( ) SRCTBL( ) SRCLIB( )Applies To

Target

Result Relevant messages are produced to the job log.

Example DASTGTTBL FROMSYS(PUB1) SRCTBL(CUSTOMER) SRCLIB(DTUTOR) The assigned source table CUSTOMER in library DTUTOR that is under the subscription PUB1 is de-assigned from its target table.

Parameters Description

FROMSYS The name of the subscription containing the source table. This name is the source identifier, as defined in Management Console. For information about source identifiers, see the Transformation Server Management Console Administration Guide.

SRCTBL The name of the source table that is de-assigned. The table name is case-sensitive. The type of database where the source table resides determines the case that has to be used.

SRCLIB The name of the library or database where the source table resides. This setting is case-sensitive. The location where the source table resides determines the case that has to be used.

© DataMirror Corporation, an IBM Company Printed in Canada 77

Page 78: Transformation Server for AS400 - Version 6.1

Table Mapping Commands

78 Printed in Canada IBM DataMirror Transformation Server

Page 79: Transformation Server for AS400 - Version 6.1

Copy Subscription Commands

Copy Subscription CommandsIn this section, you will learn about commands that:• CPYTGTASN—Copy Target Configuration on page 79• CPYTGTTBL—Copy Source Configuration on page 80

CPYTGTASN—Copy Target ConfigurationUse this command to copy all or part of a subscriber replication configuration from one subscription to another. You can copy individual tables, generic groups of tables, or all tables within a library with a single execution of this command. Only tables that have not previously been copied to the destination subscription are considered when you issue this command.Command Syntax

CPYTGTASN FROMSYS( ) SRCTBL( ) SRCLIB( ) TOSYS( ) [ROWID( )]Applies To

Target

Result Relevant messages are produced to the job log.

Examples CPYTGTASN FROMSYS(PUB1) SRCTBL(*ALL) SRCLIB(DTUTOR) TOSYS(PUB2)All described source tables in library DTUTOR have their configuration copied from subscription PUB1 to subscription PUB2. A row identifier expression is not defined for each assigned target table.

Parameters Description

FROMSYS The name of the subscription to have all or part of its configuration copied. This name is the source identifier, as defined in Management Console. For information on how to add a subscription, see the Transformation Server Management Console Administration Guide.

SRCTBL The name of the described source table to have its configuration copied. Enter the name of a table, a generic name (for example, abc* specifies all tables starting with abc), or the following value:*ALL—Specifies all source tables in the library (see the SRCLIB parameter below) that are contained in the subscription. The table name is case-sensitive. The type of database where the source table resides determines the case that has to be used.

SRCLIB The name of the library or database where the source table resides. This setting is case-sensitive. The location where the source table resides determines the case that has to be used.

TOSYS The name of the subscription that receives the copied configuration. This name is the source identifier, as defined in Management Console. For information on how to add a subscription in Management Console, see theTransformation Server Management Console Administration Guide

ROWID The row identifier expression that is defined for the assigned target table. For information on how to add an expression to filter a row during replication, see Transformation Server Management Console Administration Guide.

© DataMirror Corporation, an IBM Company Printed in Canada 79

Page 80: Transformation Server for AS400 - Version 6.1

Copy Subscription Commands

CPYTGTASN FROMSYS(PUB1) SRCTBL(CUSTOMER) SRCLIB(DTUTOR) TOSYS(PUB2) ROWID("BRANCH = 3")The described source table CUSTOMER in library DTUTOR has its configuration copied from subscription PUB1 to subscription PUB2. The row identifier expression BRANCH = 3 is defined for the assigned target table.

CPYTGTTBL—Copy Source ConfigurationUse this command to copy all or part of a publisher replication configuration from one subscription to another. You can copy individual tables, generic groups of tables, or all tables within a library to the secondary subscription with a single execution of this command. After copying the configuration, copied source tables have to be described to the subscriber. For more information, see the STRDTAMIR command. Next, you need to assign the source tables to the target tables using the CPYTGTASN command on the subscriber. For more information, see the CPYTGTASN—Copy Target Configuration on page 79.Command Syntax

CPYTGTTBL TARGET( ) TOTARGET( ) TABLE( ) INTSTSRSH( ) INTSTSMIR( ) [ROWSELTYP( ) ROWSELEXP( )]Applies To

Source

Parameters Description

TARGET The name of the subscription, as defined in Management Console, that has its configuration copied. For information on how to add a subscription, see the Transformation Server Management Console Administration Guide.

TOTARGET The name of the subscription, as defined in Management Console, which receives the copied configuration. For information on how to add a subscription, see the Transformation Server Management Console Administration Guide.

TABLE The name of the source table that is copied.Enter the name of a table, a generic name (for example, abc* specifies all tables starting with abc), or the following value:*ALL—Specifies all tables in the library that are selected to the subscription (see the TARGET parameter above). The name of the library where the table resides must precede the source table specification.

INTSTSRSH The initial replication status for source tables that are refreshed.Specify one of the following values:• *IDLE—Specifies a status of Idle to ensure that the table is not refreshed.• *REFRESH—Specifies a status of Refresh to ensure that the table is refreshed.

INTSTSMIR The initial replication status for source tables that are mirrored.Specify one of the following values:• *IDLE—Specifies a status of Idle to ensure that the table is not mirrored.• *REFRESH—Specifies a status of Refresh to ensure that the table is refreshed before

mirroring begins.• *ACTIVE—Specifies a status of Active to ensure that the table is not refreshed before

mirroring begins.

80 Printed in Canada IBM DataMirror Transformation Server

Page 81: Transformation Server for AS400 - Version 6.1

Copy Subscription Commands

Result Relevant messages are produced to the job log.

Examples CPYTGTTBL TARGET(SUB1) TOTARGET(SUB2) TABLE(DTUTOR/SALES) INTSTSRSH(*IDLE) INTSTSMIR(*ACTIVE)The replication configuration for source table SALES in library DTUTOR is copied from subscription SUB1 to subscription SUB2. The initial replication status for the table when it is refreshed is *IDLE. The initial replication status for the table when it is mirrored is *ACTIVE. A row selection expression is not defined for the SALES table.CPYTGTTBL TARGET(SUB1) TOTARGET(SUB2) TABLE(DTUTOR/CUSTOMER) INTSTSRSH(*IDLE) INTSTSMIR(*REFRESH) ROWSELTYP(*OMIT) ROWSELEXP("CUSTID > 5000")The replication configuration for source table CUSTOMER in library DTUTOR is copied from subscription SUB1 to subscription SUB2. The initial replication status for the table when it is refreshed is *IDLE. The initial replication status for the table when it is mirrored is *REFRESH. A row selection expression is defined for CUSTOMER table. Only rows in the table that have a CUSTID column value less than or equal to 5000 are replicated.CPYTGTTBL TARGET(SUB1) TOTARGET(SUB2) TABLE(DTUTOR/*ALL) INTSTSRSH(*REFRESH) INTSTSMIR(*ACTIVE) ROWSELTYP(*SELECT) ROWSELEXP("SALES > 10000")The replication configuration for all selected source tables in DTUTOR are copied from subscription SUB1 to subscription SUB2. The initial replication status for the table when it is refreshed is *REFRESH. The initial replication status for the table when it is mirrored is *ACTIVE. A row selection expression is defined for each table in the DTUTOR library. Only rows in each table that have a SALES column value greater that 10,000 are replicated.

ROWSELTYP The type of row selection applied to the source table. Specify one of the following values:• *SELECT—Replicate rows that satisfy the row selection expression.• *OMIT—Do not replicate rows that satisfy the row selection expression. All other rows

that do not satisfy the row selection expression are replicated

ROWSELEXP The row selection expression that determines which rows in the source table are replicated. You must enter a row selection expression based on columns in the source table.

Parameters Description

© DataMirror Corporation, an IBM Company Printed in Canada 81

Page 82: Transformation Server for AS400 - Version 6.1

Copy Subscription Commands

82 Printed in Canada IBM DataMirror Transformation Server

Page 83: Transformation Server for AS400 - Version 6.1

Promote Subscription Commands

Promote Subscription CommandsIn this section, you will learn about commands that:• DUPTBL—Duplicate Added Table Metadata on page 83• DUPTGTASN—Duplicate Subscriber Metadata on page 83• DUPTGTTBL—Duplicate Selected Source table Metadata on page 84

DUPTBL—Duplicate Added Table MetadataThis command is intended for working environments where a Transformation Server replication configuration is first defined for tables in a test environment and then promoted to production. For more information about promoting replication configurations, see Promoting Replication Configurations. Specifically, this command modifies Transformation Server publisher metadata that refers to the specified source tables added to the catalog in a test environment. Metadata is modified to reference the source tables in production that correspond to the tables that have been added to the catalog in the test environment. Transformation Server verifies that the corresponding source tables in production exist and have the same names and attributes as the tables in the test environment. If ransformation Server detects a discrepancy, the attempt to modify the metadata through this command fails. In this case, messages are generated to inform you of the differences that were detected.Command Syntax

DUPTBL TABLE( ) TOLIB( )Applies To

Source

Result Relevant messages are produced to the job log.

Examples DUPTBL TABLE(TSTPUB/*ALL) TOLIB(PRDPUB)Publisher metadata for all added source tables in library TSTPUB is copied to library PRDPUB.DUPTBL TABLE(TSTPUB/CUSTOMER) TOLIB(PRDPUB)Publisher metadata for added source table CUSTOMER in library TSTPUB is copied to library PRDPUB.

DUPTGTASN—Duplicate Subscriber MetadataThis command is intended for working environments where a Transformation Server replication configuration is first defined for tables in a test environment and then promoted to production. For more information about promoting replication configurations, see Promoting Replication Configurations. Specifically, this command modifies Transformation Server subscriber metadata that refers to the table assignments and data transformations (for example, derived expressions, value translations, user exits, and so

Parameters Description

TABLE The name of the added source table in the test library to have its publisher metadata copied. Specify the name of the table, a generic table name (for example, CUST*), or the following value:*ALL—Specifies all added tables in the library. The name of the library where the table resides must precede the table specification.

TOLIB The production library containing the added source table that corresponds to the test table specified in the TABLE parameter (see above).

© DataMirror Corporation, an IBM Company Printed in Canada 83

Page 84: Transformation Server for AS400 - Version 6.1

Promote Subscription Commands

on) in the test area. Metadata is modified to reference table assignments and data transformations in production that are based on settings already defined for corresponding tables in the test environment. Transformation Server verifies that the corresponding source tables in production exist and have the same names and attributes as the tables in the test environment. If Transformation Server detects a discrepancy, the attempt to modify the metadata through this command fails. In this case, messages are generated to inform you of the differences that were detected.Command Syntax

DUPTGTASN FROMSYS( ) TOSYS( ) SRCTBL( ) SRCLIB( ) TOSRCLIB( ) TOTGTLIB( )Applies To

Target

Result Relevant messages are produced to the job log.Examples DUPTGTASN FROMSYS(PUBTSTID) TOSYS(PUBPRDID) SRCTBL(CUSTOMER) SRCLIB(TSTPUB) TOSRCLIB(PRDPUB) TOTGTLIB(PRDSUB)Subscriber metadata for source table CUSTOMER in the TSTPUB test library that is contained in the test subscription PUBTSTID is copied to the production subscription PUBPRDID. The corresponding source table in the production environment is located in the library PRDPUB. The target table in the production environment that corresponds to the assigned target table in the test environment is located in the library PRDSUB.

DUPTGTTBL—Duplicate Selected Source table MetadataThis command is intended for working environments where a Transformation Server replication configuration is first defined for tables in a test environment and then promoted to production. For more information about promoting replication configurations, see Promoting Replication Configurations. Specifically, this command modifies Transformation Server publisher metadata that

Parameters Description

FROMSYS The name of the subscription in the test environment to have its subscriber metadata copied. This name is the source identifier, as defined in Management Console. For information about source identifiers, see the Transformation Server Management Console Administration Guide.

TOSYS The name of the subscription in the production environment that receives the copied subscriber metadata. This name is the source identifier, as defined in Management Console. For information about source identifiers, see the Transformation Server Management Console Administration Guide.

SRCTBL The name of the source table in the test library to have its subscriber metadata copied. The table name is case-sensitive. The type of database where the source table resides determines the case that has to be used.

SRCLIB The name of the test library or database where the source table resides. This setting is case-sensitive. The location where the source table resides determines the case that has to be used.

TOSRCLIB The name of the production library containing the source table that corresponds to the source table in the test environment (see SRCTBL parameter above).

TOTGTLIB The name of the production library containing the target table that corresponds to the assigned target table in the test environment.

84 Printed in Canada IBM DataMirror Transformation Server

Page 85: Transformation Server for AS400 - Version 6.1

Promote Subscription Commands

refers to source table selection attributes (for example, column selection, row selection, critical columns, replication method, and so on) in the test environment. Metadata is modified to define the same selection attributes for the corresponding selected source tables in production. Transformation Server verifies that the corresponding selected tables in production exist and have the same names and attributes as the tables in the test library. If Transformation Server detects a discrepancy, the attempt to modify the metadata through this command fails. In this case, messages are generated to inform you of the differences that were detected.Command Syntax

DUPTGTTBL TARGET( ) TOTARGET( ) TABLE( ) TOLIB( )Applies To

Target

Result Relevant messages are produced to the job log.

Examples TOLIB(PRDPUB)Publisher metadata for all source tables in the TSTPUB test library that are selected to the test subscription SUBTST is copied to the production subscription SUBPRD.The name of the production library containing the selected source tables that correspond to the tables in the test library is PRDPUB. DUPTGTTBL TARGET(SUBTST) TOTARGET(SUBPRD) TABLE(TSTPUB/V*) TOLIB(PRDPUB)Publisher metadata for all source tables starting with the letter V in the TSTPUB test library that are selected to the test subscription SUBTST is copied to the production subscription SUBPRD. The name of the production library containing the selected source tables that correspond to the tables in the test library is PRDPUB.

Parameters Description

TARGET The name of the subscription in the test environment, as defined in Management Console, to have its publisher metadata copied. For information about subscriptions, see the Transformation Server Management Console Administration Guide.

TOTARGET The name of the subscription in the production environment, as defined in Management Console, that receives copied publisher metadata. For information about subscriptions, see the Transformation Server Management Console Administration Guide.

TABLE The name of the selected source table in the test library.Specify the name of the table, a generic table name (CUST*), or the following value:*ALL—Specifies all tables in the library that are selected to the subscription (see the TARGET parameter above). The name of the library where the table resides must precede the source table specification.

TOLIB The name of the production library containing the selected source table that corresponds to the selected source table in the test library (see the TABLE parameter above).

© DataMirror Corporation, an IBM Company Printed in Canada 85

Page 86: Transformation Server for AS400 - Version 6.1

Promote Subscription Commands

86 Printed in Canada IBM DataMirror Transformation Server

Page 87: Transformation Server for AS400 - Version 6.1

Table-Level Operation Commands

Table-Level Operation CommandsIn this section, you will learn about commands that:• DMSQL—Enable/Disable SQL Statements on page 87

DMSQL—Enable/Disable SQL StatementsUse this command to enable the users with the TS System Administrator and TS Administrator roles in Transformation Server Management Console to specify SQL statements when configuring table-level operations. If enabled, these users can specify SQL statements that control which target tables Transformation Server refreshes or truncated (cleared) on the target. If you have already specified SQL statements in Transformation Server Management Console and this command is used to disable SQL statements afterwards, SQL statements will not be executed. Command Syntax

DMSQL [ENBSQL( )]Applies To

Target

Note: This command can only be run from the QSECOFR user profile.Note: The use of SQL statements may constitute a security concern in your working environment. Therefore, you

should exercise caution when issuing this command to enable the specification of SQL statements in Management Console.

Parameters Description

ENBSQL Indicates whether or not the specification of SQL statements in Management Console is enabled or disabled.Enter one of the following values:• *NO—Specifies that SQL statements cannot be entered in Transformation Server

Management Console.• *YES—Specifies that SQL statements can be entered in Transformation Server

Management Console.Default Setting—*NO

© DataMirror Corporation, an IBM Company Printed in Canada 87

Page 88: Transformation Server for AS400 - Version 6.1

Table-Level Operation Commands

88 Printed in Canada IBM DataMirror Transformation Server

Page 89: Transformation Server for AS400 - Version 6.1

Database Journal Commands

Database Journal CommandsIn this section, you will learn about commands that:• CHGJRNDM—Change Journal Receivers on page 90• DMVWBKMK—Retrieve Bookmark Information on page 92• RTVDMJENT—Retrieve Transformation Server Journal Entry on page 94• VFYTSJRN—Verify Journal on page 94

© DataMirror Corporation, an IBM Company Printed in Canada 89

Page 90: Transformation Server for AS400 - Version 6.1

Database Journal Commands

CHGJRNDM—Change Journal ReceiversUse this command to generate new journal receivers for a specified journal on the publication server. You can also use this command to delete processed and obsolete journal receivers. A processed receiver is one where all of the journal entries in the receiver have been completely applied to all associated subscribers. An obsolete receiver is one that is no longer used by Transformation Server. You should schedule this command to run daily, and if dealing with high data volumes, several times daily. This ensures that journal receivers do not grow too large and add unnecessary performance overhead. This command can only be applied to journals that are managed by Transformation Server, such as the product default journal (DMCJRN). If a physical file was being journaled prior to Transformation Server installation, the existing journal (as opposed to the default journal DMCJRN) is used for that file.

When replicating data from a remote journalWhen Transformation Server has been setup and installed to replicate from a remote journal, you must issue this command from the source server where the remote journal resides. If you decide to delete a journal receiver, then Transformation Server deletes both the local journal receivers on the Data Origin Server and the remote journal receivers on the Source Server. See CHGJRNDM—Change Remote Journal Receivers on page 47.Command Syntax

CHGJRNDM JOURNAL( ) [CHGRCV( )] [DLTRCV( )] [CLSTRLIB( )]Applies To

Source

Parameters Description

JOURNAL The name of the journal for which journal receivers are generated.Enter the name of a valid journal or the following value:*ALL – Specifies all journals in the library that are used by Transformation Server.Default Setting: *ALLThe library where the journal resides must be identified. Prefix the journal with thename of the library where the journal is located.

CHGRCV Indicates whether or not the journal receiver should be changed for the specifiedjournal.Enter one of the following values:*NO - Indicates that journal receivers are not changed for the specified journal(s).You need to change the journal receivers manually.*YES - Indicates that journal receivers are changed for the specified journals.Default Setting: *YES

90 Printed in Canada IBM DataMirror Transformation Server

Page 91: Transformation Server for AS400 - Version 6.1

Database Journal Commands

Result Relevant messages are produced to the job log.

Examples CHGJRNDM JOURNAL(LIB1/*ALL)Journal receivers associated with all journals in library LIB1 that are used by Transformation Server are changed. Processed and obsolete journal receivers for the Transformation Server default journal are not deleted. The default setting for the DLTRCV parameter is only applicable when the current default Transformation Server journal is specified for JOURNAL.iCluster has not been installed.CHGJRNDM JOURNAL(LIB1/DMCJRN) CHGRCV(*YES) DLTRCV(*DFT) CLSTRLIB(CLUSLIB1)Journal receivers associated with the Transformation Server default journal DMCJRN in library LIB1 are changed. Processed and obsolete journal receivers for DMCJRN are deleted. Transformation Server does not delete any processed or obsolete journal receivers in iCluster library CLUSLIB1.CHGJRNDM JOURNAL(LIB1/DMCJRN) CHGRCV(*NO) DLTRCV(*NO) CLSTRLIB(*NONE)Journal receivers associated with the Transformation Server default journal DMCJRN in library LIB1 are not changed. Processed and obsolete journal receivers for DMCJRN are not deleted. iCluster has not been installed.

Related Topics• CHGJRNDM—Change Remote Journal Receivers on page 47

DLTRCV Indicates whether or not processed or obsolete journal receivers should be deleted forthe specified journal.Enter one of the following values:*NO – Specifies that you do not want to delete processed or obsolete journal receivers associated with the journal. These receivers remain until you delete or archive them.*YES – Specifies that you want to delete processed and obsolete receivers associated with the journals.*DFT – Specifies that you want to delete processed and obsolete receivers associated with the Transformation Server default journal. This setting applies only when JOURNAL (see above) is set to the current Transformation Server default journal, which is specified in the CHGDMSVAL command.Default Setting: *DFT

CLSTRLIB If you have the DataMirror iCluster product installed, then Transformation Server could possibly change or delete journal receivers that iCluster requires.By specifying the iCluster library name, Transformation Server makes sure it does not change or delete any iCluster journal receivers that reside in this library.Enter the library name where iCluster is installed or the following value:*NONE – Specifies that iCluster is not installed.Default Setting: *NONE

Parameters Description

© DataMirror Corporation, an IBM Company Printed in Canada 91

Page 92: Transformation Server for AS400 - Version 6.1

Database Journal Commands

DMVWBKMK—Retrieve Bookmark InformationUse this command to retrieve Transformation Server bookmark information from the JRN_STATUS user space in the Transformation Server product library. In some situations, you may need to view precisely the progress of Transformation Server scraping and applying activities for a subscription and retrieve exact information about the journal or log position that is being processed on the target. Also, in situations of failure, you need to know exactly what was the last transaction applied for the subscription so that you can set a journal or log position on the source, if need be. In the subscription environment, the last processed journal or log position is indicated by a set of values that identifies a position or entry in the publication journal. This set of values is called a bookmark. This command allows you to view bookmarks information for a specified source identifier (or all). It can be invoked on a target and can display the results in two different formats. In addition, instead of displaying the results to standard output, you can direct them to a file for archiving purposes, or future viewing. Detailed information about the retrieved bookmarks is listed in the Results section below.Command Syntax

DMVWBKMK [PRODLIB( )] PUBID( ) [OUTPUT( )] [OUTFILE( )] [MBROPT( )]Applies To

Target

Parameters Description

PRODLIB The name of the product library where Transformation Server is installed.Enter a library name or the following value:*CURLIB—Specifies the current library.Default Setting: *CURLIB

PUBID This name is the source identifier, as defined in Management Console, for whichbookmarks are displayed.Enter a source identifier or the following value:*ALL—Specifies all defined source identifiers.For information about source identifiers, see the Transformation Server Management Console Administration Guide.

OUTPUT Indicates where the output of this command is directed.Enter one of the following values:*DSP—Specifies that the output is directed to the job log if this command is issued from the command line, or sent to a spooled file if submitted as part of a batch job.*OUTFILE—Specifies that the output of this command is written into a database file.Default Setting: *DSP

92 Printed in Canada IBM DataMirror Transformation Server

Page 93: Transformation Server for AS400 - Version 6.1

Database Journal Commands

ResultRelevant messages are directed to the job log or to a database file. Messages in the job log contain first and second level text. First-level text indicates the publisher ID name. To view specific bookmark information, you need to display second level message text. Second level text contains the following items of information:Publisher ID—The publisher ID for which bookmark information is being retrieved.Entry—The name of the journal or log, and where it is located.Last Committed Position—The position of the last journal or log entry to be applied to the target table that is confirmed. Confirmed indicates either that the commitment control group where the journal or log entry belongs has been committed, or that the journal or log entry was processed outside commitment control.Earliest Open Position—The position marking the beginning of the oldest commitment control transaction that is still uncommitted or being rolled back.Last Applied Position—The position of the last journal or log entry applied to the target table. The Last Committed Position, Earliest Open Position, and Last Applied Position settings are the same when the commitment control level is set to *NONE (see the CHGDMTVAL command).Apply Time—The timestamp of the last journal or log entry applied to the target table (see Last Applied Position above).Log Time—The timestamp in the publication journal or log of the last journal or log entry applied to the target table (see Last Applied Position above). If the command fails to retrieve a set of bookmarks, an error message is logged.

Examples• DMVWBKMK PUBID(PUB1)

Bookmark information that is retrieved applies to the Transformation Server installation in the current library. Bookmark information associated with source identifier PUB1 is directed to the job log or a spooled file.

• DMVWBKMK PRODLIB(D_MIRROR) PUBID(PUB1) OUTPUT(*DSP)Bookmark information that is retrieved applies to the Transformation Server installation in the product library D_MIRROR. Bookmark information associated with source identifier PUB1 is directed to the job log or a spooled file.

• DMVWBKMK PRODLIB(D_MIRROR) PUBID(*ALL) OUTPUT(*OUTFILE) OUTFILE(LIB1/FILE1) MBROPT(*ADD)

OUTFILE The name of the database file where the results of this command are sent. This parameter applies only if you specified *OUTFILE for the OUTPUT parameter (see above).You can specify either a new or an existing file.The name of the library where the database file resides must precede the database file specification.Specify a library name or the following value:*CURLIB—Specifies the current library.

MBROPT Indicates whether the database file specified for the OUTFILE parameter (see above) is cleared before new records are added to the database file. This parameter applies only if you specified *OUTFILE for the OUTPUT parameter (see above).Enter one of the following values:*REPLACE—Specifies that the database file is cleared before new records are added to the database file.*ADD—Specifies that the new records are appended to the existing database file.Default Setting: *REPLACE

Parameters Description

© DataMirror Corporation, an IBM Company Printed in Canada 93

Page 94: Transformation Server for AS400 - Version 6.1

Database Journal Commands

Bookmark information that is retrieved applies to the Transformation Server installation in the product library D_MIRROR. Bookmark information associated with all source identifiers is added to the database file FILE1 located in library LIB1.

RTVDMJENT—Retrieve Transformation Server Journal EntryUse this command to determine whether a user-specified journal receiver is being used by Transformation Server. Based on a specified journal, this command returns the sequence number and journal receiver name of the last confirmed journal entry processed by Transformation Server.Because this command uses return parameters, you should issue this command from a CL program. Use the results provided by this command to determine if a user-specified journal receiver is being used by Transformation Server and therefore unavailable for deletion.

When replicating data from a remote journalWhen Transformation Server has been setup and installed to replicate from a remote journal, you must issue this command from the source server where the remote journal resides. Transformation Server returns the sequence number and journal receivers of the remote journal.Command Syntax

RTVDMJENT JOURNAL( )Applies To

Source

Results JRENTCONFThe last confirmed (replicated) journal entry sequence number.JRNRCVNMEThe journal receiver name of the last confirmed entry.JRNRCVLIBThe library where the journal receiver is located.

Examples RTVDMJENT JOURNAL(D_MIRROR/DMCJRN)Retrieves journal information for journal DMCJRN in library D_MIRROR.

VFYTSJRN—Verify JournalUse this command to verify that the required Transformation Server journal exists for all tables selected for replication to the named subscription. If the journal cannot be found, this command ensures that the proper journal is created. This command also verifies all tables selected to the subscription. All tables that have a replication method of refresh are excluded during this verification process.

Parameters Description

JOURNAL The name of the Transformation Server journal.The name of the library where the journal resides must precede the journal specification.

94 Printed in Canada IBM DataMirror Transformation Server

Page 95: Transformation Server for AS400 - Version 6.1

Database Journal Commands

When replicating data from a remote journalWhen Transformation Server has been setup and installed to replicate from a remote journal, you must issue this command from the source server where the remote journal resides. Transformation Server verifies that the remote journal exists for all tables selected for replication in a named subscription.Command Syntax

VFYTSJRN TARGET( )Applies To

Source

Result Relevant messages are produced to the job log.

Example VFYTSJRN TARGET(SUB1)Verifies journaling for all source table selected to subscription SUB1.

Parameters Description

TARGET The name of the subscription, as defined in Management Console, for which journaling is verified. For information about subscriptions, see the Transformation Server Management Console Administration Guide.

© DataMirror Corporation, an IBM Company Printed in Canada 95

Page 96: Transformation Server for AS400 - Version 6.1

Database Journal Commands

96 Printed in Canada IBM DataMirror Transformation Server

Page 97: Transformation Server for AS400 - Version 6.1

Communication Commands

Communication Commands In this section, you will learn about commands that:• STRDMTCP—Start Transformation Server TCP/IP Communications on page 97• STRDMUDP—Start UDP Listener on page 99• ENDDMTCP—End Transformation Server TCP/IP Communications on page 100• ENDDMUDP—End UDP Listener on page 103

STRDMTCP—Start Transformation Server TCP/IP CommunicationsUse this command when you want Transformation Server to start the TCPLISTEN listener job. TCPLISTEN is the job running on the target and waits for incoming communication requests. This must be started before communications can be made with the target using TCP/IP. Even though multiple TCPLISTEN listener jobs can be started on the same server, only one TCPLISTEN listener job can be running at any point in time within the same subsystem. You can issue this command once in each library containing a job description that refers to a unique subsystem. To run TCPLISTEN listener jobs concurrently on the same server, separate installations of Transformation Server are required. You can also use this command to enable auto-discovery. Auto-discovery is a way for an Access Server to recognize, upon startup, all available replication agents on the local network so that you do not need to create each agent manually in Access Manager. This command can automatically start the UDPLISTEN listener job, which is used for autodiscovery. For more information about Access Server, Access Manager, replication agents, and auto-discovery, see the Transformation Server Access Manager Configuration Guide. You can issue the STRDMUDP command to start the UDPLISTEN listener job. For more information, see the STRDMUDP—Start UDP Listener on page 99.Command SyntaxSTRDMTCP [SERVICE( )] [JOBD( )] [HOST( )] [AUTODISCOV( )] [ACPORT( )]Applies To

Target

Parameter Description

SERVICE The TCP/IP service table entry name that is used by Transformation Server for TCP/IP communications. This service table entry must not be used by another job. The TCPLISTEN listener job listens on the port that is associated with this entry in the TCP/IP service table. You must allocate an entry and unique port number in the TCP/IP service table before invoking this command. The service name is case-sensitive and must be enclosed in single quotes.Default Setting—‘dmirror’

JOBD The name of the job description that you want to associate with both the TCPLISTEN and UDPLISTEN listener jobs. Default Setting: DMCJOBD You also need to specify the library where the job description resides. The library where the job description resides must precede the job description specification.Specify the name of a library or one of the following values:• *LIBL—Specifies the set of libraries in your library list. The libraries are searched in

order for the first occurrence of the specified job description.• *CURLIB—Specifies the current library.Default Setting— *LIBL

© DataMirror Corporation, an IBM Company Printed in Canada 97

Page 98: Transformation Server for AS400 - Version 6.1

Communication Commands

ResultMessages are placed in the Event Log.

Examples• STRDMTCP

The TCP/IP service table entry for Transformation Server is dmirror. The job description for both the TCPLISTEN and UDPLISTEN listener jobs is the first occurrence of the Transformation Server job description (DMCJOBD) in the library list. This command starts the TCPLISTEN listener job on the local server.

• STRDMTCP SERVICE(‘tsmir’) JOBD(SUBLIB/JOBD1) HOST(‘ ‘) AUTODISCOV(*YES) ACPORT(12121)The TCP/IP service table entry for Transformation Server is tsmir. The job description for both the TCPLISTEN and UDPLISTEN listener jobs is JOBD1 in library SUBLIB. This command starts both the TCPLISTEN and UDPLISTEN listener jobs on the local server. The port number on the Access Servers that is used to receive UDPLISTEN broadcasts is 12121.

• STRDMTCP JOBD(*CURLIB/JOBD1) HOST(SYS1) AUTODISCOV(*NO)The TCP/IP service table entry for Transformation Server is dmirror. The job description for both the TCPLISTEN and UDPLISTEN listener jobs is JOBD1, which is located in the current library. This command starts the TCPLISTEN listener job on server SYS1.

HOST The host name or full IP address of the server where Transformation Server is running. Default Setting: ‘ ‘ (a single blank character which indicates the local server)

AUTODISCOV Indicates whether auto-discovery is enabled or disabled.Enter one of the following values:• *NO—Specifies that auto-discovery is disabled.• *YES—Specifies that auto-discovery is enabled.If you specify *YES, then a UDPLISTEN listener job with the same service name as the TCPLISTEN listener job is started. In the TCP/IP service table, you can distinguish between them by examining the protocol type setting (UDP versus TCP).If you specify *YES, you then need to specify the ACPORT parameter (see below).Default Setting

*NO

ACPORT The port number on an Access Server that is used to receive broadcasts from the UDPLISTEN listener job.This parameter is applicable only when the AUTODISCOV parameter (see above) is set to *YES. If you change the Access Server port numbers, you need to change this parameter setting as well.Default Setting

10101

Parameter Description

98 Printed in Canada IBM DataMirror Transformation Server

Page 99: Transformation Server for AS400 - Version 6.1

Communication Commands

STRDMUDP—Start UDP ListenerUse this command to start the UDP listener job (UDPLISTEN). The UDPLISTEN listener job supports auto-discovery. Auto-discovery is a way for Access Server to recognize, upon startup, all available replication agents on the local network so that you do not need to create each agent manually in Access Manager. The UDPLISTEN listener job responds to communications from Access Servers. For more information about Access Server, Access Manager, replication agents, and auto-discovery, see the Transformation Server Access Manager Configuration Guide. You can start the UDPLISTEN listener job together with the TCPLISTEN listener job using the STRDMTCP command. For more information, see the STRDMTCP—Start Transformation Server TCP/IP Communications on page 97.Command Syntax

STRDMUDP [UDPSERVICE( )] [TCPSERVICE( )] [ACPORT( )] [JOBD( )]Applies To

Source and Target

Result

Parameter Description

UDPSERVICE The name of the service that was defined in the TCP/IP service table for the UDPLISTEN listener job. This parameter is case-sensitive and must be enclosed in single quotes. Default Setting

‘dmirror’

TCPSERVICE The name of the service that was defined in the TCP/IP service table for the TCPLISTEN listener job. For more information about TCPLISTEN, see the STRDMTCP command. This parameter is case-sensitive and must be enclosed in single quotes.

ACPORT The port number on an Access Server that is used to receive broadcasts from the UDPLISTEN listener job. This parameter is applicable only when the AUTODISCOV parameter in a STRDMTCP command invocation is set to *YES. For more information about the AUTODISCOV parameter, see the STRDMTCP command.Default Setting

10101

JOBD The name of the job description that you want to associate with the UDPLISTEN listener job and all jobs started by the UDPLISTEN listener job. The job description that you specify is used only if you are using this command to start the UDPLISTEN listener job. If you use the STRDMTCP command to start the UDPLISTEN listener job, then the value that you specified for the JOBD parameter in the STRDMTCP command is used instead.Default Setting: DMCJOBDJob Description Library The name of the library where the job description is located must precede the job description specification.Specify the name of a library or one of the following values:• *LIBL—Specifies the set of libraries in your library list. The libraries are searched in

order for the first occurrence of the specified job description.• *CURLIB—Specifies the current library.Default Setting

*LIBL

© DataMirror Corporation, an IBM Company Printed in Canada 99

Page 100: Transformation Server for AS400 - Version 6.1

Communication Commands

Messages are placed in the Event Log.Examples • STRDMUDP

The TCP/IP service table entry for the TCPLISTEN and UDPLISTEN listener jobs is dmirror.The port number on the Access Servers that is used to receive UDPLISTEN broadcasts is 10101. The job description for the UDPLISTEN listener job is the first occurrence of the Transformation Server job description (DMCJOBD) in the library list.

• STRDMUDP ACPORT(45454) JOBD(*CURLIB/JOBD1)The TCP/IP service table entry for the TCPLISTEN and UDPLISTEN listener jobs is dmirror. The port number on the Access Servers that is used to receive UDPLISTEN broadcasts is 45454. The job description for the UDPLISTEN listener job is JOBD1, which is located in the current library.

• STRDMUDP UDPSERVICE(‘tsmir’) TCPSERVICE('srvc1') ACPORT(10101) JOBD(SUBLIB/JOBD1)The TCP/IP service table entry for the UDPLISTEN listener job is tsmir. The TCP/IP service table entry for the TCPLISTEN listener job is srvc1. The port number on the Access Servers that is used to receive UDPLISTEN broadcasts is 10101. The job description for the UDPLISTEN listener job is JOBD1 in library SUBLIB.

ENDDMTCP—End Transformation Server TCP/IP CommunicationsUse this command to end a specific Transformation Server listener job. You must issue this command from the same library that the Start Transformation Server (STRDMTCP) was issued to start the Transformation Server listener (TCPLISTEN) job. The Transformation Server listener serves all the incoming network requests from other servers running Transformation Server and from client workstations running Transformation Server Management Console applications.Command Syntax

ENDDMTCP [ENDTYP( )] [SERVICE( )] [AUTODISCOV( )] [JOBD( )]Applies To

100 Printed in Canada IBM DataMirror Transformation Server

Page 101: Transformation Server for AS400 - Version 6.1

Communication Commands

Target

Parameter Description

ENDTYP Always required.Indicates how you want Transformation Server to end TCP/IP communications.Enter one of the following values:• *CNTRLD—Specifies that Transformation Server end the TCPLISTEN listener job after

all current requests have been processed. This is the recommended setting for this parameter.

• *IMMED—Specifies that Transformation Server end that the TCPLISTEN listener job immediately, regardless of whether current requests have been completed or not.

Default Setting*CNTRLD

SERVICE Always required.The name of the TCP/IP service table entry that Transformation Server uses for the TCPLISTEN listener job. Transformation Server stops the TCPLISTEN listener job on the port reserved by the TCP/IP service table entry. The service name is case-sensitive and must be enclosed in single quotes.Default Setting

‘dmirror’

© DataMirror Corporation, an IBM Company Printed in Canada 101

Page 102: Transformation Server for AS400 - Version 6.1

Communication Commands

ResultMessages are placed in the Event Log.

ExamplesENDDMTCPTransformation Server stops the TCPLISTEN listener job in a controlled manner and uses the default settings for the TCP/IP service table entry, autodiscovery, and job description. ENDDMTCP ENDTYP(*CNTRLD) SERVICE(‘tsmir’) AUTODISCOV(*YES) JOBD(LIB1/JOB1)Transformation Server stops TCPLISTEN listener job in a controlled manner. This job was using tsmir as the TCP/IP service table entry. Transformation Server also disables auto-discovery by stopping the UDPLISTEN listener job. Both listener jobs are using the job description JOB1 in the library LIB1.ENDDMTCP ENDTYP(*IMMED) SERVICE(‘tsmir’) AUTODISCOV(*NO) JOBD(*CURLIB/JOB1)Transformation Server stops TCPLISTEN listener job immediately. This job was using tsmir as the TCP/IP service table entry. Transformation Server continues to use auto-discovery by continuing with the UDPLISTEN listener job. Both listener jobs are using the job description JOB1 in the current library.

AUTODISCOV Indicates if Transformation Server ends or continues with the UDPLISTEN listener job which terminates autodiscovery. Auto-discovery is a way for Access Server to recognize, upon startup, all available replication agents on the local network so that you do not need to create each agent manually in Access Manager. For more information about Access Server, Access Manager, replication agents, and auto-discovery, see the Transformation Server Access Manager Configuration Guide.Enter one of the following values:• *YES—Specifies that Transformation Server ends the UDPLISTEN listener job and

disables auto-discovery.• *NO—Specifies that Transformation Server continues the UDPLISTEN listener job and

auto-discovery.Default Setting

*NO

JOBD The name of the job description that you want Transformation Server to associate with both the TCPLISTEN and UDPLISTEN listener jobs, and all jobs started by TCPLISTEN. By default, Transformation Server uses the job description DMCJOBD. You must specify the name of the library before the name of the job description. Specify the library name or one of the following values:• *CURLIB—Specifies the current library.• *LIBL—Specifies the set of libraries in your library list. Transformation Server searches

libraries in order of first occurrence of the specified job description. Default Setting

*LIBL

Parameter Description

102 Printed in Canada IBM DataMirror Transformation Server

Page 103: Transformation Server for AS400 - Version 6.1

Communication Commands

ENDDMUDP—End UDP ListenerUse this command to indicate how you want Transformation Server to end the UDPLISTEN listener job to terminate auto-discovery. You can also terminate auto-discovery by using the ENDDMTCP command. This command also ends the UDPLISTEN listener job. For more information, see the ENDDMTCP—End Transformation Server TCP/IP Communications on page 100. Command

ENDDMUDP [ENDTYP( )] [SERVICE( )]Applies To

Source and Target

ResultMessages are placed in the Event Log.

Examples• ENDDMUDP

Transformation Server stops the UDPLISTEN listener in a controlled manner and uses the default name for the the TCP/IP service table entry (dmirror).

• ENDDMUDP ENDTYP(*IMMED) SERVICE(‘tsmir’)Transformation Server stops the UDPLISTEN listener job immediately and uses tsmir as the TCP/IP service table entry.

Parameter Description

ENDTYP Always required.Indicates how you want Transformation Server to end the UDPLISTEN job.• *CNTRLD—Specifies that Transformation Server terminate the UDP listener job after

all current requests between Access Servers and the UDPLISTEN listener job are processed. This is the recommended setting for this parameter.

• *IMMED—Specifies that Transformation Server end the UDP listener job immediately, regardless of whether or not current requests between Access Servers and the UDPLISTEN listener job have been completed. For more information about Access Server, see the Transformation Server Access Manager Configuration Guide.

Default Setting*CNTRLD

SERVICE The name of the TCP/IP service table entry name that Transformation Server uses for the UDPLISTEN listener job. Transformation Server stops the UDPLISTEN listener job on the port reserved by this TCP/IP service table entry. The service name is case-sensitive and must be enclosed in single quotes.Default Setting

‘dmirror’

© DataMirror Corporation, an IBM Company Printed in Canada 103

Page 104: Transformation Server for AS400 - Version 6.1

Communication Commands

104 Printed in Canada IBM DataMirror Transformation Server

Page 105: Transformation Server for AS400 - Version 6.1

End and Shut Down Transformation Server Commands

End and Shut Down Transformation Server CommandsIn this section, you will learn about commands that:• DMENDPROC—End Transformation Server Jobs on page 105

DMENDPROC—End Transformation Server JobsUse this command to end both active and suspended Transformation Server jobs associated with an installation on a target and when you need to end obsolete jobs that are still running due to abnormal or unusual circumstances.Using this command, you can:• End Transformation Server jobs in the product library that support replication from an identified publisher.• End all Transformation Server jobs in the product library. Command Syntax

DMENDPROC [PRODLIB( )] PUBID( )Applies To

Target

Result Relevant messages are produced to the job log.

Examples DMENDPROC PUBID(PUB1)Ends Transformation Server jobs in the current library that support replication from the publisher identified by PUB1.DMENDPROC PRODLIB(D_MIRROR) PUBID(*ALL)Ends all Transformation Server jobs in the product library D_MIRROR.DMENDPROC PRODLIB(*CURLIB) PUBID(*ALL)Ends all Transformation Server jobs in the current product library.

Parameter Description

PRODLIB The name of the product library where Transformation Server is installed. Enter a library name or one of the following values:*CURLIB—Specifies the current library.Default Setting: *CURLIBThis command does not affect Transformation Server jobs associated with other product installations on the same server that are located in different product libraries.

PUBID This name is the source identifier, as defined in Management Console, which has its Transformation Server jobs ended by this command.Enter a source identifier or the following value:*ALL—Specifies all defined source identifiers.For information about source identifiers, see the Transformation Server Management Console Administration Guide.

© DataMirror Corporation, an IBM Company Printed in Canada 105

Page 106: Transformation Server for AS400 - Version 6.1

End and Shut Down Transformation Server Commands

106 Printed in Canada IBM DataMirror Transformation Server

Page 107: Transformation Server for AS400 - Version 6.1

Other Commands

Other CommandsIn this section, you will learn about commands that:• ADDS36TBL—Add S/36 Flat File Table on page 107• DMCMVFY—Run Communications Verifier on page 108• RTVDMVSTS—Retrieve Transformation Server Installation Information on page 111• CHGDMSVAL—Set Source System Parameters on page 111• CHGDMTVAL—Set Target System Parameters on page 120

ADDS36TBL—Add S/36 Flat File TableUse this command to add non-externally defined tables to the Management Console catalog. Non-externally defined tables, such as System 36 (S/36) flat files, do not have an external definition that can be accessed directly.There are two steps to adding S/36 flat files to the Management Console catalog.1. Issuing this command.2. Defining the columns of the table that you are adding.You can define the columns of the table that you are adding through the Define Columns for Non-Externally Defined Table screen that is automatically displayed after you have issued this command, as shown below:To define the columns of the table, you need to know the data structure of the S/36 flat file including the sequence, data type, start position, and length of each column. Transformation Server does not perform any error checking to compare the entered file field format with the actual data in the S/36 flat file. After defining the columns, the S/36 flat file is then added to the Management Console catalog. At this point, you cannot modify the field structure of the catalog table, for example, by invoking the Management Console re-add function. If you need to re-define the file format after the table has been added to the Management Console catalog, you must delete the table from the catalog, and then manually re-add the S/36 flat file back to the Management Console catalog using this command. You cannot use the Management Console re-add function to re-define the table structure.Command Syntax

ADDS36TBL TBLNAME( ) LIBRARY( )Applies To

Source

Result Relevant messages are produced to the job log.After issuing the command, the Define Columns for Non-Externally Defined Table screen is displayed. You need to supply information as specified in Description. Press Enter after specifying this information. Confirmation messages are displayed, and the table is added to the Management Console catalog.

Example ADDS36TBL TBLNAME(S36TBL1) LIBRARY(LIB36_1)Adds table S36TBL1, located in library LIB36_1, to the Management Console catalog.

Parameters Description

TABLE NAME The full name of the S/36 flat file table to be added.

LIBRARY The library name where the S/36 flat file resides.

© DataMirror Corporation, an IBM Company Printed in Canada 107

Page 108: Transformation Server for AS400 - Version 6.1

Other Commands

DMCMVFY—Run Communications VerifierUse this command to test TCP/IP communications between local and remote servers. Before replicating data, communications between the publisher and target must be operational. This command allows you to verify TCP/IP communications before starting Transformation Server data replication.This command generates messages indicating whether the communications test was successful or not. When unsuccessful, these messages identify the cause of the problem(s). Messages are placed in the DMVFYCMN message queue in the current library. You can also display messages to standard output or you can redirect them to a file for future viewing. Before issuing this command, you need to make sure that a Transformation Server listener is running on the remote server with which you want to perform the communications tests.Each communications test consists of a number of steps. You can choose to display information for each step. The steps are:• Open—Open the communication channel.• Connect—Attempt to connect to the communication channel.• Send_control—Send control information across the communication channel.• Send_data—Send actual data across the communication channel.• Close—Close the communication channel.Command Syntax

DMCMVFY RMTNME( ) [RMTPRT( )] [TSTTYP( )] [NBRPKT( ) | TIMLMT( )] [VERBOSE( )] [LCLNME( )] [LCLPRT( )] [PKTLEN( )] [SNDDLY( )] [RCVDLY( )]

Applies To

Source and Target

Parameters Description

RMTNME The host name or full IP address of the remote server in the communications test.

RMTPRT The port number on the remote server that is used to perform the communications test.This port number was allocated when you installed Transformation Server. Default Setting: 2223

TSTTYP The type of communications test to run.Enter one of the following values:• *PACKETS—Runs the test by sending the number of packets as defined for the

NBRPKT parameter (see below).• *TIMED—Runs the test for approximately the time specified for the TIMLMT parameter

(see below). This allows you to test the stability of the connection for a specified amount of time.

Default Setting: *PACKETS

NBRPKT The number of packets that are sent to the remote server. This parameter is valid only when the TSTTYP parameter (see above) is set to *PACKETS.Default Setting: 5 packetsMinimum Setting: 1 packetMaximum Setting: 99999 packets

108 Printed in Canada IBM DataMirror Transformation Server

Page 109: Transformation Server for AS400 - Version 6.1

Other Commands

TIMLMT Specifies the duration, in seconds, of the test. This parameter is valid only when the TSTTYP parameter (see above) is set to *TIMED. The value specified for the NBRPKT parameter is ignored. When the VERBOSE parameter (see below) is set to either *MEDIUM or *HIGH, a message is displayed for every packet that is sent. This can add to the amount of time the test requires to complete, and therefore, may cause the time of the test to exceed the time specified.Default Setting: 60 secondsMinimum Setting: 0 seconds (the test runs continuously)Maximum Setting: 999999 seconds

VERBOSE The amount of information that is displayed for the test.Enter one of the following values:• *NONE—Specifies that no messages are displayed during the test. A return code is

generated after the test has completed.• *LOW—Displays the return code and the amount of time each step took to complete.• *MEDIUM—Displays an asterisk (‘*’) for every packet successfully sent. If a packet

cannot be sent, the test ends and a return code is displayed.• *HIGH—Displays a message for every packet that is successfully sent. The message

identifiers the return code for every packet.Default Setting: *NONEFor your initial communications test, specify *HIGH to ensure the communications link is conveying each packet and to determine the amount of information in a detailed report. You can then reduce the amount of information generated for subsequent tests by specifying *LOW or *MEDIUM. If you have specified a value for the TIMLMT parameter (see above), then it is recommended that this parameter be set to either *NONE or *LOW to make sure that the value specified for the TIMLMT parameter is respected.

LCLNME The host name or full IP address of the local server in the communications test. The local server is the server where this command has been issued. Enter the host name or full IP address of the local server, or the following value:• *DFT—Specifies the host name or full IP address of the server where this command is

issued. This is the default setting for this parameter.Default Setting: *DFTAnother physical server cannot be designated as the local server by identifying its host name or full IP address. Therefore, this parameter must be set to the host name or full IP address of the server where this command is issued, or *DFT.

LCLPRT The port number on the local server that is used to perform the communications test. This port number was allocated when you installed Transformation Server.Default Setting: 0 (allows the local server to use any available port number)

Parameters Description

© DataMirror Corporation, an IBM Company Printed in Canada 109

Page 110: Transformation Server for AS400 - Version 6.1

Other Commands

Examples DMCMVFY RMTNME(SYS1)Verifies communications with remote server SYS1 by sending a number of packets.Default values are used for all parameters that are not specified.DMCMVFY RMTNME(SYS1) RMTPRT(2252) TSTTYP(*PACKETS) NBRPKT(6)Verifies communications with remote server SYS1 by sending 6 packets.Packets are sent to port number 2252 on the remote server.Default values are used for all parameters that are not specified.DMCMVFY RMTNME(SYS2) RMTPRT(4444) TSTTYP(*TIMED) TIMLMT(300) VERBOSE(*MEDIUM) LCLNME(*DFT) LCLPRT(5151) PKTLEN(2000) SNDDLY(900) RCVDLY(900)Verifies communications with remote server SYS2 by conducting a timed test for 5 minutes (300 seconds).Packets are sent to port number 4444 on the remote server.An asterisk for each step that is successfully completed is displayed. Packets are sent from the local server on port number 5151. The length of each packet is 2,000 bytes, and there is a 900 second delay between consecutive packet deliveries and confirmations.

Note: This command has replaced the DMVFYTCP command. For information about the DMVFYTCP command, contact your DataMirror representative.

PKTLEN The length, in bytes, of each test packet that is sent to the remote server.Default Setting: 512 bytesMinimum Setting: 100 bytesMaximum Setting: 63500 bytes

SNDDLY The time interval, in milliseconds, to wait before sending more test packets to the remote server.Default Setting: 0 milliseconds (indicates that there is no delay between consecutive packets)Minimum Setting: 0 milliseconds (indicates that there is no delay between consecutive packets)Maximum Setting: 999 milliseconds

RCVDLY The time interval, in milliseconds, to wait for a confirmation to be received from the remote server. This value should consider communication bandwidth and utilization.Default Setting: 0 milliseconds (indicates that there is no delay between consecutive confirmations)Minimum Setting: 0 milliseconds (indicates that there is no delay between consecutive confirmations)Maximum Setting: 999 millisecondsResult This command generates the following return codes for both types of tests:• 1—Indicates that each step of the test has been completed successfully.• Non-zero—Indicates that an error occurred during the test.

Parameters Description

110 Printed in Canada IBM DataMirror Transformation Server

Page 111: Transformation Server for AS400 - Version 6.1

Other Commands

RTVDMVSTS—Retrieve Transformation Server Installation InformationUse this command to determine whether Transformation Server has been installed. If installed, this command also returns the version installed, and the installation library name. The command searches all system libraries for the first occurrence of the Transformation Server product data area D_MIRROR. Three variables are returned indicating whether Transformation Server has been installed, the installed product version, and the name of the installation library.Command Syntax

RTVDMVSTSApplies To

Source and TargetResults

STATUS—Either *YES (Transformation Server installed) or *NO (Transformation Server not installed).VERSION—Returns a Transformation Server product version. For example, V5R3M0 where V = Version, R = Release, and M = Service Pack.LIBRARY—Returns the name of the library where Transformation Server is installed.

Example RTVDMVSTSIndicates whether or not Transformation Server has been installed on the server where this command is issued. Retrieves the Transformation Server version, release, modification number, and library. This command uses return variables and therefore should be executed from a CL program.

CHGDMSVAL—Set Source System ParametersUse this command to set publisher system parameters. System parameters can also be set in Management Console. It is recommended that you modify the system parameter settings in Management Console. For more information about working with system parameters in Management Console, see the Transformation Server Management Console Administration Guide.Command Syntax

CHGDMSVAL [JOURNAL( )] [NOTIFYQ( )] [NOTIFYCNT( )] [RESTORE( )] [AUTCDE( )] [UPDCOLUMN( )] [CASCADE( )] [REFWHLACT( )] [USDEFJRN( )] [HEARTTIME( )] [REPTPOSTIM( )] [BKMARKSYNC( )] [MONSAMPFRQ( )] [STARTUP( )] [PROGRESS( )] [LCKTIMEOUT( )] [UNICODE_IS( )] [AUDFILTRAN( )]

Applies To

© DataMirror Corporation, an IBM Company Printed in Canada 111

Page 112: Transformation Server for AS400 - Version 6.1

Other Commands

Source

Parameters Description

JOURNAL The name of the Transformation Server default journal. By default, tables that are mirrored by Transformation Server use this journal. Enter the name of the default journal or the following value:*SAME—Keeps the present setting for this parameter.Default Setting: *SAMEJournal LibraryThe name of the library where the journal resides must precede the name of the journal.Enter the name of the library or one of the following values:• *SAME—Keeps the present setting for this parameter.• *LIBL—Specifies the set of libraries in your library list. The libraries are searched in

order for the first occurrence of the specified default journal.• *CURLIB—Specifies the current library.Default Setting: *LIBL

NOTIFYQ The name of the message queue where notifications are sent when the number of errors detected by Transformation Server exceeds the notify message threshold (see the NOTIFYCNT parameter below).Enter the name of the notify message queue or the following value:*SAME—Keeps the present setting for this parameter.Default Setting: *SAMEThe name of the library where the notify message queue resides must precede the name of the notify message queue.Message Queue LibraryEnter a library name or one of the following values:• *SAME—Keeps the present setting for this parameter.• *LIBL—Specifies the set of libraries in your library list. The libraries are searched in

order for the first occurrence of the specified message queue.• *CURLIB—Specifies the current library.Default Setting: *LIBL

112 Printed in Canada IBM DataMirror Transformation Server

Page 113: Transformation Server for AS400 - Version 6.1

Other Commands

NOTIFYCNT The number of errors that Transformation Server generates before a notification is sent to the notify message queue (see the NOTIFYQ parameter above).Enter the number of errors or the following value:*SAME—Keeps the present setting for this parameter.If a value smaller than the minimum setting (see below) is specified, the minimum setting is used. If a value larger than the maximum setting (see below) is specified, the maximum setting is used.Default Setting: *SAMEMinimum Setting: 1 errorMaximum Setting: 99999 errors

RESTORE Indicates how Transformation Server should refresh tables that have been restored.Enter one of the following values:• *SAME—Keeps the present setting for this parameter.• *IMMED—Specifies that tables should be refreshed immediately when Transformation

Server detects the restore.• *DELAY—Specifies that tables are refreshed the next time a refresh is started.This includes a refresh before mirroring is started.Default Setting: *SAME

AUTCDE The authorization code that is issued by DataMirror Corporation. Adjustments to the authorization code are required when moving from a temporary license to a permanent license, when machine classes have changed, or when upgrading Transformation Server to a new version.Enter the authorization code or the following value:*SAME—Keeps the present setting for this parameter.Default Setting: *SAME

UDPCOLUMN Indicates whether to enable critical column selection.Enter one of the following values:• *SAME—Keeps the present setting for this parameter.• *YES—Enables critical column selection.• *NO—Disables critical column selection.Default Setting: *SAMEFor more information about critical columns, see the Transformation ServerAdministration Guide.

Parameters Description

© DataMirror Corporation, an IBM Company Printed in Canada 113

Page 114: Transformation Server for AS400 - Version 6.1

Other Commands

CASCADE Specifies whether to enable cascading replication.Enter one of the following values:• *SAME—Keeps the present setting for this parameter.• *YES—Enables data that has been replicated to a subscriber to again be replicated

from that subscriber to another subscriber.• *NO—Prevents replicated data from being replicated from the initial subscriber to

another subscriber.You should specify *NO if one or more tables are simultaneously maintained between two servers.Default Setting: *SAME

REFWHLACT Specifies whether or not to enable Refresh While Active. Refresh While Active is a feature that allows Transformation Server to refresh a target table while the source table is active and subject to changes during the time of the refresh. After the refresh has been completed, source table changes that occurred during the refresh are also sent to the target table.Enter one of the following values:• *SAME—Keeps the present setting for this parameter.• *YES—Indicates that refresh while active is enabled.• *NO—Indicates that refresh while active is disabled.Default Setting: *SAME

USDEFJRN Indicates whether or not user-defined journal entries should be processed for replication. This parameter allows you to disable processing required for user-defined journal entries that could impact overall performance.Enter one of the following values:• *SAME—Keeps the present setting for this parameter.• *YES—Indicates that the user-defined journal entries specified in the Transformation

Server metadata table are processed for replication.• *NO—Indicates that no user-defined journal entries are processed for replication.Default Setting: *SAMEFor more information about processing user-defined journal entries for replication, see User-defined Journal Entry Replication

Parameters Description

114 Printed in Canada IBM DataMirror Transformation Server

Page 115: Transformation Server for AS400 - Version 6.1

Other Commands

HEARTTIME Specifies the number of minutes of communication inactivity to wait before active Transformation Server jobs for a subscription are stopped.Heartbeat is a feature that manages Transformation Server processes when a problem with communications or a process has been detected through the absence of communications over a specified period of time. For each active subscription, internal heartbeat messages are sent regularly from a publisher to a subscriber to determine communications and job status. If a reply to a message is not received by the publisher within the specified timeout interval, then Transformation Server determines that a problem has occurred, and an attempt is made to stop all Transformation Server publisher and subscriber jobs for the subscription. In addition, messages (message identifiers DMU3165 and DMU0647) are placed in the event log when heartbeat timeouts occur. For information about using the Management Console Event Log Viewer to examine the contents of an event log, see the Transformation Server Management Console Administration Guide.If a value smaller than the minimum setting (see below) is specified, the minimum setting is used. If a value larger than the maximum setting (see below) is specified, the maximum setting is used.Default Setting: 15 minutesMinimum Setting: 3 minutesMaximum Setting: 999 minutes

REPTPOSTIM Specifies how often, in seconds, the publisher informs the subscriber about its position in the current journal during inactive periods. During inactive periods, when there are no journal entries pertaining to the current subscription, the publisher informs the subscriber of its current position so that the subscriber can advance its bookmarks accordingly. By specifying a low setting for this parameter, the subscriber can reflect more accurately how far replication has progressed. This parameter can also prevent the reprocessing of entries that do not apply to the table currently being replicated. The value of this parameter affects the information that is displayed in progress and bookmark messages in the Event Log Viewer, and in the Monitoring view in Management Console. A high setting for this parameter may result in information that is not up-to-date being presented. If a value smaller than the minimum setting (see below) is specified, the minimum setting is used. If a value larger than the maximum setting (see below) is specified, the maximum setting is used.Default Setting: 5 secondsMinimum Setting: 1 secondMaximum Setting: 300 seconds

BKMARKSYNC The period of time, in seconds, between consecutive synchronizations performed between the publisher and the subscriber. Synchronization is achieved when the subscriber reports to the publisher the position of the last committed change. If you are replicating large volumes of information, you may want to set this value to a lower number to allow obsolete journals receivers to be removed more frequently. If a value smaller than the minimum setting (see below) is specified, the minimum setting is used. If a value larger than the maximum setting (see below) is specified, the maximum setting is used.Default Setting: 60 secondsMinimum Setting: 1 secondMaximum Setting: 300 seconds

Parameters Description

© DataMirror Corporation, an IBM Company Printed in Canada 115

Page 116: Transformation Server for AS400 - Version 6.1

Other Commands

MONSAMPFRQ The period of time, in seconds, between consecutive updates to a data store that is used to maintain replication latency metrics. The data store is referenced by Management Console to present replication latency information.If a value smaller than the minimum setting (see below) is specified, the minimum setting is used. If a value larger than the maximum setting (see below) is specified, the maximum setting is used.Default Setting: 5 secondsMinimum Setting: 0 secondsIf this parameter is set to 0, replication latency metrics are not updated in the data store.Maximum Setting: 3600 seconds (1 hour)

STARTUP The maximum amount of time, in seconds, to wait before terminating the Transformation Server initialization phase. During Transformation Server initialization prior to data replication, process termination on the publication or subscription server can result in a suspension of the initialization phase. This parameter allows you to set the maximum waiting period in this case. If a value smaller than the minimum setting (see below) is specified, the minimum setting is used. If a value larger than the maximum setting (see below) is specified, the maximum setting is used.Default Setting: 120 secondsMinimum Setting: 4 secondsMaximum Setting: 3600 seconds (1 hour)

PROGRESS The amount of time to wait, in seconds, before generating the next progress message. Progress messages are placed in the event log. If a value smaller than the minimum setting (see below) is specified, the minimum setting is used. If a value larger than the maximum setting (see below) is specified, the maximum setting is used.Default Setting: 0 seconds (no progress messages are issued)Minimum Setting: 0 seconds (no progress messages are issued)Maximum Setting: 7200 seconds (2 hours)

LCKTIMEOUT The amount of time, in seconds, Transformation Server waits for a table or row to become unlocked before generating an error message in the event log. If a value smaller than the minimum setting (see below) is specified, the minimum setting is used. If a value larger than the maximum setting (see below) is specified, the maximum setting is used.Default Setting: 30 secondsMinimum Setting: 2 secondsMaximum Setting: 60 seconds

Parameters Description

116 Printed in Canada IBM DataMirror Transformation Server

Page 117: Transformation Server for AS400 - Version 6.1

Other Commands

UNICODE The default method of treating data in defined Unicode columns. In Management Console, you can establish how data in each Unicode column in a source table is treated. For more information about settings at the column level, see the Transformation Server Management Console Administration Guide. For each Transformation Server installation on a server, this parameter defines the system default method of treating data in Unicode columns. If a Unicode column in Management Console is set to the system default, the current system default method, as defined by this parameter, is used.The following DB2 UDB for iSeries data types are considered to be Unicode columns, and are therefore affected by the value assigned to this parameter:• GRAPHIC or VARGRAPHIC with code page 1208 (UTF-8)• CHARACTER or VARCHAR with code page 1208 (UTF-8)Enter one of the following values:*SAME—Keeps the present setting for this parameter.CHAR—Transformation Server treats all data in Unicode columns as single-byte characters. Use this setting when Unicode columns contain single-byte character data.NOCHANGE—Transformation Server treats all data in Unicode columns as a continuous bit stream. Use this setting when Unicode columns contain nonsingle- byte character data. NOCHANGE ensures Transformation Server handles non-single-byte character data in the same way as previous Transformation Server releases. NOCHANGE does not ensure that replicated non-single-byte character data in Unicode columns are represented properly on the subscription server. For replicated non-single-byte character data, you may have to apply user exit programs or other customizations to properly represent the data in Unicode columns. For more information about user exit programs, see the Transformation Server for AS/400 User Exits Guide.Default Setting: *SAMEFor more information about the handling of data in Unicode columns with the Unicode Handling system parameter, see the Transformation Server Management Console Administration Guide.

Parameters Description

© DataMirror Corporation, an IBM Company Printed in Canada 117

Page 118: Transformation Server for AS400 - Version 6.1

Other Commands

ResultRelevant messages are produced to the job log.

Example CHGDMSVAL JOURNAL(JRNLIB/JRN1) NOTIFYQ(NOTQLIB/NOTQ1) NOTIFYCNT(10) RESTORE(*IMMED) AUTCDE(12345678) UPDCOLUMN(*NO) CASCADE(*NO) REFWHLACT(*YES) USDEFJRN(*YES) HEARTTIME(60) REPTPOSTIM(120) BKMARKSYNC(15) MONSAMPFRQ(15) STARTUP(180) PROGRESS(5) LCKTIMEOUT(40) UNICODE_IS(CHAR) AUDFILTRAN(*YES)

Tables are journaled to journal JRN1 located in library JRNLIB.Notification messages are sent to message queue NOTQ1 that is located in library NOTQLIB.Transformation Server can detect up to 10 errors before a notification is sent to the message queue.Tables are refreshed immediately when Transformation Server detects a restore.The authorization code is 12345678.

AUDFILTRAN Indicates whether or not to audit both before and after images after a row update results in only one of these images satisfying a defined row selection expression. Environments that may want to enable this system parameter are:• Using LiveAudit to audit source table changes.• Recording both the before and after images in the subscription audit table when a row

update operation is applied to the assigned source table.• Using row selection to filter rows placed in the subscription audit table. You can use this

parameter to override row selection when it is necessary to audit both before and after images in the subscription audit table, but only one of these images satisfies the defined row selection expression.

You can use two journal codes (FP and FB) to identify before and after images in the subscription audit table that do not satisfy a row selection expression in this situation. For more information about these codes and how they can be accessed from the &ENTTYP journal control field, see the Transformation Server Management Console Administration Guide.Enter one of the following values:• *SAME—Keeps the present setting for this parameter.• *YES—Audits both the before and after images when a row update results in only one of

these images satisfying a defined row selection expression.• *NO—Audits only the after image that satisfies or does not satisfy a defined row

selection expression. This setting maintains existing Transformation Server behavior prior to support for this parameter.

Default Setting: *SAMEThe initial setting for this parameter differs based on whether you are upgrading from a previous Transformation Server release that does not support this parameter or installing this Transformation Server release. An initial setting of *YES applies when installing Transformation Server on an iSeries server. The initial setting for Transformation Server upgrades, as described above, is *NO. This ensures that existing product functionality is maintained after completing this type of upgrade.

Parameters Description

118 Printed in Canada IBM DataMirror Transformation Server

Page 119: Transformation Server for AS400 - Version 6.1

Other Commands

Critical column filtering and cascading replication are not enabled, but refresh whileactive is enabled.User-defined journal entries are processed for replication.The publisher waits for a maximum of 60 minutes for a reply from the subscriber before an attempt is made to end all Transformation Server publisher and subscriber jobs for a subscription.The publisher informs the subscriber every 120 seconds about its position in the current journal during inactive periods.Synchronizations between the publisher and subscriber to convey information about the last committed change are performed every 15 seconds.Updates to the data store that is used to maintain replication latency metrics are made every 15 seconds.The Transformation Server initialization phase terminates if it cannot be completed in 180 seconds.Progress messages are generated every 5 seconds.Transformation Server waits 40 seconds for a table or row to become unlocked before generating an error message in the event log.Data in GRAPHIC, VARGRAPHIC, CHARACTER, and VARCHAR columns are treated as single-byte characters.When auditing changes applied to a source table, both the before and after images are placed in the subscription audit table when a row update results in only one of these images satisfying a defined row selection expression.

© DataMirror Corporation, an IBM Company Printed in Canada 119

Page 120: Transformation Server for AS400 - Version 6.1

Other Commands

CHGDMTVAL—Set Target System ParametersUse this command to set subscriber system parameters. Parameters can also be set in Management Console. It is recommended that you modify the system parameter settings in Management Console. For more information about working with system parameters in Management Console, see Transformation Server Management Console Administration Guide.

Command SyntaxCHGDMTVAL [NOTIFYQ( )] [NOTIFYCNT( )] [AUTCDE( )] [REFRESH( )] [MIRROR( )] [COLUMNVAL( )] [NUMCOLMSG( )] [CMTCTRL( )] [MSGNOTNULL( )] [DFTDATE( )] [MONSAMPFRQ( )] [STARTUP( )] [PROGRESS( )] [LCKTIMEOUT( )] [RCDFMTCHK( )] [DBPERCENT( )]

Applies To

Target

Parameters Description

NOTIFYQ The name of the message queue where notifications are sent when the number of errors detected by Transformation Server exceeds the notify message threshold (see Chapter 4 - Transformation Server Commands © DataMirror Corporation 31 the NOTIFYCNT parameter below).Enter the name of the message queue or the following value:*SAME—Keeps the present setting for this parameter.Default Setting: *SAMEMessage Queue LibraryThe name of the library where the message queue resides must precede the name of the message queue.Enter a library name or one of the following values:• *SAME—Keeps the present setting for this parameter.• *LIBL—Specifies the set of libraries in your library list. The libraries are searched in

order for the first occurrence of the specified message queue.• *CURLIB—Specifies the current library.Default Setting: *LIBL

NOTIFYCNT The number of errors that Transformation Server generates before a notification is sent to the notify message queue (see the NOTIFYQ parameter above). Enter the number of errors or the following value:*SAME—Keeps the present setting for this parameter. If a value smaller than the minimum setting (see below) is specified, the minimum setting is used. If a value larger than the maximum setting (see below) is specified, the maximum setting is used.Default Setting: *SAMEMinimum Setting: 1 errorMaximum Setting: 99999 errors

120 Printed in Canada IBM DataMirror Transformation Server

Page 121: Transformation Server for AS400 - Version 6.1

Other Commands

AUTCDE The authorization code that is issued by DataMirror Corporation. Adjustments to the authorization code are required when moving from a temporary license to a permanent license, when machine classes have changed, or when upgrading Transformation Server to a new version.Enter the authorization code or the following value:*SAME—Keeps the present setting for this parameter.Default Setting: *SAME

REFRESH Specifies whether Transformation Server ends a data refresh when an error is encountered.Enter one of the following values:• *SAME—Keeps the present setting for this parameter.• *YES—Specifies that Transformation Server end a refresh immediately after it detects

an error.• *NO—Specifies that Transformation Server report the error and continue the refresh

after it detects the error.Default Setting: *SAMEIt is recommended that you set this parameter to *YES.

MIRROR Specifies whether Transformation Server ends mirroring when an error is encountered.Enter one of the following values:• *SAME—Keeps the present setting for this parameter.• *YES—Specifies that Transformation Server end mirroring immediately after it detects

an error.• *NO—Specifies that Transformation Server report the error and continue mirroring after

it detects the error.Default Setting: *SAMEIt is recommended that you set this parameter to *NO.

COLUMNVAL Indicates whether Transformation Server should check decimal and numeric columns for valid formats before applying the numeric data to the target table.Enter one of the following values:• *SAME—Keeps the present setting for this parameter.• *YES—Indicates that you want the data in each packed and zoned field to be validated

before it is applied to the target table. If invalid packed/zoned data is found, a message is generated and the field is set to 0 automatically.

• *NO—Indicates that you do not want the data in each packed and zoned field to be validated before it is applied to the target table. If you are sure that numeric data does not have to be validated, set this parameter to *NO to maintain existing performance levels.

Default Setting: *SAME

Parameters Description

© DataMirror Corporation, an IBM Company Printed in Canada 121

Page 122: Transformation Server for AS400 - Version 6.1

Other Commands

NUMCOLMSG Indicates how Transformation Server generates messages when it detects invalid numeric data. Transformation Server can convert invalid numeric data to zero on the subscription server (see the COLUMNVAL parameter below).Enter one of the following values:• *SAME—Keeps the present setting for this parameter.• *YES—Specifies that a message be generated for each invalid numeric field detected.• *NO—Specifies that no messages be generated for each invalid numeric field detected.

If you are sure that numeric data does not have to be validated, set this parameter to *NO to maintain existing performance levels.

• *NB—Specifies that no messages be sent when blank or uninitialized numeric fields are detected. Messages for other types of invalid numeric data are still generated.

Default Setting: *SAME

CMTCTRL Specifies the level of commitment control for transaction processing.Enter one of the following values:• *SAME—Keeps the present setting for this parameter.• *NONE—Turns off commitment control for transaction processing. No attempt to

maintain transaction consistency is performed in the event that replication is interrupted.• *LEVEL1—Only committed transactions are received by the subscriber. The

subscriber applies the transaction once the entire transaction is received from the publisher. In the event of a subscriber failure while the transaction is being applied, the transaction is re-sent and the apply is completed the next time replication is started.

Default Setting: *SAMEIf you select *LEVEL1, Refresh While Active on a publisher (see the CHGDMSVAL command) must be disabled. For more information about commitment control, see the Considerations for Commitment Control (*LEVEL1).

MSGNOTNULL Indicates whether you want to generate the same message each time an attempt is made to replicate NULL to a target table column that is not NULL-capable. Enter one of the following parameters:• *SAME—Keeps the present setting for this parameter.• *YES—Generate a message each time NULL is replicated to a target table column that

is not NULL-capable.• *NO—Do not generate a message each time NULL is replicated to a target table column

that is not NULL-capable. For all instances, you are not notified by a message.Default Setting: *SAME

Parameters Description

122 Printed in Canada IBM DataMirror Transformation Server

Page 123: Transformation Server for AS400 - Version 6.1

Other Commands

DFTDATE The date that is returned when an invalid date is passed to the %TODATE column manipulation function.Enter one of the following values:• *SAME—Keeps the present setting for this parameter.• *NEW—Returns the date 1901-01-01.• *OLD—Returns the date 0001-01-01.Default Setting: *SAMEFor information about the %TODATE function, see the Transformation Server Management Console Administration Guide.

MONSAMPFRQ The period of time, in seconds, between consecutive updates to a data store that is used to maintain replication latency metrics. The data store is referenced by Management Console to present replication latency information. This setting also represents how often the data store is sampled to determine whether or not latency has risen above or fallen below specified threshold settings. Latency messages are generated when latency rises above or falls below the thresholds, and alerts can be configured in Management Console in response to a generated message. For more information about latency threshold settings and configuring notifications in Management Console, see the Transformation Server Management Console Administration Guide.If a value smaller than the minimum setting (see below) is specified, the minimum setting is used. If a value larger than the maximum setting (see below) is specified, the maximum setting is used.Default Setting: 5 secondsMinimum Setting: 0 secondsIf this parameter is set to 0, replication latency metrics are not updated in the data store.Maximum Setting: 3600 seconds (1 hour)

STARTUP The maximum amount of time, in seconds, to wait before terminating the Transformation Server initialization phase. During Transformation Server initialization prior to data replication, process termination on the publication or subscription server can result in a suspension of the initialization phase. This parameter allows you to set the maximum waiting period in this case. If a value smaller than the minimum setting (see below) is specified, the minimum setting is used. If a value larger than the maximum setting (see below) is specified, the maximum setting is used.Default Setting: 120 secondsMinimum Setting: 4 secondsMaximum Setting: 3600 seconds (1 hour)

Parameters Description

© DataMirror Corporation, an IBM Company Printed in Canada 123

Page 124: Transformation Server for AS400 - Version 6.1

Other Commands

PROGRESS The amount of time, in seconds, to wait before generating the next progress message. Progress messages are placed in the event log. If a value smaller than the minimum setting (see below) is specified, the minimum setting is used. If a value larger than the maximum setting (see below) is specified, the maximum setting is used.Default Setting: 0 seconds (no progress messages are issued)Minimum Setting: 0 seconds (no progress messages are issued)Maximum Setting: 7200 seconds (2 hours)

LCKTIMEOUT The amount of time, in seconds, Transformation Server waits for a table or row to become unlocked before generating an error message in the event log. If a value smaller than the minimum setting (see below) is specified, the minimum setting is used. If a value larger than the maximum setting (see below) is specified, the maximum setting is used.Default Setting: 30 secondsMinimum Setting: 2 secondsMaximum Setting: 60 seconds

Parameters Description

124 Printed in Canada IBM DataMirror Transformation Server

Page 125: Transformation Server for AS400 - Version 6.1

Other Commands

Output Relevant messages are produced to the job log.Example

RCDFMTCHK Indicates whether or not Transformation Server checks the record formats of the physical and logical files when the physical file is selected to receive mirrored data using a unique key.Enter one of the following values:• *SAME—Keeps the present setting for this parameter.• *YES—Transformation Server checks the record formats of the physical and logical

files. Only a physical file that has the same record format as the logical file can be selected as a destination of mirrored data using a unique key.

• *NO—Transformation Server does not check the record formats of the physical and logical files. You can select a physical file to be the destination of mirrored data using a unique key that does not have the same record format as the logical file.

Default Setting: *SAME

DBPERCENT The size of the range around each latency threshold setting.Based on latency threshold settings defined in Management Console, a latency message is generated when latency has risen above or fallen below a threshold. Latency is calculated at regular intervals, where the interval is the current setting for the MONSAMPFRQ parameter (see above). Alerts can be configured in Management Console in response to a generated message. For more information about setting a latency threshold and configuring a notification in Management Console, see theTransformation Server Management Console Administration Guide.This parameter, which is expressed as a percentage, allows you to pad a threshold equally on both sides to create a range around the threshold. By adjusting this Transformation Server parameter, the size of the range around the threshold can be increased or decreased, and the threshold itself can be made thicker or thinner. A latency message is generated only when latency has risen above the upper limit of the range or fallen below the lower limit of the range. By changing the value assigned to this parameter, you can control the number of latency messages placed in the event log. For an example illustrating how this parameter can affect the number of latency messages that are generated, see the Deadband Percentage system parameter. For more information on the Transformation Server for AS/400 system parameters that you can configure through Management Console, see Transformation Server Management Console Administration Guide.Since there are two latency threshold settings in Management Console (a warning threshold and a problem threshold), two separate ranges are defined when this parameter is set to a non-zero value. Each range is attached to its threshold, and so the two ranges can overlap with no change in behavior. If a value smaller than the minimum setting (see below) is specified, the minimum setting is used. If a value larger than the maximum setting (see below) is specified, the maximum setting is used.Default Setting: 3%Minimum Setting: 3%Maximum Setting: 10%

Parameters Description

© DataMirror Corporation, an IBM Company Printed in Canada 125

Page 126: Transformation Server for AS400 - Version 6.1

Other Commands

CHGDMTVAL NOTIFYQ(NOTQLIB/NOTQ1) NOTIFYCNT(10) AUTCDE(23456789) REFRESH(*YES) MIRROR(*YES) COLUMNVAL(*NO) NUMCOLMSG(*NB) CMTCTRL(*NONE) MSGNOTNULL(*NO) DFTDATE(*NEW) MONSAMPFRQ(240) STARTUP(60) PROGRESS(45) LCKTIMEOUT(10) RCDFMTCHK(*NO) DBPERCENT(10)Notification messages are sent to message queue NOTQ1 located in libraryNOTQLIB.Transformation Server detects up to 10 errors before sending a notification to the message queue.The authorization code is 23456789.Refresh or mirroring ends after Transformation Server encounters an error.Data in each packed and zoned field is not validated before it is applied to the target table.No messages are generated when blank or uninitialized numeric fields are detected.Commitment control is disabled.A message is not generated each time NULL is replicated to a target table column that is not NULL-capable.The date that is returned when an invalid date is passed to the %TODATE column manipulation function is 1901-01-01.Updates to the data store that is used to maintain replication latency metrics are made every 240 seconds.The Transformation Server initialization phase terminates if it cannot be completed in 60 seconds.Progress messages are generated every 45 seconds.Transformation Server waits 10 seconds for a table or row to become unlocked before generating an error message in the event log.The record formats of the physical and logical files are not checked. Physical files selected to be the destination of mirrored data using unique key can have different record formats as compared to the record formats of the logical files.A 10% range is applied around each latency threshold setting.

Use This command only applies to subscribers

126 Printed in Canada IBM DataMirror Transformation Server

Page 127: Transformation Server for AS400 - Version 6.1

System ParametersThe following topic introduces system parameters available to you that you can use to customize the behaviour of Transformation Server:• System Parameters for Transformation Server for AS/400 on page 129

© DataMirror Corporation, an IBM Company Printed in Canada 127

Page 128: Transformation Server for AS400 - Version 6.1

128 Printed in Canada IBM DataMirror Transformation Server

Page 129: Transformation Server for AS400 - Version 6.1

System Parameters for Transformation Server for AS/400

System Parameters for Transformation Server for AS/400System parameters let you control the behaviour of Transformation Server. If your replication environment requires a particular configuration, then you can use system parameters to modify the behaviour of default operations in Transformation Server. The default system parameter settings are appropriate for most installations. DataMirror recommends maintaining these default settings until you become familiar with Transformation Server replication configuration. Transformation Server provides system parameters that control the behaviour of your source and/or target datastores.Note: If you make changes to a system parameter during active replication, you must stop and restart replication to

for the changes to take effect. Note: When upgrading to a higher version of Transformation Server, any preexisting settings for system parameters

are maintained.In this section, you will learn:• General Product System Parameters on page 129• Replication System Parameters on page 131• Cascading Replication System Parameters on page 132• Database Journal System Parameters on page 132• Remote Journal System Parameters on page 134• Commitment Control System Parameters on page 134• Multibyte Character Set System Parameters on page 135• Latency System Parameters on page 136• Notifications System Parameters on page 137• Data Types on page 139• Date/Time Column Function System Parameters on page 139• Row and Column Filtering System Parameters on page 140• Event Log System Parameters on page 141• Lock Detection System Parameters on page 141

General Product System ParametersGeneral product system parameters let you control basic features of Transformation Server and information you may have specified during installation.

Authorization Code Use this system parameter to adjust the authorization code issued by DataMirror. You may need to modify your authorization code when:• Moving from a temporary license to a permanent license• Machine classes have changed• Upgrading to a new version of Transformation ServerApplies To—Source and Target

© DataMirror Corporation, an IBM Company Printed in Canada 129

Page 130: Transformation Server for AS400 - Version 6.1

Enable *MAXOPT3 Option For information about setting this system parameter, see your DataMirror representative.Applies To—Source

Record Format Check Use this system parameter to enable or disable Transformation Server from checking record formats of the physical and logical files. Applies To—TargetThe Record Format Check system parameter can be set to either *YES or *NO:

• *YES—Enables Transformation Server to check the record formats of the physical and logical files. Only a physical file that has the same record format as the logical file can be selected as a destination of mirrored data using a unique key.

• *NO—Disables Transformation Server from checking the record formats of the physical and logical files. You can select a physical file to be the destination of mirrored data using a unique key that does not have the same record format as the logical file.

Default Setting—*YES

Startup Timeout Use this system parameter to specify the maximum amount of time (in seconds) to wait before Transformation Server terminates the initialization phase. During the initialization phase and prior to data replication, process termination on the source or target can result in a suspension of the initialization phase. This parameter allows you to set the maximum waiting period in this case.Applies To—Source and TargetDefault Setting—120 secondsMinimum Setting—4 secondsMaximum Setting—3600 secondsNote: If you set a value outside the acceptable range, then Transformation Server uses the defaults.

TCP_KEEPALIVE_SECS Use this system parameter to determine the time (in seconds) Transformation Server waits before sending a keep alive notification over the network. During idle periods, Transformation Server sends a keep alive notification to keep the connection open.Applies To—Source and TargetDefault Setting—300 seconds (5 min)Minimum Setting—0Guidelines• It is important you set this system parameter when you have a firewall connection that has been configured to timeout. This

prevents the firewall from closing the connection. • To set this system parameter, do the following:

1 Create a data area named DMCOMMS by issuing the following command:

CRTDTAARA DTAARA(<TS product library>/DMCOMMS) TYPE(*CHAR) LEN(2000)

2 Set the timeout value by issuing the following command:

CHGDTAARA DTAARA(<TS product library>/DMCOMMS (521 10)) VALUE(‘<value>’)

130 Printed in Canada IBM DataMirror Transformation Server

Page 131: Transformation Server for AS400 - Version 6.1

System Parameters for Transformation Server for AS/400

where value is a 10-digit number that represents the setting for this system parameter. For example, to set to 1 minute, issue:CHGDTAARA DTAARA(DMIRROR/DMCOMMS (521 10)) VALUE(‘0000000060’)

• To prevent the firewall from closing during active data replication, set this parameter to a value lower than the configured firewall timeout.

Replication System ParametersReplication system parameters let you control how Transformation Server behaves after detecting errors during replication. You can also control Transformation Server applies a refresh operation.

Allow Refresh While Active Use this system parameter to enable or disable Transformation Server from refreshing a target table while changes are being made to the source table. After Transformation Server completes the refresh, it sends any remaining changes that were made on the source table during the refresh to the target table.Applies To—SourceThe Allow Refresh While Active system parameter can be set to either *YES or *NO:

• *YES—Enables Transformation Server to refresh the target table while there are active changes being made on the source table.

• *NO—Disables Transformation Server from performing a refresh when there are active changes being made on the source table.

Default Setting—*YES

End on Error During Mirroring Use this system parameter to end or continue mirroring when Transformation Server encounters an error.Applies To—TargetThe End on Error During Mirroring system parameter can be set to either *YES or *NO:

• *YES—Transformation Server ends mirroring immediately after it detects an error.• *NO—Transformation Server reports the error and continues mirroring after it detects the error. This is the recommended

setting for this parameter.Default Setting—*NO

End on Error During Refresh Use this system parameter to end or continue a refresh operation after Transformation Server encounters one or more errors.Applies To—TargetThe End on Error During Refresh system parameter can be set to either *YES or *NO:

• *YES—Transformation Server ends a refresh operation immediately after it detects an error. This is the recommended setting for this parameter.

• *NO—Transformation Server reports the error and continues with the refresh operation after it detects the error.Default Setting—*YES

Refresh After Restore Use this system parameter to set when Transformation Server refreshes tables that have been restored.Applies To—Source

© DataMirror Corporation, an IBM Company Printed in Canada 131

Page 132: Transformation Server for AS400 - Version 6.1

The Refresh After Restore system parameter can be set to either *IMMED or *DELAY:• *IMMED—Transformation Server starts a Refresh of the restored tables immediately.• *DELAY—Transformation Server delays the start of a Refresh of the restored tables until the next time a refresh

operation is started. Transformation Server also delays the start of a Refresh Before Mirror.Default Setting—*IMMED

Cascading Replication System ParametersIn this section, you will learn about system parameters that let you configure Transformation Server for cascading replication.• Enable Cascading Replicates on page 132

Enable Cascading Replicates Use this system parameter to enable or disable cascading replication.Applies To—SourceThe Enable Cascading Replication system parameter can be set to either *YES or *NO:

• *YES—Enables Transformation Server to send replicated data from one target system to another target system.• *NO—Disables Transformation Server from sending replicated data from one target system to another target system.

Default Setting—*YESGuidelinesSet this system parameter to *NO if there are one or more tables being maintained at the same time on two servers.

Database Journal System ParametersDatabase journal system parameters let you manage the Transformation Server journal table.

Default Journal Library Use this system parameter to identify the library where the default Transformation Server journal resides. For more information about journals, see Transformation Server for AS/400 Commands Reference.Applies To—SourceThe Default Journal Library system parameter can be set to either the name of the library, *LIBL, or *CURLIB:

• The name of a library.• *LIBL—Specifies the set of libraries in your library list. The libraries are searched in order for the first occurrence of the

specified default journal.• *CURLIB—Specifies the current library.

Default Setting—*CURLIB

Related Topics• Default Journal Name on page 132

Default Journal Name Use this system parameter to identify the name of the Transformation Server default journal. By default, tables mirrored by Transformation Server use this journal. For more information about journals, see Transformation Server for AS/400 Commands Reference.Applies To—Source

132 Printed in Canada IBM DataMirror Transformation Server

Page 133: Transformation Server for AS400 - Version 6.1

System Parameters for Transformation Server for AS/400

Default Setting—DMCJRN

Replicate User Defined Journal Entries Use this system parameter to enable or disable Transformation Server processing user-defined journal entries for replication. For information about processing user-defined journal entries for replication, see Transformation Server for AS/400 Commands Reference.Applies To—SourceThe Replicate User Define Journal Entries system parameter can be set to either *NO or *YES.

• *NO—Disables Transformation Server from processing user-defined journal entries for replication.• *YES—Enables Transformation Server to process user-defined journal entries for replication.

Default Setting—*NOGuidelinesSetting this system parameter to *YES can impact overall performance.

Report Position Interval Use this system parameter to set how often (in milliseconds) Transformation Server informs the target system about its log position. When the source system is in idle mode and there are no log entries for the subscription, the source system informs the target system of its current log position. Using this information, the target system advances its bookmarks. Applies To—SourceDefault Setting—5 secondsMinimum Setting—1 secondMaximum Setting—300 secondsGuidelinesIf you set a low number of milliseconds, then the target system can provide accurate progress notifications that indicate how far replication has progressed. Higher milliseconds can affect the accuracy of the information displayed in progress and bookmark notifications.Note: This system parameter can also prevent Transformation Server from rereading log entries that do not apply to

the table currently being replicated.Note: If you set a value outside the acceptable range, then Transformation Server uses the defaults.

Synchronization Interval Use this system parameter to set how often, in seconds, Transformation Server performs log synchronization between the source and the target. Synchronization is achieved when the source reports to the target the position of the last committed change.Applies To—SourceDefault Setting—60 secondsMinimum Setting—1 secondMaximum Setting—300 secondsGuidelinesIf you are replicating large volumes of information, you may want to set this system parameter to a lower number to remove obsolete logs more frequently.Note: If you set a value outside the acceptable range, then Transformation Server uses the defaults.

© DataMirror Corporation, an IBM Company Printed in Canada 133

Page 134: Transformation Server for AS400 - Version 6.1

Remote Journal System ParametersRemote journal system parameters let you control if Transformation Server uses remote or local journaling when running source replication activities.

Data Origin TCP/IP NameUse this system parameter to enable Transformation Server Management Console and Transformation Server (installed on the TS/400 Source System) to use the IP address or hostname of the TS/400 Data Origin Server (where your source files reside). Applies To—TS/400 Data Origin Server

• IP Address—Enables Transformation Server Managment Console to use the IP address or hostname of the TS/400 Data Origin Server. This lets Transformation Server (installed on the TS/400 Source System) to retrieve source files from the TS/400 Data Origin Server. The value can be either the hostname or the IP address of the TS/400 Data Origin Server.

• *LOCAL— Transformation Server Management Console uses the IP address or hostname of the TS/400 Source System. Setting this system parameter to *LOCAL disables Transformation Server from performing replication activities with a remote journal.

Default Setting—*LOCAL

Data Origin PortUse this system parameter to enable Transformation Server Management Console and Transformation Server (installed on the TS/400 Source System) to use the port number of the TS/400 Data Origin Server. The value that you specify for this system parameter must match the TCP listener port number of the TS/400 Data Origin Server.Applies To—TS/400 Data Origin ServerDefault Setting—0Guidelines—You must enable the Data Origin TCP/IP Name system parameter to either the IP address or the hostname of the TS/400 Data Origin Server for this system parameter to take affect.

Relational Database Directory EntryUse this system parameter to specify the relational database directory entry added to the TS/400 Source System which references the relational database directory entry on the TS/400 Data Origin Server. Applies To—TS/400 Data Origin ServerDefault Setting—*NONEGuidelines—You must enable the Data Origin TCP/IP Name system paramater to either the IP address or the hostname of the TS/400 Data Origin Server for this system parameter to take affect.

Commitment Control System ParametersCommitment control system parameters let you control how Transformation Server issues commits to the target system.

Commitment Control Use this system parameter to enable or disable Transformation Server from using commitment control. Enabling commitment control maintains transaction consistency during replication and ensures that all transactions are applied to the target system. If there is a communications or server failure, and you have enabled this sytem parameter, then Transformation Server rolls back the partially applied transaction to the last commit. For more information about commitment control, see Considerations for Commitment Control (*LEVEL1) in Transformation Server for AS/400 Commands Reference.Applies To—Target

134 Printed in Canada IBM DataMirror Transformation Server

Page 135: Transformation Server for AS400 - Version 6.1

System Parameters for Transformation Server for AS/400

The Commitment Control system parameter can be set to *NONE or *LEVEL1:• *NONE—Disables commitment control for transaction processing. Transformation Server does not maintain transaction

consistency during replication and in the event of a communications or server failure. To ensure consistency across different platforms and previous releases of Transformation Server, disabling commitment control is the default setting for this parameter.

• *LEVEL1—Enables Transformation Server to use commitment control against the target system after applying all rows. This setting provides true transaction consistency by ensuring that entire transactions are committed to the target database even in the event of a communications or server failure.

Default Setting—*NONEGuidelinesIf you select *LEVEL1, you must disable the system parameter Refresh While Active on the source.

Related Topics• Allow Refresh While Active on page 131

Multibyte Character Set System ParametersMultibyte character set system parameters let you control how Transformation Server treats character sets during replication.

Unicode Handling Use this system parameter to set how Transformation Server treats data in a defined Unicode column. This system parameter defines the system default method of treating data in Unicode columns for each installation of Transformation Server on a server.Applies To—SourceThe following DB2 UDB for iSeries data types are considered to be Unicode columns and are affected by the value assigned to this system parameter:

• GRAPHIC or VARGRAPHIC with code page 1208 (UTF-8)• CHARACTER or VARCHAR with code page 1208 (UTF-8)

The Unicode Handling system parameter can be set to either CHAR or NOCHANGE:• CHAR—Transformation Server treats all data in Unicode columns as single-byte characters. Use this setting when

Unicode columns contain single-byte character data.• NOCHANGE—Transformation Server treats all data in Unicode columns as a continuous bit stream. Use this setting

when Unicode columns contain non-single-byte character data. NOCHANGE ensures that Transformation Server handles non-single-byte character data in the same way as previous Transformation Server releases.

Default Setting—NOCHANGENote: NOCHANGE does not ensure that replicated non-single-byte character data in Unicode columns are

represented properly on the target. For replicated non-single-byte character data, you may have to apply user exit programs or other customizations to properly represent data in Unicode columns. For more information about user exit programs, see Transformation Server for AS/400 User Exits Guide.

Related Topics• For more information on how to set handling for unicode character encodings, see Transformation Server Management

Console Administration Guide.

© DataMirror Corporation, an IBM Company Printed in Canada 135

Page 136: Transformation Server for AS400 - Version 6.1

Latency System ParametersLatency system parameters let you control how often Transformation Server generates a latency notification and updates latency statistics in the Event Log.

Deadband Percentage Use this system parameter to set the size of the range (in percentage) around each latency threshold. Based on the latency thresholds you have set in Management Console, Transformation Server generates a message when latency rises above or falls below the range of the threshold. Transformation Server calculates latency at regular intervals. This parameter, which is expressed as a percentage, lets you pad an equal threshold on both sides to create a range around the threshold. By adjusting this parameter, you can increase or decrease the size of the range around the threshold. Applies To—TargetDefault Setting—3%Minimum Setting—3%Maximum Setting—10%ExampleFor example, if you set a latency threshold of 5 minutes in Management Console and set the Deadband Percentage to 10%, then Transformation Server applies a 10% range around the 5-minute threshold. Transformation Server performs the following calculations to determine the lower and upper limits (in minutes) of the range around the threshold:

Padding = 10% of 5 minutes = 0.5 minutes (rounded up to 1 minute)Padding is rounded up or down to the nearest whole minute.Upper limit of range = 5 minutes + 1 minute (padding) = 6 minutesLower limit of range = 5 minutes - 1 minute (padding) = 4 minutes

As a result, a latency message is generated only when latency rises above 6 minutes or falls below 4 minutes.Given sample latency over a ten minute period in where latency is calculated every minute, three latency messages are generated.

Figure 1 Latency Message Generation—10% Setting

136 Printed in Canada IBM DataMirror Transformation Server

Page 137: Transformation Server for AS400 - Version 6.1

System Parameters for Transformation Server for AS/400

If this system parameter is set to 3 (the default setting) for the same example, no padding is applied to the latency threshold. Therefore, a latency message is generated each time latency crosses over the latency threshold of 5 minutes. Based on the same sample latency in , where latency is calculated every minute, five latency messages are generated when this system parameter is set to 3 ().

Figure 2 Latency Message Generation—3% Setting

If the number of latency messages generated over the ten minute period for the 10% (3 latency messages) and 3% (5 latency messages) settings are averages, an additional 288 latency messages would be generated each day if this system parameter is not changed from its default setting to 10%.Since there are two latency thresholds that you can set (a warning threshold and a problem threshold), two separate ranges are defined when padding is at least one minute. In this case, each range is attached to its threshold, and the two ranges can overlap with no change in behavior.Note: If you set a value outside the acceptable range, then Transformation Server uses the defaults.

Monitor Sample Interval Use this system parameter to set how often (in seconds) Transformation Server updates replication latency metrics. Transformation Server samples the target system to determine if latency has risen above or fallen below the specified threshold settings.Applies To—Source and TargetDefault Setting—5 secondsMinimum Setting—0 seconds. Replication latency metrics are not updated.Maximum Setting—3600 secondsNote: Transformation Server generates latency notifications when latency rises above or falls below the thresholds

and places these in the Event Log.Note: If you set a value outside the acceptable range, then Transformation Server uses the defaults.

Related Topics• For more information on how to set latency thresholds, see Setting Latency Thresholds and Notifications in Transformation

Server Management Console Administration Guide.

Notifications System ParametersNotification system parameters let you control if Transformation Server should generate messages in the Event Log for specific events.

© DataMirror Corporation, an IBM Company Printed in Canada 137

Page 138: Transformation Server for AS400 - Version 6.1

Heartbeat Timeout Use this system parameter to increase or decrease the communication timeout interval (in minutes) before Transformation Server detects a communication problem and attempts to stop active replication processes.Transformation Server sends an internal heartbeat messages between the source and target systems to verify communications and the status of replication processes for each active subscription. If the source or target do receive a reply to a message within the specified timeout interval, then Transformation Server determines that a problem has occurred and attempts to stop all its source and target processes for each active subscription. Transfomation Server places messages (message identifiers DMU3165 and DMU0647) in the Event Log when a heartbeat timeout occurs. Applies To—SourceDefault Setting—15 minutesMinimum Setting—3 minutesMaximum Setting—999 minutesNote: If you set a value outside the acceptable range, then Transformation Server uses the defaults.

Messages on Column Not Null Capable Use this system parameter to enable or disable Transformation Server from generating a message each time it attempts to replicate NULL to a target column that is non-nullable.Applies To—TargetThe Messages on Column Not Null Capable system parameter can be set to either *YES or *NO:

• *YES—Enables Transformation Server to generate a message each time it attempts to replicate NULL to a target column that is non- nullable.

• *NO—Disables Transformation Server from generating a message each time it attempts to replicate NULL to a target column that is non-nullable. For all instances, you are notified by a message.

Default Setting—*YES

Messages on Invalid Numerics Use this system parameter to enable or disable Transformation Server from generating a message each time it detects an invalid numeric field. Applies To—TargetThe Messages on Invalid Numerics system parameter can be set to either *YES, *NO, or *NB:

• *YES—Transformation Server generates a message for each invalid numeric field detected.• *NO—Transformation Server does not generate a message for each invalid numeric field detected. If you are sure that

numeric data does not have to be validated, set this parameter to *NO to maintain existing performance levels.• *NB—Transformation Server does not generate a message when blank or uninitialized numeric fields are detected.

Messages for other types of invalid numeric data are still generated.Default Setting—*YES

Related Topics• Numeric Column Validation on page 139

Progress Status Interval Use this system parameter to set how often (in seconds) Transformation Server issues progress notifications. Transformation Server generates notifications on the source and target and these provide information about replication activities.

138 Printed in Canada IBM DataMirror Transformation Server

Page 139: Transformation Server for AS400 - Version 6.1

System Parameters for Transformation Server for AS/400

On the source, progresss notifications identify:• The bookmark sent by the source• The corresponding log name• The subscription name to which the bookmark was sentOn the target, progress notifications identify:• The bookmark received by the target• The corresponding log name• The source ID from which the bookmark was receivedApplies To—Source and TargetDefault Setting—0 seconds. No progress messages are issued.Minimum Setting—0 secondsMaximum Setting—7200 secondsNote: Transformation Server places progress notifications in the Event Log.Note: If you set a value outside the acceptable range, then Transformation Server uses the defaults.

Data TypesData type system parameters let you control how Transformation Server handles certain data types.

Numeric Column Validation Use this system parameter to enable or disable Transformation Server from checking decimal and numeric columns for valid formats before applying numeric data to the target table.Applies To—TargetThe Numeric Column Validation system parameter can be set to either *YES or *NO:

• *YES—Enables Transformation Server to validate invalid packed/zoned data before applying it to the target table. If invalid packed/zoned data is found, then Transformation Server generates a message is generated set the field to 0 automatically.

• *NO—Disables Transformation Server from validating packed/zoned data before applying it to the target table. If you are sure that numeric data does not have to be validated, set this parameter to *NO to maintain existing performance levels.

Default Setting—*YES

Date/Time Column Function System ParametersDate/Time column function system parameters let you control how Transformation Server handles date and time in tables.

Default Date On Error Use this system parameter to set which date Transformation Server returns when an invalid date is passed to the %TODATE column function.Applies To—TargetThe Default Date On Error system parameter can be set to *NEW or *OLD:

• *NEW—Returns the date 1901-01-01.• *OLD—Returns the date 0001-01-01.

© DataMirror Corporation, an IBM Company Printed in Canada 139

Page 140: Transformation Server for AS400 - Version 6.1

Default Setting—*NEW

Related Topics• For more information about the %TODATE column function, see Date Conversion—%TODATE in the Transformation Server

Management Console Administration Guide.

Row and Column Filtering System ParametersRow and column filtering system parameters let you control what kind of data Transformation Server applies to the target system.

Audit Filtered Transactions Use this system parameter to set which images you want to audit after Transformation Server applies a row update that satisifies a row-filtering expression. By default, Transformation Server audits both the before and after images after applying a row update that satisfies a row-filtering expression. Applies To—SourceThe Audit Filtered Transactions system parameter can be set to either *YES or *NO:

• *YES—Audits both the before and after images when a row update results in only one of these images satisfying a defined row-filtering expression.

• *NO—Audits only the after image that satisfies or does not satisfy a defined row-filtering expression.Default Setting—*YESGuidelines• You can use this system parameter to override a row-filtering expression when it is necessary to audit both before and after

images in the target table, but only one of these images satisfies the row-filtering expression. In this scenario, you can use two journal codes (FP and FB) to identify the images in the target audit table that do not satisfy the row-filtering expression.You may want to enable this system parameter to *YES when:• Using LiveAudit to audit changes made on the source table.• Recording both the before and after images in the target audit table when a row update operation is applied to the

assigned publication table.• Using row-filtering expressions to filter rows placed in the target audit table.

Note: Previous releases of Transformation Server do no support this system parameter.Note: The listed default setting (*YES) applies only to new Transformation Server installations on an iSeries server.

The default setting for Transformation Server upgrades is *NO. This setting maintains existing Transformation Server behavior prior to support for this system parameter.

Related Topics• For more information about journal codes, see the section on Journal Control Fields in the Transformation Server

Management Console Administration Guide.

Critical Column Filtering Use this system parameter to enable critical column selection.Applies To—SourceThe Critical Column Filtering system parameter can be set to either *YES or *NO:

• *YES—Enables critical column selection.• *NO—Disables critical column selection.

Default Setting—*NO

140 Printed in Canada IBM DataMirror Transformation Server

Page 141: Transformation Server for AS400 - Version 6.1

System Parameters for Transformation Server for AS/400

Event Log System ParametersEvent log system parameters let you control how Transformation Server interacts with the notify message queue.

Notify Message Queue Use this system parameter to identify the name of the message queue that Transformation Server uses to send notifications when the number of errors exceeds the notify message threshold system parameter.Applies To—Source and TargetDefault Setting—QSYSOPRNote: You can set the notify message threshold using the Notify Mesage Threshold system parameter.

Related Topics• Notify Message Threshold on page 141

Notify Message Queue Library Use this system parameter to identify the name of the library where the notify message queue resides. Applies To—Source and TargetYou can set the Notify Message Queue Library system parameter to one of the following:

• The name of a library• *LIBL—Specifies the set of libraries in your library list. The libraries are searched in order for the first occurrence of the

specified message queue.• *CURLIB—Specifies the current library.

Default Setting—*LIBL

Related Topics• Notify Message Queue on page 141

Notify Message Threshold Use this system parameter to identify the number of errors that Transformation Server generates before it sends a notification to the notify message queue. Applies To—Source and TargetDefault Setting—1 error

Related Topics• Notify Message Queue on page 141

Lock Detection System ParametersLock detection system parameters let you control how Transformation Server behaves when it encounters a locked table.

Lock Timeout Value Use this system parameter to set the amount of time (in seconds) that Transformation Server waits before attempting to modify a locked user or metadata table. When Transformation Server attempts to modify a locked table, it places a notification in the Event Log. These notifications identify the specific table and row that Tranformation Server could not modify.Applies To—Source and Target

© DataMirror Corporation, an IBM Company Printed in Canada 141

Page 142: Transformation Server for AS400 - Version 6.1

Default Setting—30 secondsMinimum Setting—2 secondsMaximum Setting—60 secondsNote: If a table or row is locked, Transformation Server waits for a specified timeout period to expire before

attempting to apply data again.Note: If you set a value outside the acceptable range, then Transformation Server uses the defaults.

142 Printed in Canada IBM DataMirror Transformation Server

Page 143: Transformation Server for AS400 - Version 6.1

User Exits for Transformation Server The following topics provide you with information on user exits you can configure for Transformation Server for AS/400:• Invoking User Exit Programs Before and After Table and Row-Level Operations on page 145• Invoking User Exit Programs from Expressions and Row-Filtering Expressions on page 155• Invoking User Exit Programs After Receiving a Notification on page 157• Invoking User Exit Programs for Conflict Resolution on page 161• Sample User Exit Programs on page 163

© DataMirror Corporation, an IBM Company Printed in Canada 143

Page 144: Transformation Server for AS400 - Version 6.1

144 Printed in Canada IBM DataMirror Transformation Server

Page 145: Transformation Server for AS400 - Version 6.1

Invoking User Exit Programs Before and After Table and Row-Level Operations

Invoking User Exit Programs Before and After Table and Row-Level OperationsYou can invoke user exit programs before and/or after table-level and row-level operations that Transformation Server applies to target tables. Table-level operations include table truncate and refresh. Row-level operations include inserts, updates, and deletes. User exit programs let you furthur specify what you want done to the mapped target table before and/or after Transformation Server applies table/row-level operations. You can write table-level or row-level user exit programs in the following languages:• RPG • COBOL • C • C++ When writing a user exit program, you need to define an entry parameter list. After writing the user exit program, you can configure Transformation Server to call the program by specifying its name and location in the User Exits tab of Transformation Server Management Console.Transformation Server calls your user exit progrm before it begins target jobs. You should note the following information about user exit programs in relation to target jobs:• If a user exit program does not exist when the target job begins, the target job will end.• If a user exit program fails with an unhandled exception, the target job will end.• If a table/row-level operation fails, the after user exit program may not be invoked.

Files Created with SHARE *YES OptionFiles created with the SHARE *YES option may cause problems if they are used in user exit programs. The full (first) open of a shared file determines the open mode and open options for subsequent (shared) opens of the same shared file. This means that if a shared file is being updated by Transformation Server, and is also used in a user exit program, a potential for conflicting requirements regarding open options exists. If the full open of the file does not specify the open mode and options required by the program to open the file the second time, the second attempt may fail. Therefore, avoid using shared files that Transformation Server is also updating in user exit programs.

DMCJOBD Job DescriptionDataMirror recommends that you place your user exit program in the product library to ensure Transformation Server invokes them during replication. The default Transformation Server job description called DMCJOBD is created in the product library during installation. The library list used by Transformation Server jobs must include the libraries where you have placed your user exit program. Since the library list for the default job description references the Transformation Server product library, it is recommended that you place the user exit programs in the product library to ensure they are found during replication. In this section, you will learn:• Entry Parameters for Table/Row-Level User Exits in RPG on page 146• Entry Parameters for Table/Row-Level User Exits in COBOL on page 150• Entry Parameters for Table/Row-Level User Exits in C/C++ on page 153

© DataMirror Corporation, an IBM Company Printed in Canada 145

Page 146: Transformation Server for AS400 - Version 6.1

Invoking User Exit Programs Before and After Table and Row-Level Operations

Entry Parameters for Table/Row-Level User Exits in RPGEntry Parameter List Descriptions for Table/Row-Level Operations (RPG)Table 1 describes each parameter in the entry parameter list that must be defined in each RPG table/row-level user exit program.

Parameter Description

Return Code (RTNCD) The return code that indicates whether or not the user exit program was successful. In the user exit program, return an error message ID if errors occurred in the user exit program or blank characters if no errors occurred in the user exit program.

User Exit Program Name (PGMNM)

The name of the user exit program that was called. This is the name of the program that you specify in Management Console. For more information on how to configure user exits in Management Console, see Transformation Server Management Console Administration Guide.

User Exit Point (ENTRYB) The table/row-level user exit point where the user exit program was called.Returns either:• 1—Before Clear• 2—After Clear• 3—Before Insert• 4—After Insert• 5—Before Update• 6—After Update• 7—Before Delete• 8—After Delete• 9—Before Refresh• 10—After Refresh

Publisher Before Image (BDATA)

The row before image in the source table.

Publisher After Image (ADATA)

The row after image in the source table.

Publisher Before Image NULL Indicator Count (BNULCB)

The number of NULL-capable fields in the before image (see BDATA above). Each NULL-capable field will have a NULL indicator (see BNULL below)

Publisher After Image NULL Indicator Count (ANULCB)

The number of NULL-capable fields in the after image (see ADATA above). Each NULL-capable field will have a NULL indicator (see ANULL below).

Publisher Before Image NULL Indicators (BNULL)

NULL indicators for all NULL-capable fields in the before image (see BDATA above).Returns either:• 0—NULL-capable field is not set to NULL.• 1—NULL-capable field is set to NULL.

146 Printed in Canada IBM DataMirror Transformation Server

Page 147: Transformation Server for AS400 - Version 6.1

Invoking User Exit Programs Before and After Table and Row-Level Operations

Publisher After Image NULL Indicators (ANULL)

NULL indicators for all NULL-capable fields in the after image (see ADATAabove).Returns either:• 0—NULL-capable field is not set to NULL.• 1—NULL-capable field is set to NULL.

Publisher Before Image Journal Data (BJRNL)

Journal control information associated with the before image (see BDATA above). For information about the accessible journal control information, see Journal Control Fields below

Publisher After Image Journal Data (AJRNL)

Journal control information associated with the after image (see ADATA above).For information about the accessible journal control information, see Journal Control Fields below.

Subscriber Final Image Length (DTLNGT)

The length of the fully formatted (final) image (see ATDATA below) that will be applied to the target table. The fully formatted (final) image and the length of this image will contain inconsistent information in the following situation:Note: When the subscriber job is operating under SQL update mode (in the

target system parameters), an update operation is performed, and there are target columns with default values. In this case, the length of the final image and the image itself will not include the columns with the default values. Therefore, the length of the final image for a row update operation will be shorter than the length of the final image for a row insert operation.

Subscriber Final Image (ATDATA)

The fully formatted (final) image that will be applied to the target table.Note: When the subscriber job is operating under SQL update mode (in the

target system parameters), an update operation is performed, and there are target columns with default values. In this case, the length of the final image and the image itself will not include the columns with the default values. Therefore, the length of the final image for a row update operation will be shorter than the length of the final image for a row insert operation.

The fully formatted image contains the results of data transformations applied to the replicated after image in the target environment. For target tables that have been mapped under summarization, row consolidation (one-to-one and one-to-many), and adaptive apply, this image, in before user exit program invocations, will contain only default values (blanks, zeroes, and so on) instead of the final image.

Subscriber Final Image NULL Indicator Count (NULCNT)

The number of NULL-capable fields in the fully formatted (final) image. Each NULL-capable field will have a NULL indicator (see NULIND below).

Parameter Description

© DataMirror Corporation, an IBM Company Printed in Canada 147

Page 148: Transformation Server for AS400 - Version 6.1

Invoking User Exit Programs Before and After Table and Row-Level Operations

Journal Control FieldsBoth the BJRNL and AJRNL parameters (see Table 1) contain the following journal control fields.

Subscriber Final Image NULL Indicators (NULIND)

NULL indicators for all NULL-capable fields in the fully formatted (final) image.Returns either:• 0—NULL-capable field is not set to NULL.• 1—NULL-capable field is set to NULL.

source identifier (SYSTEM) The source identifier identifying the subscription containing the source table. Source identifiers and subscriptions are defined in Management Console. For more information about source identifiers and subscriptions, see the TTransformation Server Management Console Administration Guide.

Journal Control Field Description

Journal Entry Length (JOEENTL)

The length of the journal entry that includes the entry length field and allsubsequent positions of the journal entry.

Journal Sequence Number(JOSEQN)

The sequence number assigned to the journal entry by the system.

Journal Name (JOJRN) The name of the journal.

Journal Library (JOJRNLIB)

The name of the library where the journal is located.

Journal Receiver (JORCVNME)

The name of journal receiver attached to the journal.

Journal Receiver Library(JORCVLIB)

The name of the library where the journal receiver is located.

Journal Entry Code (JOCODE)

The primary category of the journal entry.

Journal Entry Type (JOENTT)

The type of user-created or system-created entry.

System Entry Type (ENTTSYS)

The type of system-created entry.

Journal Entry Timestamp(JOTSTP)

The system date and time when the entry was journaled.

Publisher Job Name (JOJOB)

The name of the job that generated the journal entry.

Publisher Job User (JOUSER)

The user profile of the user that started the job (see JOJOB above).

Parameter Description

148 Printed in Canada IBM DataMirror Transformation Server

Page 149: Transformation Server for AS400 - Version 6.1

Invoking User Exit Programs Before and After Table and Row-Level Operations

The total length of all journal control fields is 191. This is equal to the defined size of both the BJRNL and AJRNL parameters. For more information about the journal control fields, see the appropriate IBM publication.

Publisher Job Number (JONBR)

The job number of the job generated the journal entry (see JOJOB above).

Publisher Program Name (JOPGM)

The name of the program that generated the journal entry.

Ssource Table Name (JOOBJ)

The name of the source for which the journal entry was generated.

Source Table Library (JOLIB)

The name of the library containing the source table (see JOOBJ above).

Source Table Member Name (JOMBR)

The name of the physical file member.

Publication RRN (JOCTRR)

The relative record number (RRN) of the row that caused the journal entry or a count that is pertinent to the specific type of journal entry.

Journal Flag (JOFLAG) Based on the type of entry, indicates whether or not there is extended information.The following values determine whether or not extended information is presented:• 1—Extended information is available.• 0—No extended information is available.The extended information is placed immediately after the Entry Specific Data and will have the following structure:• Length (4 bytes)—Total length of the extended entry.• Format (7 bytes)— Format of extended information. Currently, it is ‘DM_0100’.• Extended Object Name (128 bytes)—Full name of source table.• Extended Schema Name (137 bytes)—Full name of source schema.

Commit Cycle ID (JOCCID)

The number that identifies the commit cycle. This number only applies to an entry associated with a commitment transaction.

Publisher Job User (JOUSPF)

The name of the user profile under which the job (see JOJOB above) was running when the entry was created.

Publication Server Name (JOSYNM)

The name of the system on which the journal entry was generated.

Journal Control Field Description

© DataMirror Corporation, an IBM Company Printed in Canada 149

Page 150: Transformation Server for AS400 - Version 6.1

Invoking User Exit Programs Before and After Table and Row-Level Operations

Entry Parameters for Table/Row-Level User Exits in COBOLParameter Description

Return Code (LK-RETURN-CODE)

The return code that indicates whether or not the user exit program was successful. In the user exit program, return an error message ID if errors occurred in the user exit program or blank characters if no errors occurred in the user exit program.

User Exit Program Name (LKPROGRAM)

The name of the user exit program that was called. This is the name of the program that you specify in Management Console. For more information on how to configure user exits in Management Console, see Transformation Server Management Console Administration Guide.

User Exit Point (LK-ENTRY) The table/row-level user exit point where the user exit program was called.Returns either:• 1—Before Clear• 2— After Clear• 3—Before Insert• 4—After Insert• 5—Before Update• 6—After Update• 7—Before Delete• 8—After Delete• 9—Before Refresh• 10—After Refresh

Publisher Before Image (LK-BEFORE-RECORD)

The row before image in the source table.

Publisher After Image (LK-AFTER- RECORD)

The row after image in the source table.

Publisher Before Image NULL Indicator Count (LK BEFORE-NULLIND-CNT)

The number of NULL-capable fields in the before image (see LK-BEFORE-RECORD above).Each NULL-capable field will have a NULL indicator (see LK-BEFORENULLINDS below).

Publisher After Image NULL Indicator Count (LK-AFTER-NULLIND-CNT)

The number of NULL-capable fields in the after image data (see LK-AFTER RECORD above). Each NULL-capable field will have a NULL indicator (see LK-AFTERNULLINDS below).

Publisher Before Image NULL Indicators (LK-BEFORE-NULLINDS)

NULL indicators for all NULL-capable fields in the before image (see LKBEFORE-RECORD above).Returns either:• 0—NULL-capable field is not set to NULL.• 1—NULL-capable field is set to NULL.

150 Printed in Canada IBM DataMirror Transformation Server

Page 151: Transformation Server for AS400 - Version 6.1

Invoking User Exit Programs Before and After Table and Row-Level Operations

Publisher After Image NULL Indicators (LK-AFTER-NULLINDS)

NULL indicators for all NULL-capable fields in the after image (see LKAFTER-RECORD above).Returns either• 0—NULL-capable field is not set to NULL.• 1—NULL-capable field is set to NULL.

Publisher Before Image Journal Data (LK-BEFORE-JOURNAL

Journal control information associated with the before image. (see LK-BEFORE-RECORD above).

Publisher After Image JournalData (LK-AFTER-JOURNAL)

Journal control information associated with the after image data (see LKAFTERRECORD above).

Subscriber Final Image Length(LK-DATA-LENGTH)

The length of the fully formatted (final) image (see LK-DM-BUFFER below) that will be applied to the target table.Note: The parameters containing the fully formatted (final) image and the

length of this image will contain inconsistent information in the following situation: when the subscriber job is operating under SQL update mode (in the subscription system parameters), an update operation is performed, and there are subscription columns with default values. In this case, the length of the final image and the image itself will not include the columns with the default values. Therefore, the length of the final image for a row update operation will be shorter than the length of the final image for a row insert operation.

Subscriber Final Image (LK-DM-BUFFER)

The fully formatted (final) image that will be applied to the target table.The fully formatted image contains the results of data transformations that may have been applied to the replicated after image in the target environment. For target tables that have been assigned under summarization, row consolidation (one-to-one and one-to-many), and adaptive apply,this image, in before user exit program invocations, will contain only default values (blanks, zeroes, and so on) instead of the final image.Note: The parameters containing the fully formatted (final) image and the

length of this image will contain inconsistent information in the following situation: when the subscriber job is operating under SQL update mode (in the subscription system parameters), an update operation is performed, and there are subscription columns with default values. In this case, the length of the final image and the image itself will not include the columns with the default values. Therefore, the length of the final image for a row update operation will be shorter than the length of the final image for a row insert operation.

Subscriber Final Image NULL Indicator Count (LK DM-NULLIND-CNT)

The number of NULL-capable fields in the fully formatted (final) image (see LK-DM-BUFFER above). Each NULL-capable field will have a NULL indicator (see LK-DM-NULLINDS below).

Parameter Description

© DataMirror Corporation, an IBM Company Printed in Canada 151

Page 152: Transformation Server for AS400 - Version 6.1

Invoking User Exit Programs Before and After Table and Row-Level Operations

Journal Control FieldsBoth the LK-BEFORE-JOURNAL and LK-AFTER-JOURNAL variables in the linkage section contain the journal control fields listed in Entry Parameter List Descriptions for Table/Row-Level Operations (RPG) (Table 2).

Subscriber Final Image NULLIndicators (LK-DM-NULLINDS)

NULL indicators for all NULL-capable fields in the fully formatted (final) image (see LK-DM-BUFFER above).Returns either:• 0—NULL-capable field is not set to NULL.• 1—NULL-capable field is set to NULL.

source identifier (LK-SYSTEMID)

The source identifier identifying the subscription containing the source table.Source identifiers and subscriptions are defined in Management Console. For more information on how to add a subscription in Management Console, see Transformation Server Management Console Administration Guide.

Parameter Description

152 Printed in Canada IBM DataMirror Transformation Server

Page 153: Transformation Server for AS400 - Version 6.1

Invoking User Exit Programs Before and After Table and Row-Level Operations

Entry Parameters for Table/Row-Level User Exits in C/C++Parameter Description

Return Code (pReturnCode)

The return code that indicates whether or not the user exit program was successful. In the user exit program, return an error message ID if errors occurred in the user exit program or blank character if no errors occurred in the user exit program.

User Exit Program Name(pProgramName)

The name of the user exit program that was called. This is the name of the program that you specify in Management Console. For more information on how to configure a user exit program in Management Console, see Transformation Server Management Console Administration Guide.

User Exit Point(entryPointCode)

The table/row-level user exit point where the user exit program was called.Returns either:• 1—Before Clear• 2—After Clear• 3— Before Insert• 4—After Insert• 5— Before Update• 6—After Update• 7—Before Delete• 8—After Delete• 9—Before Refresh• 10—After Refresh

Publisher Before Image(pBeforeRecordData)

The row before image in the source table.

Publisher After Image(pAfterRecordData)

The row after image in the source table.

Publisher Before Image NULL Indicator Count(nullIndBeforeCount)

The number of NULL-capable fields in the before image (see pBeforeRecordData above). Each NULL-capable field will have a NULL indicator (see pBeforeRecordNullInd below).

Publisher After Image NULL Indicator Count(nullIndAfterCount)

The number of NULL-capable fields in the after image (see pAfterRecordData above). Each NULL-capable field will have a NULL indicator (see pAfterRecordNullInd below).

Publisher Before Image NULL Indicators(pBeforeRecordNullInd)

NULL indicators for all NULL-capable fields in the before image (see pBeforeRecordData above).Returns either:• 0—NULL-capable field is not set to NULL.• 1—NULL-capable field is set to NULL.

© DataMirror Corporation, an IBM Company Printed in Canada 153

Page 154: Transformation Server for AS400 - Version 6.1

Invoking User Exit Programs Before and After Table and Row-Level Operations

Journal Control FieldsBoth the pBeforeJournalHeader and pAfterJournalHeader parameters contain the journal control fields listed in Entry Parameter List Descriptions for Table/Row-Level Operations (RPG) (Table 2).

Publisher After Image NULL Indicators(pAfterRecordNullInd)

NULL indicators for all NULL-capable fields in the after image (see pAfterRecordData above).Returns either:• 0—NULL-capable field is not set to NULL.• 1—NULL-capable field is set to NULL.

Publisher Before Image Journal Data (pBeforeJournalHeader)

Journal control information associated with the before image. For information about the accessible journal control information, see Journal Control Fields below.

Publisher After Image Journal Data (pAfterJournalHeader)

Journal control information associated with the after image. For information about the accessible journal control information, see Journal Control Fields below.

Subscriber Final Image Length(internalDataLength)

The length of the fully formatted (final) image (see pTSInternalBuffer below) that will be applied to the target table.1

Subscriber Final Image(pTSInternalBuffer)

The fully formatted (final) image that will be applied to the target table. FOOTNOTENote: The fully formatted image contains the results of data transformations

that may have been applied to the replicated after image in the target environment. For target tables that have been mapped under summarization, row consolidation (one-to-one and one-to-many), and adaptive apply, this image, in before user exit program invocations, will contain only default values (blanks, zeroes, and so on) instead of the final image.

Subscriber Final Image NULLIndicator Count(internalNullIndCount)

The number of NULL-capable fields in the fully formatted (final) image (see pTSInternalBuffer above). Each NULL-capable field will have a NULL indicator (see pTSInternalNullInd below).

Subscriber Final Image NULL Indicators(pTSInternalNullInd)

NULL indicators for all NULL-capable fields in the fully formatted (final) image (see pTSInternalBuffer above).Returns either:• 0—NULL-capable field is not set to NULL.• 1—NULL-capable field is set to NULL.

source identifier (pSourceSystemId)

The source identifier identifying the subscription containing the source table. Source identifiers and subscriptions are defined in Management Console. For more information on how to add a subscription in Management Console, see Transformation Server Management Console Administration Guide.

Parameter Description

154 Printed in Canada IBM DataMirror Transformation Server

Page 155: Transformation Server for AS400 - Version 6.1

Invoking User Exit Programs from Expressions and Row-Filtering Expressions

Invoking User Exit Programs from Expressions and Row-Filtering ExpressionsYou can invoke user exit programs from expressions and row filtering expressions in Transformation Server Management Console:• Expressions—Expressions are stored and evaluated on target columns. For example, you can create an expression that:

calls a user exit program. You can build an expression that contains a valid call to the %USER column manipulation function. • Row-filtering expressions—In order to include or exclude particular rows for replication, you need to build a row-filtering

expression. All row-filtering expressions that you define must return a boolean result. You can build a row-filtering expression that contains a valid call to the %USER column manipulation function.

The user exit program should return a result that is used in the expression to populate data in a table column. Use the column manipulation function (%USER) to call user exit programs from either type of expression. You can build the expression in Transformation Server Management Console. For more information, see Transformation Server Management Console Guide.

© DataMirror Corporation, an IBM Company Printed in Canada 155

Page 156: Transformation Server for AS400 - Version 6.1

Invoking User Exit Programs from Expressions and Row-Filtering Expressions

156 Printed in Canada IBM DataMirror Transformation Server

Page 157: Transformation Server for AS400 - Version 6.1

Invoking User Exit Programs After Receiving a Notification

Invoking User Exit Programs After Receiving a NotificationYou can invoke a user exit program after receiving a notification in Transformation Server Management Console. You may prefer to set up a user exit that triggers certain operations upon specific Transformation Server events. If you want to invoke user exit programs when Transformation Server generates a notification, the library list for the job description that is used by Transformation Server jobs must include the libraries where the user exit programs reside. Since the library list for the default job description references the Transformation Server product library, it is recommended that you place the user exit programs in the product library to ensure they are found during replication.

Related Topics• For more information on how to setup a notification so that it is handled by a user exit program, see To set a notification using

a user exit Program (TS for AS/400 ) in Transformation server Management Console Administration Guide.

Parameter Description

Return Code (RTNCD) The return code that indicates whether or not the user exit program wassuccessful.In the user exit program, return blank characters if no errors occurred in the user exit program or non-blank characters if an error occurred.

User Exit Program Name (PGMNM)

The name of the user exit program that was called.This is the name of the program that you specify in Management Console. For more information on how to configure a user exit in Management Console, see Transformation Server Management Console Administration Guide.

Source (Publisher) or Target(Subscriber) Indicator (ENGTYP)

The environment in which the user exit program was called.Returns either:• 1: Publisher• 2: Subscriber

Publisher ID or Subscription(SRTGTN)

The source identifier (if program was called from a target) or the name of the subscription (if program was called from a source) from which the user exit program was called.Source identifiers and subscriptions are defined in Management Console. For more information on how to add a subscription in Management Console, see the Transformation Server Management Console Administration Guide.

© DataMirror Corporation, an IBM Company Printed in Canada 157

Page 158: Transformation Server for AS400 - Version 6.1

Invoking User Exit Programs After Receiving a Notification

Zone (ZONE) The functional zone for which the user exit program was invoked.If Source (Publisher) or Target (Subscriber) Indicator (see above) is set to 1,one of the following zone settings apply:• 1: SCRAPE/REFRESH• 2: COMMUNICATIONS• 3: ENVIRONMENT• 4: JOURNAL/LOG MAINTENANCEIf Source (Publisher) or Target (Subscriber) Indicator (see above) is set to 2,one of the following zone settings apply:• 1: APPLY• 2: COMMUNICATIONS• 3: ENVIRONMENT

Category (CTGRY) The message category for which the user exit program was invoked.Returns either:• 1: Fatal• 2: Error• 3: Informational• 4: Status• 5: Operational

Area (AREA) A parameter reserved for future development.

Message Id (MSGID) The identifier of the message that caused the user exit program to be invoked.

Message Text (MSGTXT) The text that has been substituted into the message (see MSGID above).

Message Length (MSGLN) The length of the text (in bytes) that has been substituted into the message see MSGID above).

Send Date (SNDDTE) The date when the message (see MSGID above) was sent.The date is expressed in *ISO format.

Send Time (SNDTME) The time when the message (see MSGID above) was sent.The time is expressed in *ISO format.

Journal Sequence Number(JOSGN)

Journal Name (JOJRN)

Journal Library (JOJLIB)

Parameter Description

158 Printed in Canada IBM DataMirror Transformation Server

Page 159: Transformation Server for AS400 - Version 6.1

Invoking User Exit Programs After Receiving a Notification

Journal Receiver Name (JORCNM)

Journal Entry Code (JOCODE)

Journal Entry Type (JOENT)

System Entry Type (JRENT)

Journal Entry Timestamp (JOTST)

Publisher Job Name (JOJOB)

Publisher Job User (JOUSR)

Publisher Job Number (JONBR)

Publisher Program Name (JOPGM)

Source Table Name (JOOBJ)

Source Table Library (JOLIB)

Source Table Member Name (JOMBR)

Publication RRN (JOCTR)

Journal Flag (JOFLG)

Commit Cycle ID (JOCID)

Publisher Job User (JOUSPF)

Publication Server Name(JOSYNM)

Target Table Name(TGTTBL)

The name of the target table that has been identified to receive transferred data.

Parameter Description

© DataMirror Corporation, an IBM Company Printed in Canada 159

Page 160: Transformation Server for AS400 - Version 6.1

Invoking User Exit Programs After Receiving a Notification

Target Table Library(TGTLIB)

The name of the library where the target table (see TGTTBL above) is located.

Target Table Member(TGTMBR)

The name of the member in the target table that has been identified to receive transferred data.

Parameter Description

160 Printed in Canada IBM DataMirror Transformation Server

Page 161: Transformation Server for AS400 - Version 6.1

Invoking User Exit Programs for Conflict Resolution

Invoking User Exit Programs for Conflict ResolutionWhen a conflict is detected, you can resolve the conflict by invoking a customized user exit program. The program allows you to define a conflict resolution strategy that is not covered by one of the standard resolution methods (publisher wins, subscriber wins, largest value wins, or smallest value wins). The user exit program can resolve a conflict by returning a row that will be applied to the target table. For more information on how to configure conflict detection and resolution in Management Console, see the Transformation Server Management Console Administration Guide. After programs have been written and compiled, user exit programs must be referenced in Management Console in order to call them when conflicts are detected.

DMCJOBD Job DescriptionThe default Transformation Server job description called DMCJOBD is created in the product library during installation.If you want to invoke user exit programs to resolve conflicts, the library list for the job description that is used by Transformation Server jobs must include the libraries where the user exit programs reside. Since the library list for the default job description references the Transformation Server product library, it is recommended that you place the user exit programs in the product library to ensure they are found during replication.In this section, you will learn:• Entry Parameter List Descriptions for Conflict Resolution on page 162

© DataMirror Corporation, an IBM Company Printed in Canada 161

Page 162: Transformation Server for AS400 - Version 6.1

Invoking User Exit Programs for Conflict Resolution

Entry Parameter List Descriptions for Conflict ResolutionThis section describes each parameter in the entry parameter lists that must be defined in each conflict resolution user exit program. C definitions are illustrated, but conflict resolution user exit programs can be written in other languages.

dmResolveConflict Function DefinitionUse this definition to create your user exit programs:void DM_CALLING_CONVENTION dmResolveConflict(

DmCdrUeControl_t *pControl,

DmCdrUeImage_t *pBeforeImage,

DmCdrUeImage_t *pAfterImage,

DmCdrUeImage_t *pTargetImage,

DmCdrUeImage_t *pDesiredImage);

Each conflict resolution user exit program must contain a function called dmResolveConflict. If you are using multiple user exit programs in your configuration, the names of these programs can be different. For information about specifying conflict resolution user exits in Management Console, see Transformation Server Management Console Administration Guide.

Parameter Descriptions

Control Structure (*pControl)

A structure containing various items of information about the publisher and subscriber, as well as various indicators.For more information about the structure, see Control Structure.

Publisher Row Before Image(*pBeforeImage)

A structure containing the image of the row in the source table before changes were applied to the row. For information about the structure, see Row Image Structure. The control structure contains an indicator that you can use to determine whether or not this image was passed to the conflict resolutions user exit program. For more information about this structure, see Control Structure.

Publisher Row After Image(*pAfterImage)

A structure containing the image of the row in the source table after changes were applied to the row. For more information about the structure, see Row Image Structure. The control structure contains an indicator that you can use to determine whether or not this image was passed to the conflict resolutions user exit program. For more information about this structure, see Control Structure.

Subscriber Row Before Image(*pTargetImage)

A structure containing the image of the row in the target table when the user exit program was called. For more information about the structure, see Row Image Structure. The control structure contains an indicator that you can use to determine whether or not this image was passed to the conflict resolutions user exit program. For more information about this structure, see Control Structure.

Result Image (*pDesiredImage)

A structure containing the image of the row that will be applied to the target table. If the conflict is resolved by the user exit program, this is the image defined in the user exit program, returned to the calling environment, and subsequently applied to the target table.This parameter applies only to conflicts caused by rows being inserted or updated in the source table (see Operation Type). For row deletes, do not assign an image to this parameter. For more information about the structure, see Row Image Structure.The control structure contains an indicator that you can use to determine whether or not this image can be returned by the user exit program. For more information about this structure, see Control Structure.

162 Printed in Canada IBM DataMirror Transformation Server

Page 163: Transformation Server for AS400 - Version 6.1

Sample User Exit Programs

Sample User Exit ProgramsTransformation Server for AS/400 provides several sample user exit programs for table/row-level operations, row filtering expressions, expressions, and notifications. You can use these samples as a starting point for creating your own user exit programs by inserting your customized code. The sample user exit programs are automatically installed with Transformation Server, and are members in the DMCSRC source file that is placed in the Transformation Server product library.Table 10 identifies the samples that are provided with Transformation Server:

Warning: It is strongly recommended that you test all sample programs before they are invoked in your production environment.

Application User Exit Program Type(s)

Program Name(s)

Table/Row-Level Operations COBOL BEFOREUSER

Row Filtering Expressions COBOL USERSEL1, USERSEL2

Expressions COBOL USERDRV1, USERDRV2

Expressions CL CLDRV1, CLDRV2

Notifications COBOL DMCALRMCBL

Notifications CL DMCALRMCLP

Notifications RPG DMCALRMRPG, DMCALRMRP3

Conflict Resolution C CDRSAMPL

© DataMirror Corporation, an IBM Company Printed in Canada 163

Page 164: Transformation Server for AS400 - Version 6.1

Sample User Exit Programs

164 Printed in Canada IBM DataMirror Transformation Server

Page 165: Transformation Server for AS400 - Version 6.1

Contacting DataMirrorYou can contact DataMirror for technical support, training and education, and provide suggestions on how to improve product documentation.

Contacting Technical SupportIf you encounter problems using Transformation Server, follow the procedure outlined below:1 Consult the relevant sections of this guide, or consult the DataMirror Knowledge Base at www.datamirror.com.2 Consult your system and product event logs for messages that may contain relevant information for your problem.3 Attempt to re-create the problem. Document the steps used to do so.4 If the problem persists, record the version of Transformation Server software that you are using, details of publication and

subscription environments (database version, operating system version, host name, model number, and serial number), and any relevant messages found in the event log.

5 Contact DataMirror Technical Support by visiting the DataMirror web site at www.datamirror.com for technical support email addresses and telephone numbers.

You can also access updates and platform compatibility information from the DataMirror web site.

Training and EducationFor hands-on training, DataMirror offers public education courses regularly at education centers in different parts of the world. During the training, participants will learn from experienced trainers the basic building blocks in implementing DataMirror technology and will be given the opportunity to use DataMirror products in guided lab exercises.You can find course outlines and schedules on the DataMirror web site at www.datamirror.com/education. For more information, send email to [email protected].

Send us your CommentsDataMirror welcomes your suggestions on how to enhance Transformation Server documentation. Send your suggestions or comments by contacting us at:Customer CommentsDataMirror Corporation3100 Steeles Avenue East, Suite 1100Markham, Ontario, CanadaL3R 8T3Telephone: 1-905-415-0310Facsimile: 1-905-415-0340Email: [email protected]

TroubleshootingTroubleshooting and diagnostic information is provided in the DataMirror Knowledge Base that you can access from the DataMirror web site at www.datamirror.com. Articles in the knowledge base are categorized by product, but you can also search for information using keywords and other attributes. The knowledge base also contains articles translated into different languages.You must complete a registration process before accessing the knowledge base.

© DataMirror Corporation, an IBM Company Printed in Canada 165

Page 166: Transformation Server for AS400 - Version 6.1

166 Printed in Canada IBM DataMirror Transformation Server

Page 167: Transformation Server for AS400 - Version 6.1

Copyright NoticeThis manual is © DataMirror Corporation, an International Business Machines Corporation Company ("DataMirror"). All rights reserved. No part of this manual may be reproduced, distributed or transmitted, in whole or in part, in paper, electronic or any other form or by any means other than as expressly permitted in the applicable DataMirror Corporation Software License Agreement or Software License and Maintenance Agreement, or as otherwise expressly permitted by DataMirror Corporation, an International Business Machines Corporation Company.

Trademark NoticeCONSTELLAR, DATA FROM WHERE IT IS TO WHERE IT NEEDS TO BE, DATAMIRROR, DATAMIRROR DB/XML TRANSFORM, DATAMIRROR DB/XML VISION, DATAMIRROR SYNAPSE MOBILITY, DATAMIRROR TRANSFORMATION SERVER, DBMIRROR, ENTERPRISE ADMINISTRATOR, ERP GATEWAY, HA SUITE, HIGH AVAILABILITY SUITE, ICLUSTER, ICLUSTER FOR EMC SYMMETRIX, IDELIVER, IREFLECT, ITRANSMIT, JOBSCHEDULER, MANAGEMENT CONSOLE, OBJECTMIRROR, QUICKMARTS, SWITCHOVER SYSTEM, THE EXPERIENCE OF NOW, TRANSFORMATION SERVER, TRANSFORMATION SERVER/ES, TRANSFORMATION SERVER/EVENT SERVER, TRANSFORMATION SERVER MANAGEMENT CONSOLE, and XTREMECACHE are registered, unregistered or pending trademarks of DataMirror Corporation and may not be used without the express written permission of DataMirror Corporation. POINTBASE, POINTBASE EMBEDDED, POINTBASE MICRO, POINTBASE UNISYNC, and TRANSFORMATION SERVER FOR MOBILE are trademarks of DataMirror Mobile Solutions Inc. ("PointBase") and DataMirror Corporation's use of these trademarks is by way of license with PointBase. This list of trademarks may not be complete; other trademarks or registered trademarks may be owned by DataMirror Corporation from time to time and may be used in this manual.All other trademarks or service marks are the properties of their respective owners.

Proprietary and Confidential Information NoticeDataMirror Corporation software products contain valuable trade secrets and proprietary information and are protected internationally, including without limitation, by Canadian, United States and international copyright, trademark, and other intellectual property laws and treaties.DataMirror Corporation’s use of certain copyrights and trademarks in this manual is authorized by license from their respective owners and licensors. Unauthorized use of this manual or DataMirror Corporation software products is strictly prohibited and may result in civil damages and criminal prosecution. See the applicable DataMirror Corporation Software License Agreement or Software License and Maintenance Agreement for additional information.

DisclaimersDataMirror Corporation reserves the right to revise this manual and make periodic changes to its content without obligation on DataMirror Corporation's part to notify any person of such revisions or changes. DataMirror Corporation does not assume responsibility for the use of this manual. DataMirror Corporation makes no representation or warranty as to the accuracy of the contents of this manual. All statements made and information provided in this manual is provided on an errors and omission excepted (E. & O.E.) basis only.

IBM DATAMIRROR TRANSFORMATION SERVER® for AS/400 Version 6.1DataMirror Corporation, an International Business Machines Corporation CompanyMarch 7, 2008

© DataMirror Corporation, an IBM Company Printed in Canada 13

Page 168: Transformation Server for AS400 - Version 6.1

14 Printed in Canada IBM DataMirror Transformation Server