infosphere cdc for db2 for i (version 6.1 fix pack 2) - ibm

217
InfoSphere CDC for DB2 for i (Version 6.1 Fix Pack 2) 4 About InfoSphere CDC 7 What's new 10 System requirements for InfoSphere CDC for DB2 for i 11 Hardware and software requirements 12 Disk space and memory requirements 13 Before you install InfoSphere CDC for DB2 for i 14 Specifying InfoSphere CDC for DB2 for i product library name 15 Specifying D_MIRROR user profile 16 Previous installation of InfoSphere CDC for DB2 for i and existing D_MIRROR user profile 17 Authority requirements 18 To verify the InfoSphere CDC for DB2 for i product user profile 22 Running InfoSphere CDC for DB2 for i under adopted authority 23 To use the adopted authority programs 25 Port requirements for InfoSphere CDC for DB2 for i 26 Installing InfoSphere CDC for DB2 for i version 6.1 28 After you install InfoSphere CDC for DB2 for i 31 Configuring InfoSphere CDC for DB2 for i to use TCP/IP 32 Verifying the configuration of your Domain Name Server (DNS) 33 Verifying journal and journal receiver authorities 34 To verify the journal 35 To verify journal receivers 36 Starting the subsystem and the listener 37 Securing the InfoSphere CDC for DB2 for i product library (Optional) 38 Scheduling InfoSphere CDC for DB2 for i start up and shut down (Optional) 39 To schedule InfoSphere CDC for DB2 for i to start up or shut down automatically 40 Upgrading InfoSphere CDC for DB2 for i 41 Before you upgrade 42 Upgrading InfoSphere CDC for DB2 for i from version 6.0 to version 6.1 44 Updating InfoSphere CDC for DB2 for i to version 6.1 Fix Pack 1 45 Updating InfoSphere CDC for DB2 for i to version 6.1 Fix Pack 2 46 Creating multiple installations of InfoSphere CDC for DB2 for i 48 Creating multiple installations 49 To install InfoSphere CDC for DB2 for i multiple times 50 Verifying additional installations 51 To verify the authority of the D_MIRROR User Profile 52 To verify the attributes of the renamed subsystems 53 To verify the library list of each additional installation 54 Running additional InfoSphere CDC for DB2 for i installations 55 To run the additional installations 56 Uninstalling InfoSphere CDC for DB2 for i 57 Before you uninstall 58 Uninstalling InfoSphere CDC for DB2 for i 59 Removing the InfoSphere CDC service and port number 60 To remove 'dmirror' service 61 To remove the port number 62 Remote journaling and InfoSphere CDC for DB2 for i 63

Upload: khangminh22

Post on 22-Nov-2023

0 views

Category:

Documents


0 download

TRANSCRIPT

InfoSphere CDC for DB2 for i (Version 6.1 Fix Pack 2) 4About InfoSphere CDC 7What's new 10System requirements for InfoSphere CDC for DB2 for i 11Hardware and software requirements 12Disk space and memory requirements 13Before you install InfoSphere CDC for DB2 for i 14Specifying InfoSphere CDC for DB2 for i product library name 15Specifying D_MIRROR user profile 16Previous installation of InfoSphere CDC for DB2 for i and existing D_MIRROR user profile 17Authority requirements 18To verify the InfoSphere CDC for DB2 for i product user profile 22Running InfoSphere CDC for DB2 for i under adopted authority 23To use the adopted authority programs 25Port requirements for InfoSphere CDC for DB2 for i 26Installing InfoSphere CDC for DB2 for i version 6.1 28After you install InfoSphere CDC for DB2 for i 31Configuring InfoSphere CDC for DB2 for i to use TCP/IP 32Verifying the configuration of your Domain Name Server (DNS) 33Verifying journal and journal receiver authorities 34To verify the journal 35To verify journal receivers 36Starting the subsystem and the listener 37Securing the InfoSphere CDC for DB2 for i product library (Optional) 38Scheduling InfoSphere CDC for DB2 for i start up and shut down (Optional) 39To schedule InfoSphere CDC for DB2 for i to start up or shut down automatically 40Upgrading InfoSphere CDC for DB2 for i 41Before you upgrade 42Upgrading InfoSphere CDC for DB2 for i from version 6.0 to version 6.1 44Updating InfoSphere CDC for DB2 for i to version 6.1 Fix Pack 1 45Updating InfoSphere CDC for DB2 for i to version 6.1 Fix Pack 2 46Creating multiple installations of InfoSphere CDC for DB2 for i 48Creating multiple installations 49To install InfoSphere CDC for DB2 for i multiple times 50Verifying additional installations 51To verify the authority of the D_MIRROR User Profile 52To verify the attributes of the renamed subsystems 53To verify the library list of each additional installation 54Running additional InfoSphere CDC for DB2 for i installations 55To run the additional installations 56Uninstalling InfoSphere CDC for DB2 for i 57Before you uninstall 58Uninstalling InfoSphere CDC for DB2 for i 59Removing the InfoSphere CDC service and port number 60To remove 'dmirror' service 61To remove the port number 62Remote journaling and InfoSphere CDC for DB2 for i 63

Installing and configuring InfoSphere CDC for DB2 for i to replicate data from a remote journal 64About installing InfoSphere CDC for DB2 for i on the Data Origin Server 65About installing InfoSphere CDC for DB2 for i on the Source Server 66About installing InfoSphere CDC for DB2 for i on the Target Server 67Verifying the creation of the SQL package on the InfoSphere CDC for DB2 for i Data Origin Server68To create the SQL package 69D_MIRROR User Profile considerations for remote journals 70Configuring remote journaling 71To configure remote journaling 72Configuring InfoSphere CDC for DB2 for i Source Server to retrieve source files from theInfoSphere CDC for DB2 for i Data Origin Server 74To add a relational database directory that references the Data Origin Server 75To enable the InfoSphere CDC for DB2 for i Source Server to retrieve source files from theInfoSphere CDC for DB2 for i Data Origin Server 76Remote journal commands 77CHGJRNDM-Change remote journal receivers 78RTVDMJENT-Retrieve InfoSphere CDC remote journal entry 80VFYTSJRN-Verify remote journal 81Commands for InfoSphere CDC for DB2 for i 82Command and parameter formats and conventions 83About issuing commands in InfoSphere CDC for DB2 for i 84Replication commands 85ENDDTAMIR - End mirroring 86ENDDTARSH-End data refresh 88STRDTARSH-Start data refresh 90STRDTAMIR-Start continuous mirroring 92STRDTAMIR-Start Net Change Mirroring 94Source table commands 96ADDTBL-Add Tables 97CHGREPMTD-Change replication method 99DSLTGTTBL-Deselect source tables 101READDTBL-Update definition of source tables 103RMVTBL-Remove tables 105STRDTAMIR-Describe source tables to target tables 107SETMIRSTS-Set table status for mirroring 109SETRSHSTS-Set table status for refresh 111SLTTGTTBL-Select source tables for replication 113SETTSSYNC-Set synchronization point 116SETJRNPOS-Set journal position 117Table mapping commands 120ASNTGTTBL-Map source and target tables 121DASTGTTBL-Unmap source and target tables 124Copy subscription commands 126CPYTGTASN-Copy target configuration 127CPYTGTTBL-Copy source configuration 129Promote subscription commands 132

DUPTBL-Duplicate added table metadata 133DUPTGTASN-Duplicate subscriber metadata 135DUPTGTTBL-Duplicate selected source table metadata 137Table-level operation commands 139DMSQL-Enable/disable SQL statements 140Database journal commands 141CHGJRNDM-Change journal receivers 142CHGJRNDM-Change remote journal receivers 145DMVWBKMK-Retrieve bookmark information 147RTVDMJENT-Retrieve InfoSphere CDC journal entry 150RTVDMJENT-Retrieve InfoSphere CDC remote journal entry 152VFYTSJRN-Verify journal 153VFYTSJRN-Verify remote journal 154Communication commands 155STRDMTCP-Start InfoSphere CDC TCP/IP communications 156STRDMUDP-Start UDP Listener 159ENDDMTCP-End InfoSphere CDC TCP/IP communications 161ENDDMUDP-End UDP Listener 163End and shut down InfoSphere CDC commands 165DMENDPROC-End InfoSphere CDC jobs 166Other commands 168ADDS36TBL-Add S/36 flat file table 169DMCMVFY-Run communications verifier 171INSCDCMNT - Installing InfoSphere CDC for DB2 for i Maintenance 176RTVDMVSTS-Retrieve InfoSphere CDC installation information 178CHGDMSVAL - Set source system parameters 179CHGDMTVAL - Set target system parameters 188Data types supported by InfoSphere CDC for DB2 for i 196System parameters for InfoSphere CDC for DB2 for i 197User exits for InfoSphere CDC for DB2 for i 198Invoking user exit programs before and after table and row-level operations 199Entry parameters for table-level and row-level user exits in RPG 201Entry parameters for table-level and row-level user exits in COBOL 205Entry parameters for table-level and row-level user exits in C/C++ 208Invoking user exit programs from expressions and row-filtering expressions 210Invoking user exit programs after receiving a notification 211Invoking user exit programs for conflict resolution 214Entry parameter list descriptions for conflict resolution 215Sample user exit programs 217

-

-

-

-

-

IBM InfoSphere Change Data Capture, Version 6.1 About InfoSphere CDC IBM®InfoSphere® Change Data Capture (InfoSphere CDC) is a replication solutionthat captures database changes as they happen and delivers them to targetdatabases, message queues, or an ETL solution such as InfoSphere DataStage®based on table mappings configured in the InfoSphere CDCManagement ConsoleGUI application. InfoSphere CDC provides low impact capture and fast delivery of data changes forkey information management initiatives including dynamic data warehousing, masterdata management, application consolidations or migrations, operational BI, andenabling SOA projects. InfoSphere CDC also helps reduce processing overheadsand network traffic by only sending the data that has changed. Replication can becarried out continuously or periodically. When data is transferred from a sourceserver, it can be remapped or transformed in the target environment. The following diagram illustrates the key components of InfoSphere CDC.

The key components of the InfoSphere CDC architecture are described below:

Access Server—Controls all of the non-command line access to the replicationenvironment. When you log in to Management Console, you are connecting toAccess Server. Access Server can be closed on the client workstation withoutaffecting active data replication activities between source and target servers.Admin API—Operates as an optional Java™-based programming interface thatyou can use to script operational configurations or interactions.Apply agent—Acts as the agent on the target that processes changes as sent bythe source.Command line interface—Allows you to administer datastores and useraccounts, as well as to perform administration scripting, independent ofManagement Console.Communication Layer (TCP/IP)—Acts as the dedicated network connectionbetween the Source and the Target.

4

-

-

-

-

-

-

-

-

-

-

-

-

Source and Target Datastore—Represents the data files and InfoSphere CDCinstances required for data replication. Each datastore represents a database towhich you want to connect and acts as a container for your tables. Tables madeavailable for replication are contained in a datastore. Management Console—Allows you to configure, monitor and manage replicationon various servers, specify replication parameters, and initiate refresh andmirroring operations from a client workstation. Management Console also allowsyou to monitor replication operations, latency, event messages, and other statisticssupported by the source or target datastore. The monitor in Management Consoleis intended for time-critical working environments that require continuous analysisof data movement. After you have set up replication, Management Console can beclosed on the client workstation without affecting active data replication activitiesbetween source and target servers.Metadata—Represents the information about the relevant tables, mappings,subscriptions, notifications, events, and other particulars of a data replicationinstance that you set up.Mirror—Performs the replication of changes to the target table or accumulation ofsource table changes used to replicate changes to the target table at a later time. Ifyou have implemented bidirectional replication in your environment, mirroring canoccur to and from both the source and target tables.Refresh—Performs the initial synchronization of the tables from the sourcedatabase to the target. This is read by the Refresh reader.Replication Engine—Serves to send and receive data. The process that sendsreplicated data is the Source Capture Engine and the process that receivesreplicated data is the Target Engine. An InfoSphere CDC instance can operate asa source capture engine and a target engine simultaneously.Single Scrape—Acts as a source-only log reader and a log parser component. Itchecks and analyzes the source database logs for all of the subscriptions on theselected datastore. Not all InfoSphere CDC engines use Single Scrape. ForInfoSphere CDC for DB2® for i, there is a Scraper job (that acts as a log reader)and a Mirror job that performs the function of mirroring (see Mirror above). Source transformation engine—Processes row filtering, critical columns, columnfiltering, encoding conversions, and other data to propagate to the target datastoreengine.Source database logs—Maintained by the source database for its own recoverypurposes. The InfoSphere CDC log reader inspects these in the mirroring process,but filters out the tables that are not in scope for replication. Target transformation engine—Processes data and value translations, encodingconversions, user exits, conflict detections, and other data on the target datastoreengine.

There are two types of target-only destinations for replication that are notdatabases:

JMS Messages—Acts as a JMS message destination (queue or topic) for row-level operations that are created as XML documents.InfoSphere DataStage—Processes changes delivered from InfoSphere CDC thatcan be used by InfoSphere DataStage jobs.

5

-

-

-

-

-

IBM InfoSphere Change Data Capture, Version 6.1 About InfoSphere CDC IBM®InfoSphere® Change Data Capture (InfoSphere CDC) is a replication solutionthat captures database changes as they happen and delivers them to targetdatabases, message queues, or an ETL solution such as InfoSphere DataStage®based on table mappings configured in the InfoSphere CDCManagement ConsoleGUI application. InfoSphere CDC provides low impact capture and fast delivery of data changes forkey information management initiatives including dynamic data warehousing, masterdata management, application consolidations or migrations, operational BI, andenabling SOA projects. InfoSphere CDC also helps reduce processing overheadsand network traffic by only sending the data that has changed. Replication can becarried out continuously or periodically. When data is transferred from a sourceserver, it can be remapped or transformed in the target environment. The following diagram illustrates the key components of InfoSphere CDC.

The key components of the InfoSphere CDC architecture are described below:

Access Server—Controls all of the non-command line access to the replicationenvironment. When you log in to Management Console, you are connecting toAccess Server. Access Server can be closed on the client workstation withoutaffecting active data replication activities between source and target servers.Admin API—Operates as an optional Java™-based programming interface thatyou can use to script operational configurations or interactions.Apply agent—Acts as the agent on the target that processes changes as sent bythe source.Command line interface—Allows you to administer datastores and useraccounts, as well as to perform administration scripting, independent ofManagement Console.Communication Layer (TCP/IP)—Acts as the dedicated network connectionbetween the Source and the Target.

7

-

-

-

-

-

-

-

-

-

-

-

-

Source and Target Datastore—Represents the data files and InfoSphere CDCinstances required for data replication. Each datastore represents a database towhich you want to connect and acts as a container for your tables. Tables madeavailable for replication are contained in a datastore. Management Console—Allows you to configure, monitor and manage replicationon various servers, specify replication parameters, and initiate refresh andmirroring operations from a client workstation. Management Console also allowsyou to monitor replication operations, latency, event messages, and other statisticssupported by the source or target datastore. The monitor in Management Consoleis intended for time-critical working environments that require continuous analysisof data movement. After you have set up replication, Management Console can beclosed on the client workstation without affecting active data replication activitiesbetween source and target servers.Metadata—Represents the information about the relevant tables, mappings,subscriptions, notifications, events, and other particulars of a data replicationinstance that you set up.Mirror—Performs the replication of changes to the target table or accumulation ofsource table changes used to replicate changes to the target table at a later time. Ifyou have implemented bidirectional replication in your environment, mirroring canoccur to and from both the source and target tables.Refresh—Performs the initial synchronization of the tables from the sourcedatabase to the target. This is read by the Refresh reader.Replication Engine—Serves to send and receive data. The process that sendsreplicated data is the Source Capture Engine and the process that receivesreplicated data is the Target Engine. An InfoSphere CDC instance can operate asa source capture engine and a target engine simultaneously.Single Scrape—Acts as a source-only log reader and a log parser component. Itchecks and analyzes the source database logs for all of the subscriptions on theselected datastore. Not all InfoSphere CDC engines use Single Scrape. ForInfoSphere CDC for DB2® for i, there is a Scraper job (that acts as a log reader)and a Mirror job that performs the function of mirroring (see Mirror above). Source transformation engine—Processes row filtering, critical columns, columnfiltering, encoding conversions, and other data to propagate to the target datastoreengine.Source database logs—Maintained by the source database for its own recoverypurposes. The InfoSphere CDC log reader inspects these in the mirroring process,but filters out the tables that are not in scope for replication. Target transformation engine—Processes data and value translations, encodingconversions, user exits, conflict detections, and other data on the target datastoreengine.

There are two types of target-only destinations for replication that are notdatabases:

JMS Messages—Acts as a JMS message destination (queue or topic) for row-level operations that are created as XML documents.InfoSphere DataStage—Processes changes delivered from InfoSphere CDC thatcan be used by InfoSphere DataStage jobs.

8

IBM InfoSphere Change Data Capture, Version 6.1 What’s new The following table lists the major feature changes to InfoSphere® CDC for DB2®for i version 6.1 Fix Pack 2:

Item Description For more information, see:New command The InfoSphere CDC for

DB2 for i MaintenanceInstaller is now availablefor applying fix pack andInterim Fixes.

INSCDCMNT - InstallingInfoSphere CDC for DB2for i Maintenance

10

--

IBM InfoSphere Change Data Capture, Version 6.1 System requirements for InfoSphere CDC for DB2®for i Before you install InfoSphere® CDC, ensure that the system you choose meets thenecessary operating system, hardware, software, communications, disk, andmemory requirements. In this section, you will learn:

Hardware and software requirements Disk space and memory requirements

11

IBM InfoSphere Change Data Capture, Version 6.1 Hardware and software requirements Click the following links to view hardware and software requirements forInfoSphere® CDC, Management Console, and Access Server: Linux, UNIX, Windows and System i® replication engines: https://ibm.biz/BdxwE7 Mainframe replication engine: https://ibm.biz/BdxwXB

12

IBM InfoSphere Change Data Capture, Version 6.1 Disk space and memory requirements

RAM Disk space1 GB of available pooledmemory for InfoSphere® CDCprocesses.

10 GB

13

IBM InfoSphere Change Data Capture, Version 6.1 Specifying InfoSphere CDC for DB2 for i productlibrary name During an installation, you need to specify the name that you want to assign to theInfoSphere® CDC product library. DMIRROR is the default name. During anupgrade, the previous product library will be used and you will not be prompted tospecify the InfoSphere CDC product library. InfoSphere CDC for DB2® for i version less than or equal to 6.1 (base product)requires an Authorization code for the start of replication. Authorization codes are no longer required in InfoSphere CDC for DB2 for iversion6.1 FP1 or later.

15

IBM InfoSphere Change Data Capture, Version 6.1 Specifying D_MIRROR user profile InfoSphere® CDC automatically creates a user profile (D_MIRROR) duringinstallation which it uses to supervise replication operations. The password for thisuser profile is intentionally set to *NONE, and should not be changed. TheD_MIRROR user profile should be reserved for InfoSphere CDC. Do not use thisprofile to log on or for other purposes. If you are installing InfoSphere CDC for DB2® for i to replicate data from a remotejournal, then you must grant the D_MIRROR user profile enough object authority toaccess objects on the InfoSphere CDC Data Origin Server. Related concepts: D_MIRROR User Profile considerations for remote journals

16

----

IBM InfoSphere Change Data Capture, Version 6.1 Previous installation of InfoSphere CDC for DB2®for i and existing D_MIRROR user profile If the D_MIRROR user profile already exists from a previous installation with adifferent version of InfoSphere® CDC, you can either leave the user profileunchanged and re-configure the profile for InfoSphere CDC version 6.1, or cancelthe installation or upgrade in order to verify whether or not the profile is configuredproperly. You can verify whether or not the user profile is configured properly byissuing the following command: DSPUSRPRF USRPRF(D_MIRROR) Verify that the following parameters are set to the indicated values:

Special authority: *JOBCTLPassword is *NONE: *YESPassword expiration: *NOMessage queue: QUSRSYS/D_MIRROR

17

-----

-

-

IBM InfoSphere Change Data Capture, Version 6.1 Authority requirements Installation of InfoSphere® CDC for DB2® for i is typically done using theQSECOFR user (or any user who has *SECOFR special authorities). At a minimum,the following special authorities are required for the user installing InfoSphere CDC:

*SAVRST*SERVICE*JOBCTL*ALLOBJ*SECADM

When configuring the authority for InfoSphere CDC, there are 2 types of userprofiles to take into consideration:

InfoSphere CDC operational user—Users who run InfoSphere CDC replicationprocesses, typically users who are logged in through Management Console or whostart replication processes from the command line/job scheduler. The InfoSphereCDC source jobs are run under the InfoSphere CDC operational user profile. TheInfoSphere CDC operational user requires authorities to the replicated sourcetables, journals and journal receivers. No authorities are required for theInfoSphere CDC operational user on target tables since all the apply processes arerun under the InfoSphere CDC product user.InfoSphere CDC owner or product user—By default, the user profileD_MIRROR. The user profile D_MIRROR is automatically created duringinstallation. InfoSphere CDC requires this user profile to supervise replicationoperations for the InfoSphere CDC apply processes. The D_MIRROR user profiledoes not need authorities to the replicated source tables, journals or journalreceivers. However, all the InfoSphere CDC apply processes are run under theD_MIRROR user profile, hence the need for this profile to have update rights to thetarget tables.The password for this user profile is intentionally set to *NONE. Thisprevents users from signing on interactively and also prevents the password fromexpiring which would stop InfoSphere CDC apply processes. Optionally, apassword can be placed on the D_MIRROR account. If a password is used thenthe password expiration must be properly managed so that it does not interferewith InfoSphere CDC processing. Note: By placing a password on the D_MIRROR user profile the recursionprevention, bidirectional replication and cascaded replication features will not beavailable. The InfoSphere CDC product user profile should be reserved for InfoSphere CDC.Do not use this profile to log on or for other purposes.

InfoSphere CDC product library (*LIB) authorities

User Authority level CommentProduct user (D_MIRRORor specified user profile)

*ALL Typically, D_MIRROR isthe owner of the *LIBobject

Operational user *USE Needed to create andaccess objects in theproduct library

18

Objects (*MSGQ, *USRQ) are created for new subscriptions. In order to ensure thatall users entitled to use InfoSphere CDC can view event log messages and monitorsubscriptions activity, you should set the CRTAUT parameter to *ALL. InfoSphere CDC product object authorities

You should set the InfoSphere CDC product library create authority (CRTAUT)attribute to *ALL to ensure that newly created subscriptions can be monitored by anyuser entitled to use InfoSphere CDC. InfoSphere CDC owner user profile authorities

Replicated source table authorities

User Object type Authority level CommentProduct user(D_MIRROR orspecified userprofile)

*ALL *ALL Typically,D_MIRROR is theowner of the objectsin the productlibrary

Operational user *FILE *CHANGE Needed to configureInfoSphere CDCand monitorsubscriptions

Operational user *MSGQ*USRQ *ALL To monitorsubscription activity,view event logmessages, andremovesubscriptions

Operational user Other object types *USE  

User Special authorities CommentProduct user (D_MIRRORor specified user profile)

*JOBCTL Control replication jobssubmitted by any user

User Authority level Comment

19

Journal authorities

Journal receiver authorities

Product user (D_MIRRORor specified user profile)

None The InfoSphere CDCproduct user does notneed authorities for thereplicated source tables(*FILE PF-DTA). Apotential exception is whenyou wish to controlreplicated tables throughthe D_MIRROR userprofile (group profile,adopted authority)

Operational user *USE*OBJMGT An operational user needs*USE authorities to refresha table and to use it forcontinuous or net changemirroring.*OBJMGTauthorities are required ifjournaling for the tablesmust be started as part ofmapping the tables. Ifjournaling is alreadystarted, the *OBJMGTauthority is not required

User Authority level CommentProduct user (D_MIRRORor specified user profile)

None The InfoSphere CDCproduct user does notneed authorities to thejournal. A potentialexception is when you wishto control replicationthrough the D_MIRRORuser profile (group profile,adopted authority)

Operational user *OBJOPR*OBJMGT*OBJEXIST*READ*ADD*UPDATE*EXECUTE

These authorities arerequired to start journalingas part of mapping thetables, read the journalentries and the start theInfoSphere CDCsubscription

User Authority level Comment

20

-

Target table authorities

To verify the InfoSphere CDC for DB2 for i product user profile

Product user (D_MIRRORor specified user profile)

None The InfoSphere CDCproduct user does notneed authorities to thejournal receiver. A potentialexception is when you wishto control replicationthrough the D_MIRRORuser profile (group profile,adopted authority)

Operational user *OBJOPR*OBJMGT*OBJEXIST*READ*ADD*UPDATE*EXECUTE

At different occasions(refresh table, start andend of mirroring), user-defined journal entries arewritten into the journal tomark starting and endingpoints. Add and updateauthorities are needed tobe able to write theseentries.

User Authority level CommentProduct user (D_MIRRORor specified user profile)

*CHANGE*OBJMGT Apply processes are rununder this user profile,hence the need for thisprofile to have updaterights to the target tables.Object managementauthority is required toclear the target table usingCLRPFM in the event of arefresh

Operational user None By default, all applyprocesses are run underthe D_MIRROR userprofile; no rights areneeded for the InfoSphereCDC operational user.

21

1.

2.----

IBM InfoSphere Change Data Capture, Version 6.1 To verify the InfoSphere CDC for DB2® for i productuser profile

You can verify whether or not the InfoSphere® CDC product user profile isconfigured properly by issuing the following command:DSPUSRPRF USRPRF(<user>) where <user> is the InfoSphere CDC product user. Verify that the following parameters are set to the indicated values:

Special authority: *JOBCTLPassword: *NONE Note: Use of a password is optional. Password expiration: *NOMessage queue: QUSRSYS/D_MIRROR

22

--

IBM InfoSphere Change Data Capture, Version 6.1 Running InfoSphere CDC for DB2® for i underadopted authority To enhance security, you can change InfoSphere® CDC to run under adoptedauthority. You will need to perform the following steps:

Change program user profile parametersSubstitute adopted authority program versions

When InfoSphere CDC is installed, one of the programs will not be owned by theproduct owner D_MIRROR. Program DMRA20 in the InfoSphere CDC productlibrary is owned by user QSECOFR and adopts *OWNER authority. This program is required to adopt QSECOFR authority and is invoked when aManagement Console session is started. The TCP/IP listener job of InfoSphereCDC accepts an incoming request from the GUI and will subsequently spawn aRPLAGENT job which is running under the user profile that was configured inAccess Manager (or entered at the prompt when connecting to the agent). It is important that the owner of the program remains a user with *SECOFR specialauthorities (such as *ALLOBJ, *SECADM, and *JOBCTL) or it will not be possible toconnect to the InfoSphere CDC agent on the System i® server. Changing the program user profile parameter from *USER to*OWNER By default, all InfoSphere CDC programs are shipped with the parameter settingsUSRPRF(*USER) and USEADPAUT(*YES). For each of these programs, you mustchange the user profile (USRPRF) parameter from *USER to *OWNER.Issue thefollowing command for each of the programs listed in the table below: CHGPGM PGM(<library>/<Program_name>) USRPRF(*OWNER) where <library> is the InfoSphere CDC library.

Program nameDMSCONTROL

DMS040 DMS880 DMS891 DMT115

DMSDESCRIB

DMS050 DMS881 DMS892 DMT855

DMSMIRROR

DMS051 DMS882 DMS893 DMT861

DMSREFRESH

DMS064 DMS883 DMS894 DMT863

DMSSCRAPER

DMS110 DMS884 DMS895 DMU105

DMTAPPLY DMS140 DMS885 DMS896 DMU110DMTDESCRIB

DMS150 DMS886 DMS897 DMU115

DMTCONTROL

DMS815 DMS887 DMS898  

DMS010 DMS816 DMS888 DMT050  DMS011 DMS817 DMS890 DMT051  

23

-

Note: Instead of issuing the CHGPGM command for an individual program, you canalso specify a generic name such as DM* or *ALL for the program name. Substitute the adopted authority program versions The following InfoSphere CDC programs are also on top of the job stream, but thecharacteristics of these programs require more involved changes than just changingthe user profile (USRPRF) parameter through the CHGPGM command.

See also:

To use the adopted authority programs

Default object name Object type Adopted authorityobject name

DMRA10 *PGM DMRA10AADMT862 *PGM DMT862AADMS125 *SRVPGM DMS125AA

24

1.

2.

IBM InfoSphere Change Data Capture, Version 6.1 To use the adopted authority programs

Rename the default objects so that you can return to them if necessary. Theexample below appends the letters SV to the default object names to obtain thenew object names:RNMOBJ OBJ(<library>/DMRA10) OBJTYPE(*PGM) NEWOBJ(DMRA10SV) where <library> is the InfoSphere® CDC library. Rename the adopted authority objects to the default object names. For example:RNMOBJ OBJ(<library>/DMRA10AA) OBJTYPE(*PGM) NEWOBJ(DMRA10) where <library> is the InfoSphere CDC library.

25

IBM InfoSphere Change Data Capture, Version 6.1 Port requirements for InfoSphere CDC for DB2® fori InfoSphere® CDC requires that you allocate a set of ports for communications withclient workstations running Management Console and other servers. The ports mustbe accessible through firewalls.

Protocol Default Port IN/OUT PurposeTCP 11111 IN Accepts

connectionsfrom:ManagementConsoleAccessManagerOtherinstallations ofInfoSphere CDC asa source ofreplicationCommand line utilities

UDP 2222 IN Auto-discoveryOnlyrequired if you haveenabled theautodiscoveryfeature in AccessManager. This portlistens forbroadcasts fromAccess Managerwhich detects allrunning installationsof InfoSphere CDC.

TCP 11111 OUT When you add asubscription inManagementConsole, if thesubscription usesthe datastore youconfigured as asource of data(source datastore),then you need aTCP port so that thesubscription canconnect to thetarget datastore.

UDP 10101 OUT Auto-discoveryreplies are sentback to AccessManager on thisport. Auto-discoveryis enabled bydefault.

26

27

1.

2.

3.4.5.

--

--

--

--

--

6.

7.

-

--

IBM InfoSphere Change Data Capture, Version 6.1 Installing InfoSphere CDC for DB2 for i version 6.1 Use the following steps to install InfoSphere® CDC for DB2® for i version 6.1 onyour IBM® i system.

Sign on with authorities. Before you install InfoSphere CDC for DB2 for i, youneed 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. Restore the installation program by issuing the following command:RSTOBJOBJ(DMCINSTALL) SAVLIB(V6R1M0) DEV(*SAVF) SAVF(<library>/V6R1M0)

RSTLIB(QTEMP) where <library> is the save file library. Run the installation program by issuing the following command.?QTEMP/DMCINSTALL Press F4 to access the installation prompt screen.Specify the device name or save file informationEnter the following information:

Device NameThe save file (*SAVF) that you are using to run the installation program.

Savefile Name for Product Library NameThis value is V6R1M0.

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

Savefile Name for Tutorial NameThis value is V6R1M0TUT.

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

Press Enter to continue.Note: If the D_MIRROR user profile does not exist in theQSYS library on the server where InfoSphere CDC is being installed, proceed toStep 9. Select the D_Mirror user profile.The InfoSphere CDC D_MIRROR User ProfileExists screen appears. This screen indicates that the installation program hasdetected the existence of the D_MIRROR user profile. This user profile mayexist through a previous installation of InfoSphere CDC. InfoSphere CDCrequires 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 userprofile. Press one of the following keys:

F2—Leaves the D_MIRROR user profile unchanged. If the user profile wascreated during an installation of a previous InfoSphere CDC version, and itsconfiguration has not been changed, then the user profile should still be validfor version 6.1.F3—Reconfigures the D_MIRROR user profile for version 6.1.F4—Cancels the installation. You may want to cancel the installation to verifythat you have configured the user profile.You can verify whether or not the userprofile is configured properly by issuing the following command:

28

----

8.9.

10.11.

12.13.

--

--

--

14.

15.

--

--

DSPUSRPRF USRPRF(D_MIRROR) Verify that the following parameters are set to the indicated values:

Special authority: *JOBCTLPassword is *NONE: *YESNote: Use of a password is optional. Set password to expired: *NOMessage queue: QUSRSYS/D_MIRROR

Press Enter to continue.Press F2 to accept the terms expressed in the software license agreementdisplayed on the Software Licensing Agreement screen and start the installationPress Enter to continue.Specify the authorization code.Enter the InfoSphere CDC authorization code, asprovided by IBM Support or obtained from the IBM Web site. Note: The authorization code is no longer verified in product versions greaterthan or equal to InfoSphere CDC version 6.1 Fix Pack 1. Press Enter to continue.Specify the product and tutorial libraries.Enter the following information on theProduct and Tutorial Library screen:

InfoSphere CDC for DB2 for i Product LibraryThe name of the library where you want to install InfoSphere CDC. Thedefault product library is DMIRROR. If you specified the name of an existinglibrary, proceed to Step 10 (Optional)—Specify Product and TutorialLibraries.

InfoSphere CDC for DB2 for i Tutorial LibraryThe name of the library where you want to install the tutorial tables(optional).

InfoSphere CDC for DB2 for i IASP DeviceThe name of your Independent Auxiliary Storage Pool (IASP) device whereyou want to install InfoSphere CDC. Enter the name of the IASP device ifyou want to install InfoSphere CDC on an IASP. If you do not have an ASPdevice, then accept the default value as *SYSBAS.

You must install InfoSphere CDC and the tutorial tables into different libraries.The default tutorial library is DTUTOR. Press Enter to install InfoSphere CDC on your server. Note: The installationprogram creates the specified library and installs InfoSphere CDC on yoursystem. After the installation has been completed, a final message is generatedto indicate whether or not the installation was successful. If the installation wasunsuccessful, error messages are placed in the joblog. Use the DSPJOBLOGcommand to identify the errors and take the necessary corrective actions beforerunning the installation program again. If you specified the name of an Independent Auxiliary Storage Pool (IASP)device, then the Installation type screen appears.

F (Full product installation)Installs InfoSphere CDC product into the specified IASP device andrequired support objects (*SBSD, *CLSD, and *JOBQ) into a work library onthe 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) intothe work library on the system ASP of the machine that is connected to the

29

-

16.

17.

IASP device. Specify this option if you already have a full productinstallation of InfoSphere CDC on the connected IASP device. You can alsospecify this option when you have implemented a switchable IASPenvironment and require another copy of the work library on a secondarymachine.The installation program automatically creates the work library. The name ofthe work library is the first eight characters of your product library appendedwith 01. For example, TS60SP101. If the library exists, then the installationprogram ends.

If you specified the name of an existing library, then the Existing LibrarySpecified screen appears. In the Replace Specified Library field, specify thename of the library where you want to install InfoSphere CDC. The defaultproduct library is DMIRROR. Enter Y if you want to install InfoSphere CDC in thespecified product library, or N if you want to install into a different library. If youentered N, specify the name of a different library.Selecting Y deletes all existingcontents of this library.Press Enter to install InfoSphere CDC on your server.Note: The installationprogram creates the specified library and installs InfoSphere CDC on yoursystem. After the installation has been completed, a final message is generatedto indicate whether or not the installation was successful. If the installation wasunsuccessful, error messages are placed in the job log. Use the DSPJOBLOGcommand to identify the errors and take the necessary corrective actions beforerunning the installation program again.

Now that the software is installed on your system, you may want to install anyavailable Fix Packs. Related tasks: Upgrading InfoSphere CDC for DB2 for i from version 6.0 to version 6.1 Updating InfoSphere CDC for DB2 for i to version 6.1 Fix Pack 1 Updating InfoSphere CDC for DB2 for i to version 6.1 Fix Pack 2

30

------

IBM InfoSphere Change Data Capture, Version 6.1 After you install InfoSphere CDC for DB2® for i In this section, you will learn about the tasks you must perform after installingInfoSphere® CDC:

Configuring InfoSphere CDC for DB2 for i to use TCP/IP Verifying the configuration of your Domain Name Server (DNS) Verifying journal and journal receiver authorities Starting the subsystem and the listener Securing the InfoSphere CDC for DB2 for i product library (Optional) Scheduling InfoSphere CDC for DB2 for i start up and shut down (Optional)

31

IBM InfoSphere Change Data Capture, Version 6.1 Configuring InfoSphere CDC for DB2® for i to useTCP/IP After installing InfoSphere® CDC, you need to allocate a TCP/IP service forcommunication with Management Console that you have installed on each clientworkstation. The TCP/IP service is called ‘dmirror'. If you chose to use a non-defaultvalue for the service name change DMTCPJOBD *JOBD’s Request data orcommand value to use your non-default service name. Step 1—Run the Configuration Utility Issue 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 Entry The Add Service Table Entry screen appears. Enter the following information:

Service ‘dmirror' (in single quotationmarks)

Port Field A port number between 1 and65535.

Protocol ‘tcp'(in single quotation marks)Text ‘description' A description for the service

table entry.

32

IBM InfoSphere Change Data Capture, Version 6.1 Verifying the configuration of your Domain NameServer (DNS) If you are using a local host table as the hostname, then you need to verify the DNSconfiguration to ensure that the local host table is searched for as the hostname. Step 1—Run the Configuration Utility Issue 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 tosearch a domain name server initially before searching the local host table, youshould set this field to *REMOTE (this is the default setting) and specify the IPaddress of the domain name server. Press Enter to complete the verification.

33

--

IBM InfoSphere Change Data Capture, Version 6.1 Verifying journal and journal receiver authorities You need to verify that all user profiles, including the D_MIRROR user profile, thatstart mirroring jobs have sufficient authorities to access journals and journalreceivers that are used by InfoSphere® CDC.

To verify the journal To verify journal receivers

34

1.

2.3.4.

5.6.

7.

IBM InfoSphere Change Data Capture, Version 6.1 To verify the journal

From the command line, issue the following command:WRKOBJ OBJ(<library>/<name>)OBJTYPE(*JRN) where <library> is the journal library and <name> is the journal name. The Work with Objects screen appears. Select Option 5 beside the journal.The Display Object Authority screen appears. Press F11.Make sure that each user profile including D_MIRROR have the minimumauthorities required to work with objects. Opr, Mgt, and Exist should be selected.Press F11 again.Make sure that each user profile including D_MIRROR have the minimumauthorities required to work with the data. Read, Add, Update, and Executeshould be selected. If the minimum authorities are not selected, issue the IBM® i commandEDTOBJAUT to make the necessary changes.

35

1.

2.

3.4.

5.6.

7.

IBM InfoSphere Change Data Capture, Version 6.1 To verify journal receivers

From the command line, issue the following command:WRKOBJ OBJ(<library>/<name>)OBJTYPE(*JRNRCV) where <library> is the journal receiver library and <name> is the journal receivername. The Work with Objects screen appears. Select Option 5 beside the journal receiver.The Display Object Authority screenappears. Press F11.Make sure that each user profile including D_MIRROR has the minimumauthorities required to with objects. Opr, Mgt, and Exist should be selected.Press F11 again.Make sure that each user profile including D_MIRROR has the minimumauthorities required to work with the data. Read, Add, Update, and Executeshould be selected. If the minimum authorities are not defined, issue the IBM® i EDTOBJAUTcommand to make the necessary changes.

36

1.

2.

3.

4.

IBM InfoSphere Change Data Capture, Version 6.1 Starting the subsystem and the listener After installing InfoSphere® CDC, you must start the subsystem and the listener.

If you have installed InfoSphere CDC on an Independent Auxiliary Storage Pool(IASP) device, you must start the subsystem and the listener from the system thatis currently connected to the IASP device. To set the ASP group for theinteractive session, issue the following command:SETASPGRP <name> where <name> is the IASP name. To change the current library to the product library, issue the following command:CHGCURLIB <library> where <library> is the InfoSphere CDC product library. To start the subsystem, issue the following command:STRSBS <library>/DMIRROR where <library> is the work library. To start the listener, issue the following command (if it hasn’t already been startedwith the STRSBS command):STRDMTCP SERVICE (<service>) JOBD(<library>/DMCJOBD) where <service> is the service name and <library> is the InfoSphere CDC productlibrary.

37

IBM InfoSphere Change Data Capture, Version 6.1 Securing the InfoSphere CDC for DB2® for i productlibrary (Optional) You can authorize the use of the InfoSphere® CDC product library to specific users.The default name of this library is DMIRROR. To authorize the use of InfoSphere CDC to specific users, edit the authority of theInfoSphere CDC library object using the following command: EDTOBJAUT OBJ(QSYS/<library>) OBJTYPE(*LIB) where <library> is the InfoSphere CDC product library Note: If you revoke authority for the user *PUBLIC, make sure that you add the userD_MIRROR with object authority *CHANGE to the list of authorized users.

38

-

IBM InfoSphere Change Data Capture, Version 6.1 Scheduling InfoSphere CDC for DB2® for i start upand shut down (Optional) You can schedule InfoSphere® CDC to start up or shut down automatically atscheduled times on System i®. You can add an entry to the System i job schedulerusing the ADDJOBSCDE (Add Job Schedule Entry) command.

To schedule InfoSphere CDC for DB2 for i to start up or shut down automatically

39

1.

2.

--

IBM InfoSphere Change Data Capture, Version 6.1 To schedule InfoSphere CDC for DB2® for i to startup or shut down automatically

Create a Control Language (CL) program to set the current library to theInfoSphere® CDC product library name and issue InfoSphere CDC commands.The sample CL program named DM_START sets the current library to DMIRRORand starts continuous mirroring (STRDTAMIR) for the subscription AS400TGT. CL Program: DM_START

*************** Beginning of data *************************************

0001.00 PGM

0002.00 CHGCURLIB CURLIB(DMIRROR)

0003.00 STRDTAMIR TARGET(AS400TGT) IDLE(*WAIT) FORMAT(*NO)

0004.00 ENDPGM

****************** End of data **************************************** Add an entry to the System i® job scheduler.In the following example, continuousmirroring is scheduled to start daily at 8 AM. ADDJOBSCDE JOB(DM_START) CMD(Call <name>/DM_START) FRQ(*WEEKLY) SCDDATE(*NONE)

SCDDAY(*ALL) SCDTIME(080000) JOBD(<library>/DMCJOBD) where:

<name> is the library where the CL program DM_START is located, and<library> is the library where you installed or upgraded InfoSphere CDC.

40

-

-

-

-

IBM InfoSphere Change Data Capture, Version 6.1 Upgrading InfoSphere CDC for DB2 for i You can upgrade InfoSphere® CDC by installing a later version of the software overtop of an existing installation. Interim fixes cannot be used to upgrade InfoSphere CDC to later versions. You mustfirst install the general availability (GA) release of the software for the later versionand accept the software license agreement, before applying any interim fixes. Afterthe interim fix has been installed, you can start the InfoSphere CDC instances andcomplete the upgrade. In this section, you will learn:

Before you upgrade Before you upgrade to a new release or to the latest Fix Pack of InfoSphere CDC,make sure you end all replication activities, online activities, and save themetadata of your existing installation of InfoSphere CDC.Upgrading InfoSphere CDC for DB2 for i from version 6.0 to version 6.1 Follow these steps to upgrade from InfoSphere CDC for DB2® for i version 6.0 toversion 6.1.Updating InfoSphere CDC for DB2 for i to version 6.1 Fix Pack 1 Updates to the InfoSphere CDC for DB2 for i are available in interim fixes and fixpacks. Updating InfoSphere CDC for DB2 for i to version 6.1 Fix Pack 2 Updates to the InfoSphere CDC for DB2 for i are available in interim fixes and fixpacks.

41

1.A.

B.

C.

D.

E.

F.

2.

3.

A.

--

B.

---

IBM InfoSphere Change Data Capture, Version 6.1 Before you upgrade Before you upgrade to a new release or to the latest Fix Pack of InfoSphere® CDC,make sure you end all replication activities, online activities, and save the metadataof your existing installation of InfoSphere CDC.

End all InfoSphere CDC ReplicationAdd the InfoSphere CDC product library to the library list by issuing thefollowing command:CHGCURLIB LIB(<library>) where <library> is the InfoSphere CDC product library. End mirroring in a controlled manner by issuing the following command:ENDDTAMIR TARGET(*ALL) ENDTYP(*CNTRLD) Verify that all InfoSphere CDC replication jobs have stopped by issuing theSystem i® WRKACTJOB command.Stop the InfoSphere CDC TCPLISTEN listener job by issuing the followingcommand:ENDDMTCP ENDTYP(*IMMED) Remove the InfoSphere CDC product library from the library list by issuing thefollowing command:CHGCURLIB CURLIB(*CRTDFT)) End the InfoSphere CDC subsystem by issuing the following command:ENDSBSSBS(<version>) OPTION(*CNTRLD) DELAY(*NOLIMIT) where <version> is the InfoSphere CDC current version subsystem.

End all online InfoSphere CDC activitiesUse the System i WRKACTJOBcommand to determine if there are any InfoSphere CDC jobs running under thecurrent version subsystem. All InfoSphere CDC jobs have to be stopped beforestarting the upgrade. Save the InfoSphere CDC metadata.Saving your InfoSphere CDC metadata is aprecautionary operation that allows you to recover data if an unforeseen situationoccurs during the upgrade process.

Create the save file where InfoSphere CDC metadata is stored by issuing thefollowing command:CRTSAVF <library>/<file> where

<library> is the save file library name<file> is the save file name

Place the save file in a library other than the InfoSphere CDC product library. Save the metadata objects into the save file that was created by the CRTSAVFcommand by issuing the following command:SAVOBJ OBJ(DMFS* DMFT* JRN_STATUS) LIB(<prod library>) DEV(*SAVF)

OBJTYPE(*FILE *USRSPC) SAVF(<library>/<file>) where

<prod library> is the InfoSphere CDC product library.<library> is the save file library name<file> is the save file name

Note: The default encodings of the conflict audit table have changed from CCSID 37to CCSID 1208 in version 6.1 Fix Pack 2 of InfoSphere CDC for DB2® for i, in orderto support multibyte character names in identifiers. You may need to adjust yourencoding set in order to view the table after upgrading.

42

43

1.

2.3.4.

--

--

--

--

--

5.

6.

IBM InfoSphere Change Data Capture, Version 6.1 Upgrading InfoSphere CDC for DB2 for i fromversion 6.0 to version 6.1 Follow these steps to upgrade from InfoSphere® CDC for DB2® for i version 6.0 toversion 6.1.

Restore the upgrade program from a save file by issuing the following command:RSTOBJ OBJ(DMCINST610 DMS903 DMUMESSAGE DMTRACE) SAVLIB(V6R1M0) DEV(*SAVF)

SAVF(<library name>/V6R1M0) RSTLIB(QTEMP) where <library name> is the save file library name Run the upgrade program by issuing the following command:?QTEMP/DMCINST610 Press F4 to access the installation prompt screen.Specify the save file by entering the following information on the Device/Save FileName screen:

Device Name *SAVF that you are using to run the installation program.

If you are restoring the installation program from a save file, then enter thefollowing information.

Savefile Name for Product Library NameThe value is V6R1M0.

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

Savefile NameThe value is V6R1M0TUT.

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

If the D_MIRROR user profile does not exist in the QSYS library on the serverwhere InfoSphere CDC is being installed, proceed to the next step. Press F2 on the Software Licensing Agreement screen to accept the termsexpressed in the software license agreement and start the installation.Press Enter to continue.

Now that the software has been upgraded to version 6.1, you should also considerinstalling any available Fix Packs.

44

1.

2.

IBM InfoSphere Change Data Capture, Version 6.1 Updating InfoSphere CDC for DB2 for i to version6.1 Fix Pack 1 Updates to the InfoSphere® CDC for DB2® for i are available in interim fixes and fixpacks. An interim fix or a fix pack is not a full installation of the software. In order for aninterim fix or fix pack to be applied, an existing installation of the software must bepresent. Updating your InfoSphere CDC product to the latest fix pack replaces existingobjects in the InfoSphere CDC product library. To identify the objects in the existingproduct library, issue the DSPLIB command, using the following syntax: DSPLIBLIB(<prod library>), where <prod library> is the InfoSphere CDC product libraryToidentify the objects in the save file containing the fix pack, issue the DSPSAVFcommand. You should also backup existing objects before updating to the latest fixpack.

Ensure that you have ended replication, ended all replication activities, and savedInfoSphere CDC metadata.Restore the Fix Pack from a save file.Issue the following command: RSTOBJ OBJ(*ALL) SAVLIB(V6R1M0UPD) DEV(*SAVF) SAVF(<savf library>/V6R1M0UPD)

RSTLIB(<prod library>) where <savf library> is the save file library name and <prod library> is theInfoSphere CDC product library

Related tasks: Upgrading InfoSphere CDC for DB2 for i from version 6.0 to version 6.1 Updating InfoSphere CDC for DB2 for i to version 6.1 Fix Pack 2

45

1.2.

3.4.

5.6.

--

7.

8.

9.

IBM InfoSphere Change Data Capture, Version 6.1 Updating InfoSphere CDC for DB2 for i to version6.1 Fix Pack 2 Updates to the InfoSphere® CDC for DB2® for i are available in interim fixes and fixpacks. An interim fix or a fix pack is not a full installation of the software. In order for aninterim fix or fix pack to be applied, an existing installation of the software must bepresent. Updating your InfoSphere CDC product to the latest fix pack replaces existingobjects in the InfoSphere CDC product library. To identify the objects in the existingproduct library, issue the DSPLIB command, using the following syntax: DSPLIBLIB(<prod library>), where <prod library> is the InfoSphere CDC product libraryToidentify the objects in the save file containing the fix pack, issue the DSPSAVFcommand. You should also backup existing objects before updating to the latest fixpack.

Ensure that InfoSphere CDC for DB2 for i version 6.1 is installed on your system.Ensure that you have ended replication, ended all replication activities, and savedthe InfoSphere CDC metadata.Extract V6R1M0MNT from the CDC_6.1_FP2_DB2_IBM_i.zip file. FTP V6R1M0MNT to <lib>/V6R1M0MNT, where <lib> is a save file library on yourIBM i server. Create a work library.Restore the maintenance installation objects into the work library by typing: RSTOBJOBJ(*ALL) SAVLIB(V6R1M0MNT) DEV(*SAVF) SAVF(<lib>/V6R1M0MNT) RSTLIB(<worklib>) where

<lib> is the save file library name where you FTP'd the V6R1M0MNT file.<worklib> is the name of the work library that you created in the previous step.

Change your current library to the work library by issuing the following command:CHGCURLIB(<worklib>) where <worklib> is the name of the work library. Run the InfoSphere CDC version 6.1 Maintenance Installer by issuing thefollowing command:INSCDCMNT PRDLIB(<productlib>) where <productlib> is the name of the InfoSphere CDC product library. Remove the work library by issuing the following commands:CHGCURLIB CURLIB(*CRTDFT)DLTLIB LIB(<worklib>) where <worklib> is the name of the work library.

Related tasks: Installing InfoSphere CDC for DB2 for i version 6.1 Updating InfoSphere CDC for DB2 for i to version 6.1 Fix Pack 1 Related reference: INSCDCMNT - Installing InfoSphere CDC for DB2 for i Maintenance

46

47

---

IBM InfoSphere Change Data Capture, Version 6.1 Creating multiple installations of InfoSphere® CDCfor DB2® for i In this section, you will learn:

Creating multiple installations Verifying additional installations Running additional InfoSphere CDC for DB2 for i installations

48

-

IBM InfoSphere Change Data Capture, Version 6.1 Creating multiple installations You can install InfoSphere® CDC multiple times.

To install InfoSphere CDC for DB2 for i multiple times

49

1.

2.

3.

4.

5.

6.

7.

IBM InfoSphere Change Data Capture, Version 6.1 To install InfoSphere CDC for DB2® for i multipletimes

Configure InfoSphere® CDC to use TCP/IP by adding a new service table entryfor each installation.Start InfoSphere CDC TCP/IP communications. To start InfoSphere CDC TCP/IPcommunications, issue the STRDMTCP command select Configure related tables(Option 21) and then select Work with service table entries (option 1). Ensure that you specify the new service table entry for each additionalinstallation. Rename additional subsystems.To rename the subsystem for the additionalinstallation, issue the following command: RNMOBJ OBJ(<library>/DMIRROR) OBJTYPE(*SBSD) NEWOBJ(<name>) where <library> is the InfoSphere CDC product library of additional installationand <name> is the new name for subsystem. Modify the InfoSphere CDC communication registry value.To modify theInfoSphere CDC communication registry, issue the following command: TSSETREG PRODLIB(<library>) SUBSNAME(<name>) where <library> is the InfoSphere CDC product library of additional installationand <name> is the renamed subsystem of additional installation. Remove the autostart job entry. To remove the autostart job entry, issue thefollowing command: RMVAJE SBSD(<library>/<name>) JOB(TCPLISTEN) where <library> is the InfoSphere CDC product library of additional installationand <name> is the renamed subsystem of additional installation. If you want the D_MIRROR profile to refer to the first installation by default, thenissue the following command:CHGUSRPRF USRPRF(D_MIRROR) CURLIB(<library>) where <library> is the InfoSphere CDC product library of first installation. Any of the InfoSphere CDC product libraries can be set to the default. Verify additional installations by verifying the authority of the D_MIRROR profile,the attributes of the renamed subsystems, and the library list of each additionalinstallation.

50

---

IBM InfoSphere Change Data Capture, Version 6.1 Verifying additional installations Verifying D_MIRROR User Profile—Verify the D_MIRROR profile and make sure ithas not changed since the last installation. Verifying attributes of renamed subsystems—Ensure that the renamedsubsystem of the additional installation meets your needs. If you decide to changethe name of a subsystem so that you can run InfoSphere® CDC on a differentsubsystem than the default, then verify the attributes of the subsystem. Forexample, you may only want a certain number of jobs to load on your machine at aspecific time and may want to configure the subsystem further to handle theseobjectives. Verify the library list of each additional install—Ensure the job descriptionspecifies the correct library name in which you have installed InfoSphere CDC.InfoSphere CDC uses the configuration file DMCJOBD to identify libraries forexecutable programs and job queues.

To verify the authority of the D_MIRROR User Profile To verify the attributes of the renamed subsystems To verify the library list of each additional installation

51

1.

2.

3.4.

IBM InfoSphere Change Data Capture, Version 6.1 To verify the authority of the D_MIRROR UserProfile

To verify the D_MIRROR user profile, issue the following command:WRKOBJOBJ(QSYS/D_MIRROR) OBJTYPE(*USRPRF) The Work with Objects screen is displayed. Select Option 5 beside the user profile.The Display Object Authority screen isdisplayed. Press F11.If the object authorities differ from the following, then issue the System i®EDTOBJAUT command to make the necessary changes.

User Group ObjectAuthority

ObjectOperational

ObjectExistence

ObjectManagement

ObjectReference

ObjectAlter

QSECOFR

  *ALL   X X X X

D_MIRROR

  USERDEF

X   X    

*PUBLIC   *EXCLUDE

         

52

IBM InfoSphere Change Data Capture, Version 6.1 To verify the attributes of the renamed subsystems For each renamed subsystem, you should verify that the subsystem attributes, suchas authority levels, autostart entry, job queue entry, and routing entry, have been setproperly. To check the subsystem attributes, issue the following command:DSPSBSDSBSD(<library>/<name>) where <library> is the InfoSphere® CDC product library of additional installation and<name> is the renamed subsystem of additional installation

53

IBM InfoSphere Change Data Capture, Version 6.1 To verify the library list of each additionalinstallation For each additional installation, you should verify that the job descriptions forDMCJOBD and DMTCPJOBD are correct. For each of the DMCJOBD andDMTCPJOBD job descriptions, issue the following command:DSPJOBD(<library>/name) where <library> is the InfoSphere® CDC product library and name is the jobdescription name. If it is not correct, you can change the library list for the job description using theSystem i® CHGJOBD command.

54

-

IBM InfoSphere Change Data Capture, Version 6.1 Running additional InfoSphere CDC for DB2® for iinstallations You can run additional installations of InfoSphere® CDC.

To run the additional installations

55

1.

2.3.

IBM InfoSphere Change Data Capture, Version 6.1 To run the additional installations

Start the TCPLISTEN job manually after each subsystem has been renamed. Tochange to the current library of the additional installation, issue the followingcommand: CHGCURLIB (<library>) where <library> is the InfoSphere® CDC product library for the additionalinstallation Start the TCPLISTEN job. You can issue the following command: STRDMTCP Change to the new service name you specified for the additional installation

56

---

IBM InfoSphere Change Data Capture, Version 6.1 Uninstalling InfoSphere® CDC for DB2® for i In this section, you will learn:

Before you uninstall Uninstalling InfoSphere CDC for DB2 for i Removing the InfoSphere CDC service and port number

57

----

IBM InfoSphere Change Data Capture, Version 6.1 Before you uninstall Before you can uninstall InfoSphere® CDC, you need to:

Sign on with a user profile that has specific authoritiesEnd InfoSphere CDC replication End all Online InfoSphere CDC activitiesEnd journalingTo end journaling, issue the following command: ENDJRNPF FILE(*ALL) JRN(<library>/DMCJRN) where <library> is the InfoSphere CDC product library

58

1.

2.

3.4.

IBM InfoSphere Change Data Capture, Version 6.1 Uninstalling InfoSphere CDC for DB2® for i

Ensure that you are in the InfoSphere® CDC product library. You can issue thefollowing command:CHGCURLIB CURLIB(<library>) where <library> is the InfoSphere CDC product library. To run the uninstall program, issue the following command:?UNINSTALL After issuing the command, identify the InfoSphere CDC installation that you wantto remove by specifying the product and tutorial library names. Press Enter to continue.Press Enter to uninstall InfoSphere CDC.

Note: If you had specified the name of an Independent Auxiliary Storage Pool(IASP) device during the installation, then the installation program automaticallycreates the work library on the system ASP of the machine that is connected to theIASP device. You must manually delete the work library.

59

--

IBM InfoSphere Change Data Capture, Version 6.1 Removing the InfoSphere CDC service and portnumber After uninstalling InfoSphere® CDC, you should remove the ‘dmirror' service and theport number you allocated.

To remove ‘dmirror' service To remove the port number

60

1.

2.3.

4.

IBM InfoSphere Change Data Capture, Version 6.1 To remove ‘dmirror' service

On the command line, issue the following command:CFGTCP The Configure TCP/IP screen appears. Select Configure related tables (Option 21)Select Work with service table entries (Option 1)The Work with Service TableEntries screen appears. Locate the dmirror service and enter 4 in the Opt column. Press Enter to remove the service.

61

1.

2.

3.

IBM InfoSphere Change Data Capture, Version 6.1 To remove the port number

On the command line, issue the following command:CFGTCP The Configure TCP/IP screen appears. Select Work with TCP/IP Port Restrictions (Option 4)The Work with TCP/IP PortRestrictions screen appears. Enter 4 beside the port number used by InfoSphere® CDC. Press Enter.If you have allocated port numbers for additional installations ofInfoSphere CDC, repeat the steps above to remove port number restrictions.

62

-

----

---

-

IBM InfoSphere Change Data Capture, Version 6.1 Remote journaling and InfoSphere CDC for DB2®for i Remote journaling is a System i® feature that copies local journal entries to anothersystem. Identical journal entries and receivers are added to another server. You can install and set up InfoSphere® CDC to support data replication from aremote journal. Setting up data replication for remote journaling improves systemperformance as replication jobs are running on another server and do not impactyour production environment. When you install and set up InfoSphere CDC toreplicate from a remote journal, InfoSphere CDC scrapes entries from the remotejournal and applies the changes to any target system where InfoSphere CDC isinstalled. The following topics are included:

Installing and configuring InfoSphere CDC for DB2 for i to replicate data from aremote journal About installing InfoSphere CDC for DB2 for i on the Data Origin Server About installing InfoSphere CDC for DB2 for i on the Source Server About installing InfoSphere CDC for DB2 for i on the Target Server Verifying the creation of the SQL package on the InfoSphere CDC for DB2 for iData Origin Server D_MIRROR User Profile considerations for remote journals Configuring remote journaling Configuring InfoSphere CDC for DB2 for i Source Server to retrieve source filesfrom the InfoSphere CDC for DB2 for i Data Origin Server Remote journal commands

63

IBM InfoSphere Change Data Capture, Version 6.1 Installing and configuring InfoSphere CDC for DB2®for i to replicate data from a remote journal In a typical replication scenario where InfoSphere® CDC has been installed toreplicate 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 platformsupported by InfoSphere CDC. The source system is required so that InfoSphereCDC can run SCRAPE, MIRROR, and REFRESH jobs. The target system isrequired so that any InfoSphere CDC product you have installed can receive thedata and run APPLY jobs. In a replication scenario where InfoSphere CDC has been set up to replicate datafrom a remote journal, you need to install InfoSphere CDC on the system whereyour local and remote journals reside. Also, you must install any InfoSphere CDCproduct on any target database platform that can receive and apply data sent byInfoSphere CDC. The following image illustrates where InfoSphere CDC replication jobs run whenreplicating from a remote journal.

The following sections refer to the system where your local journals reside as theData Origin Server and refer to the system where your remote journals reside as theSource Server.

64

IBM InfoSphere Change Data Capture, Version 6.1 About installing InfoSphere CDC for DB2® for i onthe Data Origin Server The Data Origin Server represents an IBM® i production machine where yoursource files and local journal objects and receivers reside. You must installInfoSphere® CDC on this system when setting up replication from a remote journal.When you start the subsystem and the listener, InfoSphere CDC only runsoccasionally used service jobs and does not run replication jobs. When you installInfoSphere CDC on the Data Origin Server, you must install InfoSphere CDC in thesame product library on the Source Server. Note: The following sections refer to this system as the InfoSphere CDC Data OriginServer to indicate that InfoSphere CDC must be installed. Note: After installing InfoSphere CDC on the Data Origin Server, you must start thesubsystem and the listener.

65

IBM InfoSphere Change Data Capture, Version 6.1 About installing InfoSphere CDC for DB2® for i onthe Source Server The Source Server represents a System i® machine where your remote journalobjects and receivers reside. In addition to installing on the Data Origin Server, youmust install InfoSphere® CDC as a source product on this system when setting upreplication from a remote journal. InfoSphere CDC will run source replication jobs(SCRAPE, MIRROR and REFRESH). After installing InfoSphere CDC on the DataOrigin Server, you must install InfoSphere CDC in the same product library on theSource Server. It is important to note that although your source files reside on the Data OriginServer, Management Console connects to the Source Server and uses this as thesource datastore within a subscription. Using system parameters, you mustconfigure your installation of InfoSphere CDC on the Source Server to retrieve datafrom actual source files which reside on the Data Origin Server. Note: The following sections refer to this system as the InfoSphere CDC SourceServer to indicate that InfoSphere CDC must be installed. Note: After installing InfoSphere CDC on the Source Server, you must start thesubsystem 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 InfoSphere CDC on the samemachine. In this scenario, you will have to install two instances of InfoSphere CDCto run both source (SCRAPE, MIRROR and REFRESH) and target (APPLY)replication jobs.

66

IBM InfoSphere Change Data Capture, Version 6.1 About installing InfoSphere CDC for DB2® for i onthe Target Server The Target Server represents your target system and can be any operating systemand database supported by InfoSphere® CDC. When you start replication on theInfoSphere CDC Source Server and have added a remote journal to this system,InfoSphere CDC receives and applies changes from the remote journal to yourtarget tables. InfoSphere CDC runs target replication jobs (APPLY) on this system. You can install any InfoSphere CDC product on this system. It does not have to beInfoSphere CDC. Note: If you have installed InfoSphere CDC on the Target Server, you must startthe subsystem and the listener.

67

-

IBM InfoSphere Change Data Capture, Version 6.1 Verifying the creation of the SQL package on theInfoSphere CDC for DB2® for i Data Origin Server After installing InfoSphere® CDC on the Data Origin Server, Source Server, andinstalling a InfoSphere CDC product on the Target Server, you need to ensure that aSQL package named ‘DMS125SQL' is created in the QGPL library on theInfoSphere CDC Data Origin Server. When you start a refresh on the InfoSphereCDC Source Server, InfoSphere CDC attempts to create this object if it does notexist and uses the SQL package to retrieve data from the source files on theInfoSphere CDCData Origin Server.

To create the SQL package

68

1.

2.

3.

IBM InfoSphere Change Data Capture, Version 6.1 To create the SQL package

On the InfoSphere® CDC Source Server, change the current library to theproduct library.At the command line, issue the following: CRTSQLPKG PGM(<library>/DMS125) RDB(<entry>)OBJTYPE(*SRVPGM) where <library> is the product library and<entry> is the RDB entry. The RDB entry must be a valid RDB entry on the InfoSphere CDC Source Serverwhose remote location is the InfoSphere CDC Data Origin Server. This RDB entryis the same value you specified in the System Parameter field Remote DB Entryon the InfoSphere CDC Source Server. Verify that a *SQLPKG named ‘DMS125SQL' was created in the QGPL folder onthe DOS system. Note: If the package is deleted for whatever reason, you mustbe re-create it before a performing a refresh on a subscription. Note: To ensure that InfoSphere CDC for DB2® for i automatically creates thispackage whenever required, grant the D_MIRROR userprofile *IOSYSCFGauthority using the CHGUSRPRF command. If this is done, no manualintervention is needed.

Related concepts: Installing and configuring InfoSphere CDC for DB2 for i to replicate data from aremote journal

69

IBM InfoSphere Change Data Capture, Version 6.1 D_MIRROR User Profile considerations for remotejournals InfoSphere® CDC automatically creates a user profile called D_MIRROR duringinstallation. InfoSphere CDC uses this user profile to supervise replicationoperations. After installing InfoSphere CDC on the Source Server and Data OriginServer, you need to make sure that the D_MIRROR user profile can access theobjects you want to replicate on the InfoSphere CDC Data Origin Server. Grant the D_MIRROR user profile both the required Object operational and Objectmanagement authorities on the InfoSphere CDC Data Origin Server.

70

-

-

-

IBM InfoSphere Change Data Capture, Version 6.1 Configuring remote journaling In order for InfoSphere® CDC to process journal entries from a remote journal, youmust configure remote journaling on your operating system. The examples in thefollowing procedure illustrate the required parameters you must set on each system.See your System i® documentation for a description of each command and acomplete list of parameters. Before configuring remote journaling, make sure you have:

Installed InfoSphere CDC on the Data Origin Server. The following procedurerefers to this system as the InfoSphere CDC Data Origin Server.Installed InfoSphere CDC on the Source Server. The following procedure refers tothis system as the InfoSphere CDC Source Server.

To configure remote journaling

71

1.

2.

3.

-

-

4.

-

-

--

-

-

5.

IBM InfoSphere Change Data Capture, Version 6.1 To configure remote journaling

On the InfoSphere® CDC Source Server, add a relational database directoryentry by running the ADDRDBDIRE command. InfoSphere CDC requires that yougive this database entry the same name as the name of the machine. Forexample, the following command creates the relational database directory entryon a machine named NEWYORK:ADDRDBDIRE RDB(NEWYORK) RMTLOCNAME(*LOCAL) On the InfoSphere CDC Data Origin Server, add a relational database entry forthe database on the InfoSphere CDC Source Server by running theADDRDBDIRE command. For example,ADDRDBDIRE RDB(NEWYORK) RMTLOCNAME(192.168.0.10) On the InfoSphere CDC Data Origin Server, identify the journal you want to usefor remote journaling. For example, you may want to use TORLIB/MYJRN. If thejournal 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 5000KB:CRTJRNRCV JRNRCV(TORLIB/MYJRNRCV) THRESHOLD(5000) Create a journal for the receiver by running the CRTJRN command. Forexample, the following command creates a journal:CRTJRN JRN(TORLIB/MYJRN)JRNRCV(TORLIB/MYJRNRCV) MNGRCV(*SYSTEM)

On the InfoSphere CDC Data Origin Server, add a remote journal by running theADDRMTJRN command. InfoSphere CDC requires that you do the following forthis command:

Set the relational database to the database directory entry you created in Step1.Set the names of the local journal and remote journal to the journal you createdin 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 fromthe local journal library.Create both the local journal library and the remote journal library on theInfoSphere CDC Source Server.Set the remote journal type to either *TYPE1 or *TYPE2.

For example, the following command creates the remote journal NYLIB/MYJRNon the InfoSphere CDC Source Server: ADDRMTJRN RDB(NEWYORK) SRCJRN(TORLIB/MYJRN) TGTJRN(NYLIB/MYJRN)

RMTRCVLIB (NYLIB) RMTJRNTYPE(*TYPE1) On the InfoSphere CDC Data Origin Server, activate the remote journal byrunning the CHGRMTJRN command with the JRNSTATE(*ACTIVE) parameter.For example, the following command activates the remote journal:CHGRMTJRNRDB(NEWYORK) SRCJRN(TORLIB/MYJRN) TGTJRN(NYLIB/MYJRN)

JRNSTATE(*ACTIVE) Related concepts: About installing InfoSphere CDC for DB2 for i on the Data Origin Server About installing InfoSphere CDC for DB2 for i on the Source Server

72

73

-

-

-

-

--

IBM InfoSphere Change Data Capture, Version 6.1 Configuring InfoSphere CDC for DB2 for i SourceServer to retrieve source files from the InfoSphereCDC for DB2 for i Data Origin Server After adding a remote journal and installing InfoSphere® CDC for DB2® for i on theSource Server, you must do the following on the Source Server:

Add a relational database directory entry—This relational database directoryentry must reference the Data Origin Server. Enable InfoSphere CDC to retrieve source files from the Data Origin Server—Using system parameters, you can configure InfoSphere CDC to use the IPaddress/hostname and port number of the Data Origin Server and to use therelational database directory entry that references this server.

Before configuring InfoSphere CDC to retrieve source files from the Data OriginServer, make sure you have:

Installed InfoSphere CDC on both the Data Origin Server and the Source Server.The following procedures refer to these systems as the InfoSphere CDC DataOrigin Server and the InfoSphere CDC Source Server.Ensure that the System i® user profile for both the Data Origin Server and theSource server have the same name. You will use this user profile to connect to thereplication agent you created on the Source server.

To add a relational database directory that references the Data Origin Server To enable the InfoSphere CDC for DB2 for i Source Server to retrieve source filesfrom the InfoSphere CDC for DB2 for i Data Origin Server

74

1.

2.

IBM InfoSphere Change Data Capture, Version 6.1 To add a relational database directory thatreferences the Data Origin Server

On the InfoSphere® CDC Source Server, add a relational database directoryentry that references the database where the source files reside on theInfoSphere CDC Data Origin Server by running the ADDRDBDIRE command. Forexample, if the name of the database on the InfoSphere CDC Data Origin Serveris TORONTO, then the following command creates this relational databasedirectory entry:> ADDRDBDIRE RDB(TORONTO) RMTLOCNAME(192.168.0.15) On the InfoSphere CDC Data Origin Server, add a relational database entry thatreferences the local database where the source files reside by running theADDRDBDIRE command. For example,> ADDRDBDIRE RDB(TORONTO) RMTLOCNAME(*LOCAL)

Related concepts: About installing InfoSphere CDC for DB2 for i on the Data Origin Server About installing InfoSphere CDC for DB2 for i on the Source Server

75

1.

2.

3.

-

-

-

IBM InfoSphere Change Data Capture, Version 6.1 To enable the InfoSphere CDC for DB2® for i SourceServer to retrieve source files from the InfoSphereCDC for DB2 for i Data Origin Server

Ensure you have already created an agent for InfoSphere® CDC Source Server.This replication agent will use the IP address/hostname and port number of theInfoSphere CDC Source Server.Start Management Console and connect to the publisher-type replication agent(displayed as a datastore) you created in Access Manager.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 theInfoSphere CDC Data Origin Server. This enables InfoSphere CDC (installed onthe InfoSphere CDC Source Server) to use the IP address of the InfoSphereCDC Data Origin Server. For example, the IP address of the InfoSphere CDCData Origin Server is ‘192.168.0.15'. This is the value you would enter for theData Origin TCP/IP Name system parameter. Data Origin Port—Specify the TCP listener port number of the InfoSphere CDCData Origin Server. This enables InfoSphere CDC (installed on the InfoSphereCDC Source Server) to use the port number of the InfoSphere CDC Data OriginServer.For example, the port number of the InfoSphere CDC Data Origin Serveris ‘10101'. This is the value you would enter for Data Origin Port systemparameter. Relational Database Directory Entry—Specify the relational databasedirectory entry that you added for InfoSphere CDC (installed on the InfoSphereCDC Source Server). This entry should reference the InfoSphere CDC DataOrigin Server.For example, the relational database directory that references thedatabase where the source files reside is ‘TORONTO'. This is the value youwould enter for Relational Database Directory Entry system parameter.

76

---

IBM InfoSphere Change Data Capture, Version 6.1 Remote journal commands InfoSphere® CDC provides commands that let you manage the remote journalduring replication. In this section, you will learn:

CHGJRNDM—Change remote journal receivers RTVDMJENT—Retrieve InfoSphere CDC remote journal entry VFYTSJRN—Verify remote journal

77

--

---

--

--

IBM InfoSphere Change Data Capture, Version 6.1 CHGJRNDM—Change remote journal receivers InfoSphere® CDC provides the CHGJRNDM command which lets you generatenew journal receivers for a journal on the source server or delete processed andobsolete journal receivers. In a data replication scenario where InfoSphere CDC has been installed andconfigured to replicate data from a remote journal, you can use the CHGJRNDMcommand to generate new or delete existing journal receivers when InfoSphereCDC no longer needs them. You must run this command on Source Server where the remote journal resides andwhere InfoSphere CDC has been installed as the source product. If you decide todelete a journal receiver, then InfoSphere CDC deletes both the local and remotejournal receivers. Note: Local journal receivers reside on your Data Origin Server and remote journalreceivers reside on your Source Server. Note:InfoSphere CDC must be installed on both systems. Applies To—Source Syntax Table 1. Supported keywords

Journal name (JOURNAL) The name of the journal to be changedThis is a required parameter. Qualifier 1: Journal name

NameSpecifies the name of the journal for which journal receivers are generated

*ALLSpecifies all journals in the library that are used by InfoSphere CDC.This is the default setting.

Qualifier 2: Library Name

The name of the library where the journal resides Change receiver (CHGRCV) Indicates whether or not journal receivers are changed for the specified journals.

*NOIndicates that journal receivers are not changed for the specified journals. Youneed to change the journal receivers manually.

Keywords Description Choices NotesJOURNAL Journal name Qualified object

nameRequired

Qualifier 1: Journalname

Name, *ALL

Qualifier 2: Library Name CHGRCVChange receiver *YES, *NO Optional DLTRCV

78

---

--

--

--

-

*YESIndicates that journal receivers are changed for the specified journals.This is the default setting.

Delete receivers (DLTRCV) Specifies whether or not you want to delete processed or obsolete journal receiversassociated with the journal.

*NOSpecifies that you do not want to delete processed or obsolete journal receiversassociated with the journal. These receivers remain until you delete or archivethem.

*YESSpecifies that you want to delete processed and obsolete receivers associatedwith the journals.

*DFTSpecifies that you want to delete processed and obsolete receivers associatedwith the InfoSphere CDC default journal. This setting applies only whenJOURNAL is set to the current InfoSphere CDC default journal, which isspecified in the CHGDMSVAL command.This is the default setting.

79

IBM InfoSphere Change Data Capture, Version 6.1 RTVDMJENT—Retrieve InfoSphere CDC remotejournal entry InfoSphere® CDC provides the RTVDMJENT command which lets you determinewhether a user-specified journal receiver is being used by InfoSphere CDC. Basedon a specified journal, this command returns the sequence number and journalreceiver name of the last confirmed journal entry processed by InfoSphere CDC. In a data replication scenario where InfoSphere CDC has been installed andconfigured to replicate data from a remote journal, you can use the RTVDMJENTcommand to retrieve the sequence number and journal receiver name of the lastconfirmed journal entry. You must run this command on Source Server where the remote journal resides andwhere InfoSphere CDC has been installed as the source product. InfoSphere CDCreturns the sequence number and journal receivers of the remote journal. Note: Local journal receivers reside on your Data Origin Server and remote journalreceivers reside on your Source Server.

Related reference: RTVDMJENT—Retrieve InfoSphere CDC journal entry

Parameter DescriptionCL var for JRNENTRY This parameter returns the last confirmed

(replicated) journal entry sequencenumber

CL var for JRN-RCVNME This parameter returns the journalreceiver name of the last confirmedentry.

CL var for JRNRCVLIB This parameter returns the library wherethe journal receiver is located.

80

--

IBM InfoSphere Change Data Capture, Version 6.1 VFYTSJRN—Verify remote journal InfoSphere® CDC provides the VFYTSJRN command which lets you verify if therequired journal exists for all tables you have selected for replication to the namedsubscription. In a data replication scenario where InfoSphere CDC has been installed andconfigured to replicate data from a remote journal, you can use the VFYTSJRNcommand to verify if the remote journal exists on the Source Server. Note: Local journal receivers reside on your Data Origin Server and remote journalreceivers reside on your Source Server. Applies To—Source Parameters Table 1. Supported keywords

Subscription name (TARGET) Specifies the name of the subscription, as defined in Management Console, forwhich journaling is verified.This is a required parameter.

NameSpecify the name of a subscription. This must be the same name defined inManagement Console.

Related concepts: About installing InfoSphere CDC for DB2 for i on the Data Origin Server About installing InfoSphere CDC for DB2 for i on the Source Server Related reference: VFYTSJRN—Verify journal

Keyword Description Choices NotesTARGET Subscription name Name Required

81

------------

IBM InfoSphere Change Data Capture, Version 6.1 Commands for InfoSphere CDC for DB2® for i The following topics introduce commands and the kind of commands available toyou in InfoSphere® CDC:

Command and parameter formats and conventions About issuing commands in InfoSphere CDC for DB2 for i Replication commands Source table commands Table mapping commands Copy subscription commands Promote subscription commands Table-level operation commands Database journal commands Communication commands End and shut down InfoSphere CDC commands Other commands

82

-

--

-

--

-

--

--

-

IBM InfoSphere Change Data Capture, Version 6.1 Command and parameter formats and conventions For each command that is described, the following items of information areprovided, if applicable:

Command—Identifies the name of the command and lists the commandparameters.Description—Briefly explains what the command does when it is invoked.Input Parameters—Describes each parameter in the command and identifies thevalues that can be specified.Result—Specifies the information, if any, which is displayed on the screen as aresult of running the command.Examples—Provides one or more examples of invoking the command.Use—Identifies limitations and recommendations that determine where and whenthe command can be invoked.Related Topics—Identifies other commands that may be related in some way tothe current command.

Conventions Underline ( ___ ) indicates mandatory parameters..Square brackets ( [ ] ) indicate an optional parameter sequence. If a parametersequence 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 beselected. When one or more vertical bars appear in a list of parameters that isenclosed by square brackets ( [ ] ), the choices are limited to the parameters in thelist, 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.

83

-

--

-

IBM InfoSphere Change Data Capture, Version 6.1 About issuing commands in InfoSphere CDC forDB2® for i You should note the following information about issuing commands in InfoSphere®CDC:

You can issue commands from an System i® command line or include them in jobschedulers 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 currentlibrary (CHGCURLIB) is set to the InfoSphere CDC product library (the defaultproduct library is DMIRROR). This includes the invocation of commands outside ofInfoSphere CDC (for example, commands invoked via CL programs, Submit Job,System i job scheduled entry, or third party job scheduler).You can also issue equivalent commands remotely from client workstationsrunning Management Console. Instead of issuing InfoSphere CDC commands oneach server, you can apply Management Console commands to specific servers inyour replication configuration from a client workstation.

84

--

--

--

---

---

IBM InfoSphere Change Data Capture, Version 6.1 ENDDTAMIR - End mirroring Use this command to end continuous or net change mirroring on a subscription. Applies To—Source Parameters Table 1. Supported keywords

Subscription name (TARGET) Specifies the name of the subscription.This is a required parameter.

NameSpecify the name of a subscription. This must be the same name defined inManagement Console.

generic*Generic names may be used for subscriptions, by adding an asterisk (*) afterone or more characters that are common to the group of subscriptions names.For example, 'abc*' specifies all subscriptions starting with the characters 'abc'.

*ALLSpecifies all subscriptions.

End type (ENDTYP) Specifies how you want to end replication.

*CNTRLDReplication is ended when InfoSphere® CDC completes replication.This is the default setting.

*IMMEDMirroring is ended immediately.Use this setting only if you cannot end data mirroring in a controlled manner.

Result Messages are placed in the Event Log. Examples ENDDTAMIR TARGET(SUB1)InfoSphere CDC ends mirroring on source tablesselected to subscription SUB1 in a controlled manner. ENDDTAMIR TARGET(SUB1) ENDTYP(*IMMED)InfoSphere CDC ends mirroringon source tables selected to subscription SUB1 immediately. ENDDTAMIR TARGET(*ALL) ENDTYP(*IMMED)InfoSphere CDC ends mirroring ofsource tables to all subscriptions immediately.

Keyword Description Choices NotesTARGET Subscription name Name, generic*,

*ALLRequired

ENDTYP End type *CNTRLD, *IMMED Optional

86

87

--

--

--

---

--

IBM InfoSphere Change Data Capture, Version 6.1 ENDDTARSH—End data refresh Use this command to specify how you want InfoSphere® CDC to end a refreshoperation to the specified target table. By default, InfoSphere CDC ends a refreshoperation to the target table in a controlled manner. Applies To—Source Parameters Table 1. Supported keywords

Subscription name (TARGET) Specifies the name of the subscription.This is a required parameter.

NameSpecify the name of a subscription. This must be the same name defined inManagement Console.

generic*Generic names may be used for subscriptions, by adding an asterisk (*) afterone or more characters that are common to the group of subscriptions names.For example, 'abc*' specifies all subscriptions starting with the characters 'abc'.

*ALLSpecifies all subscriptions.

End type (ENDTYP) Specifies how you want to end replication. Specifies how you want to endreplication.

*CNTRLDSpecifies a controlled end to a refresh.This is the default setting.

*IMMEDInfoSphere CDC ends a refresh immediately.

Result None Examples ENDDTARSH TARGET(SUB1)InfoSphere CDC ends the refresh on subscriptionSUB1 end in a controlled manner. ENDDTARSH TARGET(SUB1) ENDTYP(*IMMED)InfoSphere CDC ends therefresh on subscription SUB1 immediately. ENDDTARSH TARGET(*ALL) ENDTYP(*IMMED)InfoSphere CDC ends the refreshon all subscriptions immediately.

Keyword Description Choices NotesTARGET Subscription name Name, generic*,

*ALLRequired

ENDTYP End type *CNTRLD, *IMMED Optional

88

89

--

--

--

--

---

IBM InfoSphere Change Data Capture, Version 6.1 STRDTARSH—Start data refresh Use this command to start a refresh on a subscription. Depending on the value set for the Allow Refresh While Active system parameter,InfoSphere® CDC can allocate and exclude source tables until it completes arefresh operation. This ensures complete synchronization between the source andtarget tables. As a result, you should schedule a refresh so as not to interfere withnormal operations. Parameters Table 1. Supported keywords

Subscription name (TARGET) Specifies the name of the subscription.This is a required parameter.

NameSpecify the name of a subscription. This must be the same name defined inManagement Console.

generic*Generic names may be used for subscriptions, by adding an asterisk (*) afterone or more characters that are common to the group of subscriptions names.For example, 'abc*' specifies all subscriptions starting with the characters 'abc'.

*ALLSpecifies all subscriptions.

Tables to refresh (TABLES) Specifies which tables will be refreshed.

*ALLAll source tables selected to the subscriptions will be refreshed.

*FLAGOnly tables that have a status of Refresh will be refreshed.This is the default setting.

Result Messages are placed in the Event Log. Examples STRDTARSH TARGET(SUB1)InfoSphere CDC refreshes all target tables that havea status of Refresh on subscription SUB1. STRDTARSH TARGET(SUB1) TABLES(*ALL)InfoSphere CDC refreshes all targettables on subscription SUB1. STRDTARSH TARGET(*ALL) TABLES(*FLAG)InfoSphere CDC refreshes all targettables flagged for a refresh on all subscriptions.

Keyword Description Choices NotesTARGET Subscription name Name, generic*,

*ALLRequired

TABLES Tables to refresh *FLAG, *ALL Optional

90

91

--

--

--

--

--

-

-

IBM InfoSphere Change Data Capture, Version 6.1 STRDTAMIR—Start continuous mirroring Use this command to start mirroring on a subscription. This command initiatesmirroring for any subscription with a replication method of Mirror and a status ofRefresh or Active. Before InfoSphere® CDC starts mirroring, all tables withreplication method set to Mirror and status set to Refresh are initially refreshed tothe target system. Applies To—Source Parameters Table 1. Supported keywords

Subscription name (TARGET) Specifies the name of the subscription.This is a required parameter.

NameSpecify the name of a subscription. This must be the same name defined inManagement Console.

generic*Generic names may be used for subscriptions, by adding an asterisk (*) afterone or more characters that are common to the group of subscriptions names.For example, 'abc*' specifies all subscriptions starting with the characters 'abc'.

*ALLSpecifies all subscriptions.

Idle format (IDLE) Specifies the action that InfoSphere CDC will take when it determines that allavailable data has been replicated to the target.

*WAITInfoSphere CDC replication process remains active after all changes arereplicated to the target.This is the default setting.

*ENDInfoSphere CDC replication process ends after all changes are replicated to thetarget.

Continuous mirroring format (FORMAT) Indicates if InfoSphere CDC should start continuous mirroring.

*ONLY

Keyword Description Choices NotesTARGET Subscription name Name, generic*,

*ALLRequired

IDLE Idle format *WAIT, *END OptionalFORMAT Continuous

mirroring format*NO, *ONLY Optional

92

--

--

Indicates that InfoSphere CDC will not start continuous mirroring.*NO

Indicates that InfoSphere CDC will start continuous mirroring.This is the default setting.

Result Messages are placed in the Event Log. Examples STRDTAMIR TARGET(SUB1)Starts continuous mirroring on subscription SUB1.InfoSphere CDC starts continuous mirroring on tables that have a replicationmethod set to mirroring, and a table status set to Refresh or Active. InfoSphere CDCcontinues to monitor the journal for activity after all available data has beenmirrored. STRDTAMIR TARGET(SUB1) IDLE(*WAIT) FORMAT(*NO)Starts continuousmirroring on subscription SUB1. InfoSphere CDC starts continuous mirroring oftables that have a replication method set to mirroring, and a table status set toRefresh or Active. InfoSphere CDC continues to monitor the journal for activity afterall available data has been mirrored. STRDTAMIR TARGET(*ALL) IDLE(*WAIT) FORMAT(*NO)Starts continuousmirroring on all subscriptions. InfoSphere CDC starts continuous mirroring of tablesthat have a replication method set to mirroring, and a table status set to Refresh orActive. InfoSphere CDC continues to monitor the journal for activity after allavailable data has been mirrored.

93

--

--

--

--

--

-

--

-

IBM InfoSphere Change Data Capture, Version 6.1 STRDTAMIR—Start Net Change Mirroring Use this command to start net change mirroring on a subscription. This commandstarts mirroring of any table with a replication method set to mirroring, and a tablestatus set to Refresh or Active. Applies To—Source Syntax Table 1. Supported keywords

Subscription name (TARGET) Specifies the name of the subscription.This is a required parameter.

NameSpecify the name of a subscription. This must be the same name defined inManagement Console.

generic*Generic names may be used for subscriptions, by adding an asterisk (*) afterone or more characters that are common to the group of subscriptions names.For example, 'abc*' specifies all subscriptions starting with the characters 'abc'.

*ALLSpecifies all subscriptions.

Idle format (IDLE) Specifies the action that InfoSphere® CDC will take when it determines that allavailable data has been replicated to the target.

*WAITInfoSphere CDC replication process remains active after all changes arereplicated to the target.This is the default setting.

*ENDInfoSphere CDC replication process ends after all changes are replicated to thetarget.

Net change mirroring format (FORMAT) Indicates if InfoSphere CDC should start net change mirroring.

*ONLYIndicates that InfoSphere CDC will not start net change mirroring.

*NO

Keyword Description Choices NotesTARGET Subscription name Name, generic*,

*ALLRequired

IDLE Idle format *WAIT, *END OptionalFORMAT Net change

mirroring format*NO, *ONLY Optional

94

--

Indicates that InfoSphere CDC will start net change mirroring.This is the default setting.

Examples STRDTAMIR TARGET(SUB1) IDLE(*END)InfoSphere CDC starts net changemirroring on subscription SUB1. All InfoSphere CDC processes end after allavailable data has been mirrored. STRDTAMIR TARGET(SUB1) IDLE(*END) FORMAT(*NO)InfoSphere CDC startsnet change mirroring on subscription SUB1. All InfoSphere CDC processes endafter all available data has been mirrored. STRDTAMIR TARGET(*ALL) IDLE(*END) FORMAT(*NO)InfoSphere CDC startsnet change mirroring on all subscriptions. All InfoSphere CDC processes end afterall available data has been mirrored.

95

-----------

IBM InfoSphere Change Data Capture, Version 6.1 Source table commands In this section, you will learn about commands that let you manage your sourcetables in a subscription.

ADDTBL—Add Tables CHGREPMTD—Change replication method DSLTGTTBL—Deselect source tables READDTBL—Update definition of source tables RMVTBL—Remove tables STRDTAMIR—Describe source tables to target tables SETMIRSTS—Set table status for mirroring SETRSHSTS—Set table status for refresh SLTTGTTBL—Select source tables for replication SETTSSYNC—Set synchronization point SETJRNPOS—Set journal position

96

--

--

--

--

IBM InfoSphere Change Data Capture, Version 6.1 ADDTBL—Add Tables Use this command to add source tables to the catalog for possible replication. Youcan add individual tables, generic groups of tables, or all tables within a library witha 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. Youcan remove added tables by using the RMVTBL command. Applies To—Source Parameters Table 1. Supported keywords

Source table name (TABLE) Specifies the name of the source table to add to the Source Tables area inManagement Console. This is a required parameter. Qualifier 1: Source table name

NameSpecifies the name of a table

generic*Generic names may be used for tables, by adding an asterisk (*) after one ormore characters that are common to the group of table names. For example,'abc*' specifies all tables starting with the characters 'abc'.

*ALLSpecifies all tables.

Qualifier 2: Library Name

Specifies the library where the table resides. Result Relevant messages are produced to the job log. Examples ADDTBL TABLE(PRODLIB/CUSTOMER)Adds the source table namedCUSTOMER that resides in library PRODLIB to the catalog. ADDTBL TABLE(DTUTOR/*ALL)Adds all source tables that reside in libraryDTUTOR to the catalog. Related reference: SLTTGTTBL—Select source tables for replication

Keyword Description Choices NotesTABLE Source table name Qualified object

nameRequired

Qualifier 1: Sourcetable name

Name, generic*,*ALL

97

--

--

--

--

--

IBM InfoSphere Change Data Capture, Version 6.1 CHGREPMTD—Change replication method Use this command to change the replication method of a source table in asubscription. 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 replicationmethod for individual source tables, generic groups source tables, or all sourcetables within a library. Applies To—Source Parameters Table 1. Supported keywords

Subscription name (TARGET) Specifies the name of the subscription to which the source table belongs. This is arequired parameter.

NameSpecify the name of a subscription. This must be the same name defined inManagement Console.

Source table name (TABLE) Specifies the name of the source table. This is a required parameter. Qualifier 1: Source table name

NameSpecifies the name of a table

generic*Generic names may be used for tables, by adding an asterisk (*) after one ormore characters that are common to the group of table names. For example,'abc*' specifies all tables starting with the characters 'abc'.

*ALLSpecifies all tables.

Qualifier 2: Library Name

Specifies the library where the table resides. Replication method (REPMTD) Specifies the replication method that you want to use.This is a required parameter.

Keyword Description Choices NotesTARGET Subscription name Name RequiredTABLE Source table name Qualified object

nameRequired

Qualifier 1: Sourcetable name

Name, generic*,*ALL

Qualifier 2: Library Name REPMTDReplication method *REFRESH,

*MIRRORRequired UPDMTD

99

--

--

--

--

*REFRESHSpecifies replication by refresh.

*MIRRORSpecifies replication by mirroring.

Update method (UPDMTD) Specifies the update method to be used by InfoSphere® CDC when applying data tothe target.This is a required parameter.

*KEYEDSpecifies that InfoSphere CDC will apply data using unique keys.

*RRNSpecifies that InfoSphere CDC will apply data using relative record numbers.

Result The next time you start replication, InfoSphere CDC applies data using the newreplication method. When you issue this command, you should see the appropriatemessages in the Event Log. Examples CHGREPMTD TARGET(SUB1) TABLE(DTUTOR/CUSTOMER)REPMTD(*REFRESH) UPDMTD(*KEYED)The source table CUSTOMER (in libraryDTUTOR) has its replication method changed to *REFRESH in the subscription(SUB1).InfoSphere CDC will update the target table using unique keyed accesspaths. Since the replication method is *REFRESH, this parameter is not applicablein this command invocation. CHGREPMTD TARGET(SUB1) TABLE(DTUTOR/*ALL) REPMTD(*MIRROR)UPDMTD(*KEYED)All source tables (in library DTUTOR) have their replicationmethods changed to *MIRROR in the subscription (SUB1). InfoSphere CDC willupdate 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 replicationmethod changed to *MIRROR in the subscription (SUB1). InfoSphere CDC willupdate the target table using its relative record number.

100

--

--

--

--

--

IBM InfoSphere Change Data Capture, Version 6.1 DSLTGTTBL—Deselect source tables Use this command to deselect a source table from a subscription. After deselectinga source table, you cannot replicate this source table to the target. You can deselectindividual tables, generic groups of tables or all tables in a library from a subscriptionwith a single execution of this command. Only tables that have already beenselected for replication are affected by this command. Applies To—Source Parameters Table 1. Supported keywords

Subscription name (TARGET) The name of the subscription, as defined in Management Console, to which thesource table is selected. This is a required parameter.

NameSpecify the name of a subscription. This must be the same name defined inManagement Console.

Source table name (TABLE) Specifies the name of the source table. This is a required parameter. Qualifier 1: Source table name

NameSpecifies the name of a table

generic*Generic names may be used for tables, by adding an asterisk (*) after one ormore characters that are common to the group of table names. For example,'abc*' specifies all tables starting with the characters 'abc'.

*ALLSpecifies all tables.

Qualifier 2: Library Name

Specifies the library where the table resides. Result Relevant messages are produced to the job log. Examples DSLTGTTBL TARGET(SUB1) TABLE(DTUTOR/*ALL)All source tables in libraryDTUTOR selected to subscription SUB1 are deselected.

Keyword Description Choices NotesTARGET Subscription name Name RequiredTABLE Source table name Qualified object

nameRequired

Qualifier 1: Sourcetable name

Name, generic*,*ALL

101

DSLTGTTBL TARGET(SUB1) TABLE(DTUTOR/CUSTOMER)Source tableCUSTOMER in library DTUTOR selected to subscription SUB1 is deselected.

102

--

--

--

--

--

-

IBM InfoSphere Change Data Capture, Version 6.1 READDTBL—Update definition of source tables Use this command when you have changed the definition of a source table after thetable has been added to the InfoSphere® CDC metadata tables. These changescan include adding new columns, or modifying the column name, type, or length.This command modifies the source table definition stored within InfoSphere CDC. CAUTION: This command disables mirroring for all subscription that use mirroring as the modeof replication. Before issuing this command, you should perform a refresh on thesubscription to ensure that the source and target tables are synchronized. Applies To—Source Parameters Table 1. Supported keywords

Source table name (TABLE) Specifies the name of the source table that you have updated and want to makeavailable for replication by either:

Adding it to InfoSphere CDC metadata (using the command line).Adding it to the source tables area in Management Console (using theManagement Console GUI).Name

Specifies the name of a table Library name (LIB) The name of the library in which the updated source table resides.

NameThe library name.

Table status (ACTIVE) Use this parameter to set the table's status to active.

*NOThe table is placed in Parked status after it has been made available forreplication.This is the default setting.

*YESThe table is placed in Active status after it has been made available forreplication.

Result InfoSphere CDC adds the source table to the metadata table. If you are using

Keyword Description Choices NotesTABLE Source table name Name RequiredLIB Library name Name OptionalACTIVE Table status *NO, *YES Optional

103

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. Examples READDTBL TABLE(MYSRCTABLE) LIB(MYLIB) ACTIVE(*YES)Changes thedefinition of MYSRCTABLE which resides in MYLIB and sets the status to active. Related reference: STRDTAMIR—Describe source tables to target tables ASNTGTTBL—Map source and target tables

104

--

--

--

--

---

--

IBM InfoSphere Change Data Capture, Version 6.1 RMVTBL—Remove tables Use this command to remove source tables that were added to a catalog forpossible replication. You can remove individual tables, generic groups of tables orall tables in a library with a single execution of this command. Only source tablesthat have been added are considered when you issue this command. Before using this command to remove the source tables, you should de-assigntarget tables and deselect source tables. Applies To—Source Parameters Table 1. Supported keywords

Source table name (TABLE) Specifies the name of the source table that is removed from the catalog. This is arequired parameter. Qualifier 1: Source table name

NameSpecifies the name of a table

generic*Generic names may be used for tables, by adding an asterisk (*) after one ormore characters that are common to the group of table names. For example,'abc*' specifies all tables starting with the characters 'abc'.

*ALLSpecifies all tables.

Qualifier 2: Library Name

Specifies the library where the table resides. Journaling format (ENDJRN) Indicates whether or not journaling to the default InfoSphere® CDC journal shouldstop or continue for the specified table.This parameter does not have any effect if auser-defined journal, as opposed to the default journal, is being used.

YSpecifies that journaling stop for the specified table.This is the default setting.

NSpecifies that journaling continue for the specified table.

Keyword Description Choices NotesTABLE Source table name Qualified object

nameRequired

Qualifier 1: Sourcetable name

Name, generic*,*ALL

Qualifier 2: Library Name ENDJRN

105

Result Relevant messages are sent to the job log. Examples RMVTBL TABLE(DTUTOR/SALES)Source table SALES in library DTUTOR isremoved from the catalog. Journaling is stopped for the SALES table. RMVTBL TABLE(DTUTOR/*ALL) ENDJRN(Y)All added source tables in libraryDTUTOR are removed from the catalog. Journaling is stopped for the removed source tables in library DTUTOR. RMVTBL TABLE(DTUTOR/CUSTOMER) ENDJRN(N)Source table CUSTOMER inlibrary DTUTOR is removed from the catalog. Journaling continues for the CUSTOMER table. Related reference: DASTGTTBL—Unmap source and target tables DSLTGTTBL—Deselect source tables ADDTBL—Add Tables

106

--

--

--

---

--

--

--

-

IBM InfoSphere Change Data Capture, Version 6.1 STRDTAMIR—Describe source tables to targettables Use this command when you have updated the definition of your source table. Applies To—Source Parameters Table 1. Supported keywords

Subscription name (TARGET) Specifies the name of the subscription.This is a required parameter.

NameSpecify the name of a subscription. This must be the same name defined inManagement Console.

generic*Generic names may be used for subscriptions, by adding an asterisk (*) afterone or more characters that are common to the group of subscriptions names.For example, 'abc*' specifies all subscriptions starting with the characters 'abc'.

*ALLSpecifies all subscriptions.

Idle format (IDLE) Specifies the action that InfoSphere® CDC will take when it determines that alldefinitions have been sent to the subscription.

*WAITInfoSphere CDC will remain active after all source tables have been described.This is the default setting.

*ENDInfoSphere CDC will end after all source tables have been described.

Update format (FORMAT) Specifies the format used to updated the definition of tables.

*NOIndicates that InfoSphere CDC will start mirroring without sending the updatedsource table definition to the target.This is the default setting.

*ONLYIndicates InfoSphere CDC will send the updated source table definition to thetarget but will not start mirroring.

Keyword Description Choices NotesTARGET Subscription name Name, generic*,

*ALLRequired

IDLE Idle format *WAIT, *END OptionalFORMAT Update format *NO, *ONLY Optional

107

Result None. Examples STRDTAMIR TARGET(SUB1) IDLE(*END) FORMAT(*ONLY)Sends definitions ofall source tables selected to subscription SUB1. After the transfer has beencompleted, all InfoSphere CDC jobs end. STRDTAMIR TARGET(*ALL) IDLE(*END) FORMAT(*ONLY)Sends definitions of allsource tables selected to all subscriptions. After the transfer has been completed, allInfoSphere CDC jobs end.

108

--

--

--

--

--

--

IBM InfoSphere Change Data Capture, Version 6.1 SETMIRSTS—Set table status for mirroring Use this command to change the status of a table that you have selected formirroring. CAUTION: You must stop replication before you can issue this command. Applies To—Source Parameters Table 1. Supported keywords

Subscription name (TARGET) Specifies the name of the subscription.This is a required parameter.

NameSpecify the name of a subscription. This must be the same name defined inManagement Console.

generic*Generic names may be used for subscriptions, by adding an asterisk (*) afterone or more characters that are common to the group of subscriptions names.For example, 'abc*' specifies all subscriptions starting with the characters 'abc'.

*ALLSpecifies all subscriptions.

Source table name (TABLE) Specifies the name of the source table to add to the Source Tables area inManagement Console. This is a required parameter. Qualifier 1: Source table name

NameSpecifies the name of a table

generic*Generic names may be used for tables, by adding an asterisk (*) after one ormore characters that are common to the group of table names. For example,'abc*' specifies all tables starting with the characters 'abc'.

*ALLSpecifies all tables.

Qualifier 2: Library

Keyword Description Choices NotesTARGET Subscription name Name, generic*,

*ALLRequired

TABLE Source table name Qualified objectname

Required

Qualifier 1: Sourcetable name

Name, generic*,*ALL

Qualifier 2: Library Name STATUS

109

--

--

---

---

NameSpecifies the library where the table resides.

Table Status (STATUS) Sets the status of the selected source table.

*IDLESets the status to Idle (inactive).

*RFSHSets the status to Refresh (refresh before mirroring).This is the default setting.

*ACTVSets the status to Active (mirroring). Use this status only when the target table is synchronized with the source table.

Result InfoSphere® CDC changes the status of a source table you set for mirroring toeither idle, refresh, or active. You should also receive the appropriate messages inthe Event Log. Examples SETMIRSTS TARGET(SUB1) TABLE(DTUTOR/SALES)Sets the status of theselected source table SALES (in library DTUTOR) to Refresh (*RFSH). The statuschange applies to the SALES source table selected to the subscription SUB1 formirroring. SETMIRSTS TARGET(SUB1) TABLE(PRODLIB/CUSTOMER) STATUS(*ACTV)Sets the status of the selected source table CUSTOMER (in library PRODLIB) toActive (*ACTV). The status change applies to the CUSTOMER source tableselected to the subscription SUB1 for mirroring. SETMIRSTS TARGET(*ALL) TABLE(PRODLIB/CUSTOMER) STATUS(*IDLE)Setsthe status of the selected source table CUSTOMER (in library PRODLIB) to Idle(*IDLE). The status change applies to all CUSTOMER source tables selected to anysubscription for mirroring. SETMIRSTS TARGET(*ALL) TABLE(*ALL/*ALL) STATUS(*RFSH)Sets the status ofall selected source tables (in all libraries) to Refresh (*RFSH). The status changeapplies to all source tables selected to any subscription for mirroring.

110

--

--

--

--

--

--

IBM InfoSphere Change Data Capture, Version 6.1 SETRSHSTS—Set table status for refresh Use this command to change the status of a selected table or group of tables thatyou want to refresh. Only tables that will be refreshed are considered in thiscommand. Tables that will be mirrored are ignored. CAUTION: You must stop replication before you can issue this command. Applies To—Source Parameters Table 1. Supported keywords

Subscription name (TARGET) Specifies the name of the subscription.This is a required parameter.

NameSpecify the name of a subscription. This must be the same name defined inManagement Console.

generic*Generic names may be used for subscriptions, by adding an asterisk (*) afterone or more characters that are common to the group of subscriptions names.For example, 'abc*' specifies all subscriptions starting with the characters 'abc'.

*ALLSpecifies all subscriptions.

Source table name (TABLE) Specifies the name of the source table to add to the Source Tables area inManagement Console. This is a required parameter. Qualifier 1: Source table name

NameSpecifies the name of a table

generic*Generic names may be used for tables, by adding an asterisk (*) after one ormore characters that are common to the group of table names. For example,'abc*' specifies all tables starting with the characters 'abc'.

*ALLSpecifies all tables.

Keyword Description Choices NotesTARGET Subscription name Name, generic*,

*ALLRequired

TABLE Source table name Qualified objectname

Required

Qualifier 1: Sourcetable name

Name, generic*,*ALL

Qualifier 2: Library Name STATUS

111

--

--

--

Qualifier 2: Library Name

Specifies the library where the table resides. Table Status (STATUS) Sets the status of the selected source table.

*IDLESets the status to Idle (do not refresh).

*RFSHSets the status to Refresh.

Result None Examples SETRSHSTS TARGET(SUB1) TABLE(DTUTOR/SALES)Sets the status of theselected source table SALES (in library DTUTOR) to Refresh (*RFSH). The statuschange applies to the SALES source table selected to subscription SUB1 forrefresh. SETRSHSTS TARGET(SUB1) TABLE(PRODLIB/CUSTOMER) STATUS(*IDLE)Sets the status of the selected source table CUSTOMER (in library PRODLIB) toIdle (*IDLE). The status change applies to the CUSTOMER source table selected tosubscription SUB1 for refresh. SETRSHSTS TARGET(*ALL) TABLE(PRODLIB/CUSTOMER) STATUS(*RFSH)Sets the status of the selected source table CUSTOMER (in library PRODLIB) toRefresh (*RFSH). The status change applies to all CUSTOMER source tablesselected to any subscription for refresh. SETRSHSTS TARGET(*ALL) TABLE(*ALL/*ALL) STATUS(*RFSH)Sets the statusof all selected source tables (in all libraries) to Refresh (*RFSH). The status changeapplies to all source tables selected to any subscription for refresh. Related reference: STRDTAMIR—Start continuous mirroring

112

--

--

--

IBM InfoSphere Change Data Capture, Version 6.1 SLTTGTTBL—Select source tables for replication Use this command to select a source table for replication to a subscription. You canselect individual tables, generic groups of tables, or all tables within a library to onesubscription with a single execution of this command. Only tables that have beenadded to the catalog and not already selected to the subscription are consideredwhen you issue this command. For multiple member files, all members are selected by default. After selecting thesource tables you want to replicate, subscription metadata needs to be described tothe subscriber using the STRDTAMIR command. Then the source tables need to beassigned to the target tables using the ASNTGTTBL command on the subscriber. 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 canconfigure in Management Console. Applies To—Source Parameters Table 1. Supported keywords

Subscription name (TARGET) Specifies the name of the subscription.This is a required parameter.

NameSpecify the name of a subscription. This must be the same name defined inManagement Console.

generic*Generic names may be used for subscriptions, by adding an asterisk (*) afterone or more characters that are common to the group of subscriptions names.For example, 'abc*' specifies all subscriptions starting with the characters 'abc'.

*ALLSpecifies all subscriptions.

Keyword Description Choices NotesTARGET Subscription name Name, generic*,

*ALLRequired

TABLE Source table name Qualified objectname

Required

Qualifier 1: Sourcetable name

Name, generic*,*ALL

Qualifier 2: Library Name REPMTDReplication method *MIRROR,

*REFRESHRequired UPDMTD

Update method *KEYED, *RRN Required INITSTSInitial status *ACTIVE, *IDLE,

*REFRESHRequired ROWSELTYP

Row selection type *OMIT, *SELECT Required ROWSELEXP

113

--

--

--

--

--

--

--

--

--

--

---

Source table name (TABLE) Specifies the name of the source table to add to the Source Tables area inManagement Console. This is a required parameter. Qualifier 1: Source table name

NameSpecifies the name of a table

generic*Generic names may be used for tables, by adding an asterisk (*) after one ormore characters that are common to the group of table names. For example,'abc*' specifies all tables starting with the characters 'abc'.

*ALLSpecifies all tables.

Qualifier 2: Library Name

Specifies the library where the table resides. Replication method (REPMTD) Sets the replication method of the selected source table.This is a requiredparameter.

*REFRESHSpecifies replication by refresh.

*MIRRORSpecifies replication by mirroring.

Update method (UPDMTD) Sets the update method to be used by InfoSphere® CDC to apply mirrored data tothe target. This parameter applies only if you selected mirroring (*MIRROR) for theREPMTD keyword. This is a required parameter.

*KEYEDIndicates that InfoSphere CDC is applying data is using unique access paths.

*RRNIndicates that InfoSphere CDC is applying data using relative record numbers.

Initial status (INITSTS) Sets the initial status of the selected source table.This is a required parameter.

*IDLESpecifies a status of Idle.

*REFRESHSpecifies a status of Refresh.

*ACTIVESpecifies a status of Active.This option is not available if the REPMTD keyword is set to *REFRESH.

Row selection type (ROWSELTYP) Specifies the type of row selection applied to the source table.This is a requiredparameter.

114

--

--

--

*SELECTReplicate rows that satisfy the row selection expression.

*OMITDo not replicate rows that satisfy the row selection expression. All other rowsthat do not satisfy the row selection expression are replicated.

Row selection expression (ROWSELEXP) Sets the row selection expression that determines which rows in the source tableare replicated. You must enter a row selection expression based on columns in thesource table.This is a required parameter.

NameSpecifies the name of the row selection expression.

Result Messages are sent to the Event Log. Examples SLTTGTTBL TARGET(SUB1) TABLE(DTUTOR/*ALL) REPMTD(*MIRROR)UPDMTD(*KEYED) INITSTS(*ACTIVE)Selects all source tables (in libraryDTUTOR) 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 isActive (*ACTIVE). This means that an initial refresh is not performed beforemirroring begins. A row selection expression is not defined for each source table inlibrary 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 (inlibrary DTUTOR) to subscription SUB1. The replication method for the tables ismirroring. The update method is by relative record number. The initial status for thetables is Refresh (*REFRESH). This ensures that the table is refreshed beforemirroring begins. A row selection expression is defined for each source table. Onlyrows 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")Selects the source table CUSTOMER (in libraryDTUTOR) to subscription SUB1. The replication method for the table is refresh. Theinitial status for the table is Refresh (*REFRESH). This ensures that the table isrefreshed. A row selection expression is defined for the CUSTOMER table. Onlyrows in the CUSTOMER table where SALES is greater that 10,000 are replicated. Related reference: ASNTGTTBL—Map source and target tables

115

--

--

--

IBM InfoSphere Change Data Capture, Version 6.1 SETTSSYNC—Set synchronization point Use this command to synchronize mirroring to start at the earliest backup point forall tables selected to the named subscription. This command is to be used when it isnecessary to start mirroring from the time that the last backup was performed. Theearliest backup point is determined by identifying the time and date of the mostrecent ‘file save' journal entry for all journals associated with the selected tables.The earliest timestamp determines the backup point. In each journal, SETTSSYNCsets the journal position to this backup point. When mirroring is started, thesequence of journal entries following the backup point are read. Only tables that are mirrored (by unique key or relative record number) areconsidered in the determination of the earliest backup point. If a ‘file save' journalentry 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. Applies To—Source Parameters Table 1. Supported keywords

Subscription name (TARGET) Specifies the name of the subscription.This is a required parameter.

NameSpecify the name of a subscription. This must be the same name defined inManagement Console.

generic*Generic names may be used for subscriptions, by adding an asterisk (*) afterone or more characters that are common to the group of subscriptions names.For example, 'abc*' specifies all subscriptions starting with the characters 'abc'.

*ALLSpecifies all subscriptions.

Result Relevant messages are produced to the job log. Examples SETTSSYNC TARGET(SUB1)Sets the synchronization point for all tables selectedfor mirroring to subscription SUB1.

Keyword Description Choices NotesTARGET Subscription name Name, generic*,

*ALLRequired

116

--

--

--

--

IBM InfoSphere Change Data Capture, Version 6.1 SETJRNPOS—Set journal position Use this command to position InfoSphere® CDC to start mirroring at a specificjournal entry. You can enter the specific journal entry directly or it can be determinedby the command if you enter a date and time. Applies To—Source Parameters Table 1. Supported keywords

Journal name (JOURNAL) The name of the journal associated with the journal receiver that has its positionchanged by this command. This is a required parameter. Qualifier 1: Journal name

NameSpecifies the name of the journal associated with the journal receiver that hasits position changed by this command.

Qualifier 2: Library Name

The name of the library where the journal resides Subscription name (TARGET) Specifies the name of the subscription.This is a required parameter.

NameSpecify the name of a subscription. This must be the same name defined inManagement Console.

generic*Generic names may be used for subscriptions, by adding an asterisk (*) afterone or more characters that are common to the group of subscriptions names.

Keyword Description Choices NotesJOURNAL Journal name Qualified object

nameRequired

Qualifier 1: Journalname

Name

Qualifier 2: Library Name TARGETSubscription name Name, generic*,

*ALLRequired JRNRCVNME

Journal receivername

Qualified objectname

Required

Qualifier 1: Journalname

Name Qualifier 2: Library

Name STRDTE Start dateDate Required STRTIM Start timeTime Required STRSEQNBR Sequence numberNumber Required OPEN Open transaction

117

--

--

--

---

---

--

--

--

-

For example, 'abc*' specifies all subscriptions starting with the characters 'abc'.*ALL

Specifies all subscriptions. Journal receiver name (JRNRCVNME) The name of the first or starting journal receiver to be searched for the specifiedsequence number or date and time. The library where the journal receiver residesmust be identified. Prefix the journal receiver with the name of the library where thejournal receiver is located.This is a required parameter. Qualifier 1: Journal name

NameSpecifies the name of the journal receiver.

Qualifier 2: Library Name

Specifies the name of the library where the journal receiver resides Start date (STRDTE) The date of the journal entry that InfoSphere CDC processes first when mirroring isstarted. This is a required parameter.

DateSpecifies the date.The date must be specified in the format 'MMDDYYYY'. For example,'09302012'.

Start time (STRTIM) The time of the journal entry that InfoSphere CDC processes first when mirroring isstarted. This is a required parameter.

TimeSpecifies the time of the journal entry.The time must be specified in the format 'HHMMSS'. For example, '184304'.

Sequence number (STRSEQNBR) The sequence number that InfoSphere CDC processes first when mirroring isstarted.This is a required parameter.

NumberSpecies the sequence number

Open transaction (OPEN) Specifies if the last open transaction in the product bookmarks will be preserved.This is a required parameter.

*NODoes not preserve the last open transaction sequence number; overwrites itwith the position specified in this command.This is the default setting.

*YESPreserves the last open transaction sequence number in the productbookmarks.

118

Result Relevant messages are produced to the job log. Examples SETJRNPOS JOURNAL(D_MIRROR/DMCJRN) TARGET(SUB1)JRNRCVNME(D_MIRROR/DMCRCV004) STRDTE('07052012') STRTIM('141200')OPEN(*NO)The search for the specified entry starts with journal receiverD_MIRROR/DMCRCV004 associated with journal D_MIRROR/DMCJRN. PositionsInfoSphere CDC to start mirroring at the entry in a journal receiver that wastimestamped on July 5, 2012 at 2:12 PM. All the bookmarks are reset. SETJRNPOS JOURNAL(D_MIRROR/DMCJRN) TARGET(SUB2)JRNRCVNME(D_MIRROR/DMCRCV006) STRSEQNBR(127855)The search for thespecified entry starts with journal receiver D_MIRROR/DMCRCV006 associatedwith journal D_MIRROR/DMCJRN. Positions InfoSphere CDC to start mirroring atthe entry that has a sequence number of 127855.

119

--

IBM InfoSphere Change Data Capture, Version 6.1 Table mapping commands In this section, you will learn about commands that:

ASNTGTTBL—Map source and target tables DASTGTTBL—Unmap source and target tables

120

---

---

---

IBM InfoSphere Change Data Capture, Version 6.1 ASNTGTTBL—Map source and target tables Use this command to assign source tables to target tables that have the samenames. Only tables that have not previously been assigned to a target table areconsidered when you issue this command. Physical and logical files must have thesame record format name and structure on the subscription server. Use theDASTGTTBL command to de-assign publication and target tables. Applies To—Target Parameters Table 1. Supported keywords

Subscription name (FROMSYS) The name of the subscription containing the source table. This is a requiredparameter.

NameSpecify the name of a subscription.This name is the source identifier, as defined in Management Console.

Source table name (SRCTBL) The name of the source table to assign. This is a required parameter.

NameSpecifies the name of a tableThe table name is case-sensitive. The type of database where the source tableresides determines the case that has to be used.

Source table library name (SRCLIB) The name of the library or database where the source table resides.This is arequired parameter.

NameSpecifies the name of the libraryThe name is case-sensitive. The location where the source table residesdetermines the case that has to be used.

Parameter Description Choices NotesFROMSYS Subscription name Name RequiredSRCTBL Source table name Name RequiredSRCLIB Source table library

nameName Required

TGTLIB Target table libraryname

Name Required

TGTMBRNME Member name Name, *ONLY RequiredASNTYP Assignment type *STD, *AUD, *SUM,

*CN1, *CN2, *ADAOptional

MULTISRC Multi-source *NO, *YES Optional

121

--

--

---

---

--

--

--

--

--

--

--

-

Target table library name (TGTLIB) The name of the library where the target table resides. In this library, a target tablethat has the same name as a source table is assigned. If the selected mode ofreplication for a source table is keyed file processing, then a unique keyed accesspath is required in the target table library. If the command cannot find a uniqueaccess path (keyed physical or logical), then the assignment is not completed andan error is logged.This is a required parameter.

NameSpecifies the name of the library

Member name (TGTMBRNME) Specifies the name of a member in the subscription physical file. Enter the name ofa member or one of the following values:

NameSpecifies the name of a member.

*ONLYSpecifies the only member in the subscription physical file.You can specify this value only when the subscription physical file is limited toone 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. Assignment type (ASNTYP) The assignment type defines how replicated data is applied to the target table:

*STDSpecifies the standard replication assignment type.This is the default setting.

*AUDSpecifies the audit assignment type (LiveAudit™)

*SUMSpecifies the summarization assignment type.

*CN1Specifies the row consolidation - one-to-one assignment type.

*CN2Specifies the row consolidation - one-to-many assignment type.

*ADASpecifies the adaptive apply assignment type.

Multi-source (MULTISRC) Indicates whether or not the target table is populated by more than one source table.

*NOIndicates that the target table does not contain summarized data from multiplesource tables.This is the default setting.

*YESIndicates that the target table does contain summarized data from multiplesource tables.

122

This parameter applies only when the ASNTYP parameter is set to *SUM. Result Relevant messages are produced to the job log. Examples ASNTGTTBL FROMSYS(PUB1) SRCTBL(MBR1) SRCLIB(PRODLIB)TGTLIB(SUBLIB) TGTMBRNME(*MEMBER) ASNTYP(*ADA)Assigns thepublication member named MBR1 that resides in library PRODLIB to thesubscription member of the same name in library SUBLIB. The members areassigned under adaptive apply. ASNTGTTBL FROMSYS(PUB1) SRCTBL(EMPLOYEE) SRCLIB(EMPSRC)TGTLIB(EMPTGT) TGTMBRNME(*ONLY) ASNTYP(*AUD)Assigns the sourcetable named EMPLOYEE that resides in library EMPSRC to the target table of thesame 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 undersummarization, and data from more than one source table is summarized in thetarget table. Related reference: DASTGTTBL—Unmap source and target tables

123

---

---

---

IBM InfoSphere Change Data Capture, Version 6.1 DASTGTTBL—Unmap source and target tables Use this command to de-assign publication and target tables. Only source tablesthat have been previously assigned to target tables are affected by this command. Applies To—Target Parameters Table 1. Supported keywords

Subscription name (FROMSYS) The name of the subscription containing the source table. This is a requiredparameter.

NameSpecify the name of a subscription.This name is the source identifier, as defined in Management Console.

Source table name (SRCTBL) The name of the source table to assign. This is a required parameter.

NameSpecifies the name of a tableThe table name is case-sensitive. The type of database where the source tableresides determines the case that has to be used.

Source table library name (SRCLIB) The name of the library or database where the source table resides.This is arequired parameter.

NameSpecifies the name of the libraryThe name is case-sensitive. The location where the source table residesdetermines the case that has to be used.

Result Relevant messages are produced to the job log. Examples DASTGTTBL FROMSYS(PUB1) SRCTBL(CUSTOMER) SRCLIB(DTUTOR) Theassigned source table CUSTOMER in library DTUTOR that is under the subscriptionPUB1 is de-assigned from its target table.

Keyword Description Choices NotesFROMSYS Subscription name Name RequiredSRCTBL Source table name Name RequiredSRCLIB Library name Name Required

124

125

--

IBM InfoSphere Change Data Capture, Version 6.1 Copy subscription commands In this section, you will learn about commands that:

CPYTGTASN—Copy target configuration CPYTGTTBL—Copy source configuration

126

---

--

--

--

--

IBM InfoSphere Change Data Capture, Version 6.1 CPYTGTASN—Copy target configuration Use this command to copy all or part of a subscriber replication configuration fromone subscription to another. You can copy individual tables, generic groups oftables, or all tables within a library with a single execution of this command. Onlytables that have not previously been copied to the destination subscription areconsidered when you issue this command. Applies To—Target Parameters Table 1. Supported keywords

Source subscription name (FROMSYS) The name of the subscription containing the source table. This is a requiredparameter.

NameSpecify the name of a subscription.This name is the source identifier, as defined in Management Console.

Source table name (SRCTBL) The name of the source table to assign. This is a required parameter.

NameSpecifies the name of a table

generic*Generic names may be used for tables, by adding an asterisk (*) after one ormore characters that are common to the group of table names. For example,'abc*' specifies all tables starting with the characters 'abc'.

*ALLSpecifies all tables.

Source library name (SRCLIB) The name of the library or database where the source table resides.This is arequired parameter.

NameSpecifies the name of the library.

Keyword Description Choices NotesFROMSYS Source subscription

nameName Required

SRCTBL Source table name Name, generic*,*ALL

Required

SRCLIB Library name Name RequiredTOSYS Target subscription

nameName Required

ROWID Row identifier Name Optional

127

-

---

--

The name is case-sensitive. The location where the source table residesdetermines the case that has to be used.

Target subscription name (TOSYS) The name of the subscription that receives the copied configuration. This is arequired parameter.

NameSpecify the name of a subscription.This name is the source identifier, as defined in Management Console.

Row identifier (ROWID) The row identifier expression that is defined for the assigned target table.

NameSpecify the name of the row identifier expression.

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 fromsubscription PUB1 to subscription PUB2. A row identifier expression is not definedfor each assigned target table. CPYTGTASN FROMSYS(PUB1) SRCTBL(CUSTOMER) SRCLIB(DTUTOR)TOSYS(PUB2) ROWID("BRANCH = 3")The described source table CUSTOMER inlibrary DTUTOR has its configuration copied from subscription PUB1 to subscriptionPUB2. The row identifier expression BRANCH = 3 is defined for the assigned targettable.

128

--

--

IBM InfoSphere Change Data Capture, Version 6.1 CPYTGTTBL—Copy source configuration Use this command to copy all or part of a publisher replication configuration fromone subscription to another. You can copy individual tables, generic groups oftables, or all tables within a library to the secondary subscription with a singleexecution of this command. After copying the configuration, copied source tableshave to be described to the subscriber. Next, you need to assign the source tablesto the target tables using the CPYTGTASN command on the subscriber. Applies To—Source Parameters Table 1. Supported keywords

Subscription name (TARGET) Specifies the name of the subscription that has its configuration copiedThis is arequired parameter.

NameSpecify the name of a subscription. This must be the same name defined inManagement Console.

Target subscription name (TOTARGET) Specifies the name of the subscription that receives the copied configurationThis isa required parameter.

NameSpecify the name of a subscription. This must be the same name defined inManagement Console.

Source table name (TABLE) Specifies the name of the source table to add to the Source Tables area inManagement Console. This is a required parameter. Qualifier 1: Source table name

Keyword Description Choices NotesTARGET Subscription name Name RequiredTOTARGET Target subscription

nameName Required

TABLE Source table name Qualified objectname

Required

Qualifier 1: Sourcetable name

Name, generic*,*ALL

Qualifier 2: Library Name INTSTSRSHInitial status *IDLE, *REFRESH Required INTSTSMIRInitial status *IDLE, *REFRESH,

*ACTIVERequired ROWSELTYP

Row selection type *OMIT, *SELECT Required ROWSELEXP

129

--

--

--

--

--

--

--

--

--

--

--

---

NameSpecifies the name of a table

generic*Generic names may be used for tables, by adding an asterisk (*) after one ormore characters that are common to the group of table names. For example,'abc*' specifies all tables starting with the characters 'abc'.

*ALLSpecifies all tables.

Qualifier 2: Library Name

Specifies the library where the table resides. Initial status (INTSTSRSH) Specifies the initial replication status for source tables that are refreshed.This is arequired parameter.

*IDLESpecifies a status of Idle to ensure that the table is not refreshed.

*REFRESHSpecifies a status of Refresh to ensure that the table is refreshed.

Initial status (INTSTSMIR) Specifies the initial replication status for source tables that are mirrored.This is arequired parameter.

*IDLESpecifies a status of Idle to ensure that the table is not mirrored.

*REFRESHSpecifies a status of Refresh to ensure that the table is refreshed beforemirroring begins.

*ACTIVESpecifies a status of Active to ensure that the table is not refreshed beforemirroring begins.

Row selection type (ROWSELTYP) Specifies the row selection type that will be applied to the source table.This is arequired parameter.

*SELECTReplicate rows that satisfy the row selection expression.

*OMITDo not replicate rows that satisfy the row selection expression. All other rowsthat do not satisfy the row selection expression are replicated.

Row selection expression (ROWSELEXP) The row selection expression that determines which rows in the source table arereplicated.

NameThe name of the row selection expression.You must enter a row selection expression based on columns in the sourcetable.

130

Result Relevant messages are produced to the job log. 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 sourcetable SALES in library DTUTOR is copied from subscription SUB1 to subscriptionSUB2. The initial replication status for the table when it is refreshed is *IDLE. Theinitial replication status for the table when it is mirrored is *ACTIVE. A row selectionexpression 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 tableCUSTOMER in library DTUTOR is copied from subscription SUB1 to subscriptionSUB2. The initial replication status for the table when it is refreshed is *IDLE. Theinitial replication status for the table when it is mirrored is *REFRESH. A rowselection expression is defined for CUSTOMER table. Only rows in the table thathave 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 selectedsource tables in DTUTOR are copied from subscription SUB1 to subscription SUB2.The initial replication status for the table when it is refreshed is *REFRESH. Theinitial replication status for the table when it is mirrored is *ACTIVE. A row selectionexpression is defined for each table in the DTUTOR library. Only rows in each tablethat have a SALES column value greater than 10,000 are replicated. Related reference: CPYTGTASN—Copy target configuration STRDTAMIR—Start continuous mirroring STRDTAMIR—Start Net Change Mirroring

131

---

IBM InfoSphere Change Data Capture, Version 6.1 Promote subscription commands In this section, you will learn about commands that:

DUPTBL—Duplicate added table metadata DUPTGTASN—Duplicate subscriber metadata DUPTGTTBL—Duplicate selected source table metadata

132

--

--

--

--

IBM InfoSphere Change Data Capture, Version 6.1 DUPTBL—Duplicate added table metadata This command is intended for working environments where a InfoSphere® CDCreplication configuration is first defined for tables in a test environment and thenpromoted to production. Specifically, this command modifies InfoSphere CDCpublisher metadata that refers to the specified source tables added to the catalog ina test environment. Metadata is modified to reference the source tables inproduction that correspond to the tables that have been added to the catalog in thetest environment. InfoSphere CDC verifies that the corresponding source tables inproduction exist and have the same names and attributes as the tables in the testenvironment. If InfoSphere CDC detects a discrepancy, the attempt to modify themetadata through this command fails. In this case, messages are generated toinform you of the differences that were detected.Applies To—Source Parameters Table 1. Supported keywords

Source table name (TABLE) Specifies the name of the source table that you have updated and want to makeavailable for replication by either:

NameSpecifies the name of a table

generic*Generic names may be used for tables, by adding an asterisk (*) after one ormore characters that are common to the group of table names. For example,'abc*' specifies all tables starting with the characters 'abc'.

*ALLSpecifies all tables.

Library name (TOLIB) The name of the production library containing the added source table thatcorresponds to the test table specified in the TABLE parameter.

NameThe library name.

Result Relevant messages are produced to the job log. Examples DUPTBL TABLE(TSTPUB/*ALL) TOLIB(PRDPUB)Publisher metadata for all addedsource tables in library TSTPUB is copied to library PRDPUB. DUPTBL TABLE(TSTPUB/CUSTOMER) TOLIB(PRDPUB)Publisher metadata for

Keyword Description Choices NotesTABLE Source table name Name, generic*,

*ALLRequired

TOLIB Library name Name Required

133

added source table CUSTOMER in library TSTPUB is copied to library PRDPUB.

134

---

-

IBM InfoSphere Change Data Capture, Version 6.1 DUPTGTASN—Duplicate subscriber metadata This command is intended for working environments where a InfoSphere® CDCreplication configuration is first defined for tables in a test environment and thenpromoted to production. For more information about promoting replicationconfigurations, see "Promoting Replication Configurations". Specifically, thiscommand modifies InfoSphere CDC subscriber metadata that refers to the tableassignments and data transformations (for example, derived expressions, valuetranslations, user exits, and so on) in the test area. Metadata is modified toreference table assignments and data transformations in production that are basedon settings already defined for corresponding tables in the test environment.InfoSphere CDC verifies that the corresponding source tables in production existand have the same names and attributes as the tables in the test environment. IfInfoSphere CDC detects a discrepancy, the attempt to modify the metadata throughthis command fails. In this case, messages are generated to inform you of thedifferences that were detected. Applies To—Target Parameters Table 1. Supported keywords

Source subscription name (FROMSYS) The name of the subscription containing the source table. This is a requiredparameter.

NameSpecify the name of a subscription.This name is the source identifier, as defined in Management Console.

Target subscription name (TOSYS) The name of the subscription in the production environment that receives the copiedsubscriber metadata. This is a required parameter.

Name

Keyword Description Choices NotesFROMSYS Source subscription

nameName Required

TOSYS Target subscriptionname

Name Required

SRCTBL Source table name Name RequiredSRCLIB Source test library

nameName Required

TOSRCLIB Source productionlibrary name

Name Required

TOTGTLIB Target productionlibrary name

Name Required

135

--

---

---

--

--

Specify the name of a subscription.This name is the source identifier, as defined in Management Console.

Source table name (SRCTBL) The name of the source table in the test library to have its subscriber metadatacopied. This is a required parameter.

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

Source test library name (SRCLIB) The name of the test library or database where the source table resides. This is arequired parameter.

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

Source production library name (TOSRCLIB) The name of the production library containing the source table that corresponds tothe source table in the test environment.This is a required parameter.

NameSpecifies the name of the library.

Target production library name (TOTGTLIB) The name of the production library containing the target table that corresponds tothe assigned target table in the test environment.This is a required parameter.

NameSpecifies the name of the library.

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

136

--

--

--

IBM InfoSphere Change Data Capture, Version 6.1 DUPTGTTBL—Duplicate selected source tablemetadata This command is intended for working environments where a InfoSphere® CDCreplication configuration is first defined for tables in a test environment and thenpromoted to production. For more information about promoting replicationconfigurations, see Promoting Replication Configurations. Specifically, thiscommand modifies InfoSphere CDC publisher metadata that refers to source tableselection attributes (for example, column selection, row selection, critical columns,replication method, and so on) in the test environment. Metadata is modified todefine the same selection attributes for the corresponding selected source tables inproduction. InfoSphere CDC verifies that the corresponding selected tables inproduction exist and have the same names and attributes as the tables in the testlibrary. If InfoSphere CDC detects a discrepancy, the attempt to modify themetadata through this command fails. In this case, messages are generated toinform you of the differences that were detected. Applies To—Target Parameters Table 1. Supported keywords

Subscription name (TARGET) The name of the subscription in the test environment to have its publisher metadatacopied. This is a required parameter.

NameSpecify the name of a subscription, as defined in Management Console..

Subscription name (TOTARGET) The name of the subscription in the production environment that receives copiedpublisher metadata. This is a required parameter.

NameSpecify the name of a subscription, as defined in Management Console.

Table name (TABLE) The name of the selected source table in the test libraryThis is a requiredparameter.

NameSpecifies the name of a table

Keywords Description Choices NotesTARGET Subscription name Name RequiredTOTARGET Subscription name Name RequiredTABLE Table name Name, generic*,

*ALLRequired

TOLIB Library Name Required

137

--

--

--

generic*Generic names may be used for tables, by adding an asterisk (*) after one ormore characters that are common to the group of table names. For example,'abc*' specifies all tables starting with the characters 'abc'.

*ALLSpecifies all tables.

Library (TOLIB) The name of the production library containing the selected source table thatcorresponds to the selected source table in the test library.This is a requiredparameter.

NameThe library name.

Result Relevant messages are produced to the job log. Examples DUPTGTTBL TARGET(SUBTST) TOTARGET(SUBPRD) TABLE(TSTPUB/V*)TOLIB(PRDPUB)Publisher metadata for all source tables in the TSTPUB test librarythat are selected to the test subscription SUBTST is copied to the productionsubscription SUBPRD. The name of the production library containing the selected source tables thatcorrespond to the tables in the test library is PRDPUB. Publisher metadata for all source tables starting with the letter V in the TSTPUB testlibrary that are selected to the test subscription SUBTST is copied to the productionsubscription SUBPRD. The name of the production library containing the selectedsource tables that correspond to the tables in the test library is PRDPUB.

138

-

IBM InfoSphere Change Data Capture, Version 6.1 Table-level operation commands In this section, you will learn about commands that:

DMSQL—Enable/disable SQL statements

139

---

--

IBM InfoSphere Change Data Capture, Version 6.1 DMSQL—Enable/disable SQL statements Use this command to enable the users with the TS System Administrator and TSAdministrator roles in Management Console to specify SQL statements whenconfiguring table-level operations. If enabled, these users can specify SQLstatements that control which target tables InfoSphere® CDC refreshes or truncated(cleared) on the target. If you have already specified SQL statements inManagement Console and this command is used to disable SQL statementsafterwards, SQL statements will not be executed. If enabled, these users can specify SQL statements that control which target tablesInfoSphere CDC refreshes or truncated (cleared) on the target. If you have alreadyspecified SQL statements in Management Console and this command is used todisable SQL statements afterwards, SQL statements will not be executed. This command can only be run from the QSECOFR user profile. Note: The use of SQL statements may constitute a security concern in your workingenvironment. Therefore, you should exercise caution when issuing this command toenable the specification of SQL statements in Management Console. Applies To—Target Parameters Table 1. Supported keywords

SQL statements status (ENBSQL) Indicates whether or not the specification of SQL statements in ManagementConsole is enabled or disabled.

*NOSpecifies that SQL statements cannot be entered in Management Console.This is the default setting.

*YESSpecifies that SQL statements can be entered in Management Console.

Keyword Description Choices NotesENBSQL SQL statements

status*NO, *YES Optional

140

--

--

IBM InfoSphere Change Data Capture, Version 6.1 CHGJRNDM—Change journal receivers Use this command to generate new journal receivers for a specified journal on thesource server. You can also use this command to delete processed and obsoletejournal receivers. A processed receiver is one where all of the journal entries in thereceiver have been completely applied to all associated subscribers. An obsoletereceiver is one that is no longer used by InfoSphere® CDC. You should schedulethis command to run daily, and if dealing with high data volumes, several timesdaily. This ensures that journal receivers do not grow too large and addunnecessary performance overhead. This command can only be applied to journalsthat are managed by InfoSphere CDC, such as the product default journal(DMCJRN). If a physical file was being journaled prior to InfoSphere CDCinstallation, the existing journal (as opposed to the default journal DMCJRN) is usedfor that file. When replicating data from a remote journal When InfoSphere CDC has been set up and installed to replicate from a remotejournal, you must issue this command from the source server where the remotejournal resides. If you decide to delete a journal receiver, then InfoSphere CDCdeletes both the local journal receivers on the Data Origin Server and the remotejournal receivers on the Source Server. See CHGJRNDM—Change remote journalreceivers. Note: Changing and deleting receivers could affect High Availability (HA) productsthat depend on them. Before you use these options, ensure that there are no otherdependencies on the journals the command will be applied to. Applies To—Source Parameters Table 1. Supported keywords

Journal name (JOURNAL) The name of the journal for which journal receivers are generatedThis is a requiredparameter. Qualifier 1: Journal name

NameSpecifies the name of the journal for which journal receivers are generated.

*ALLSpecifies all journals in the library that are used by InfoSphere CDC.

Keywords Description Choices NotesJOURNAL Journal name Qualified object

nameRequired

Qualifier 1: Journalname

Name, *ALL

Qualifier 2: Library Name CHGRCVChange receiver *YES, *NO Optional DLTRCV

142

-

--

--

---

--

--

--

-

This is the default setting.Qualifier 2: Library

NameThe name of the library where the journal resides.

Change receiver (CHGRCV) Indicates whether or not journal receivers are changed for the specified journals.

*NOIndicates that journal receivers are not changed for the specified journals. Youneed to change the journal receivers manually.

*YESIndicates that journal receivers are changed for the specified journals.This is the default setting.

Delete receivers (DLTRCV) Specifies whether or not you want to delete processed or obsolete journal receiversassociated with the journal.

*NOSpecifies that you do not want to delete processed or obsolete journal receiversassociated with the journal. These receivers remain until you delete or archivethem.

*YESSpecifies that you want to delete processed and obsolete receivers associatedwith the journals.

*DFTSpecifies that you want to delete processed and obsolete receivers associatedwith the InfoSphere CDC default journal. This setting applies only whenJOURNAL is set to the current InfoSphere CDC default journal, which isspecified in the CHGDMSVAL command.This is the default setting.

Result Relevant messages are produced to the job log. Examples CHGJRNDM JOURNAL(LIB1/*ALL)Journal receivers associated with all journals inlibrary LIB1 that are used by InfoSphere CDC are changed. Processed and obsoletejournal receivers for the InfoSphere CDC default journal are not deleted. The defaultsetting for the DLTRCV parameter is only applicable when the current defaultInfoSphere CDC journal is specified for JOURNAL. CHGJRNDM JOURNAL(LIB1/DMCJRN) CHGRCV(*YES) DLTRCV(*DFT)Journalreceivers associated with the InfoSphere CDC default journal DMCJRN in libraryLIB1 are changed. Processed and obsolete journal receivers for DMCJRN aredeleted. CHGJRNDM JOURNAL(LIB1/DMCJRN) CHGRCV(*NO) DLTRCV(*NO)Journalreceivers associated with the InfoSphere CDC default journal DMCJRN in libraryLIB1 are not changed. Processed and obsolete journal receivers for DMCJRN arenot deleted.

143

--

---

--

--

IBM InfoSphere Change Data Capture, Version 6.1 CHGJRNDM—Change remote journal receivers InfoSphere® CDC provides the CHGJRNDM command which lets you generatenew journal receivers for a journal on the source server or delete processed andobsolete journal receivers. In a data replication scenario where InfoSphere CDC has been installed andconfigured to replicate data from a remote journal, you can use the CHGJRNDMcommand to generate new or delete existing journal receivers when InfoSphereCDC no longer needs them. You must run this command on Source Server where the remote journal resides andwhere InfoSphere CDC has been installed as the source product. If you decide todelete a journal receiver, then InfoSphere CDC deletes both the local and remotejournal receivers. Note: Local journal receivers reside on your Data Origin Server and remote journalreceivers reside on your Source Server. Note:InfoSphere CDC must be installed on both systems. Applies To—Source Syntax Table 1. Supported keywords

Journal name (JOURNAL) The name of the journal to be changedThis is a required parameter. Qualifier 1: Journal name

NameSpecifies the name of the journal for which journal receivers are generated

*ALLSpecifies all journals in the library that are used by InfoSphere CDC.This is the default setting.

Qualifier 2: Library Name

The name of the library where the journal resides Change receiver (CHGRCV) Indicates whether or not journal receivers are changed for the specified journals.

*NOIndicates that journal receivers are not changed for the specified journals. Youneed to change the journal receivers manually.

Keywords Description Choices NotesJOURNAL Journal name Qualified object

nameRequired

Qualifier 1: Journalname

Name, *ALL

Qualifier 2: Library Name CHGRCVChange receiver *YES, *NO Optional DLTRCV

145

---

--

--

--

-

*YESIndicates that journal receivers are changed for the specified journals.This is the default setting.

Delete receivers (DLTRCV) Specifies whether or not you want to delete processed or obsolete journal receiversassociated with the journal.

*NOSpecifies that you do not want to delete processed or obsolete journal receiversassociated with the journal. These receivers remain until you delete or archivethem.

*YESSpecifies that you want to delete processed and obsolete receivers associatedwith the journals.

*DFTSpecifies that you want to delete processed and obsolete receivers associatedwith the InfoSphere CDC default journal. This setting applies only whenJOURNAL is set to the current InfoSphere CDC default journal, which isspecified in the CHGDMSVAL command.This is the default setting.

146

--

---

--

IBM InfoSphere Change Data Capture, Version 6.1 DMVWBKMK—Retrieve bookmark information Use this command to retrieve InfoSphere® CDC bookmark information from theJRN_STATUS user space in the InfoSphere CDC product library. In somesituations, you may need to view precisely the progress of InfoSphere CDC scrapingand applying activities for a subscription and retrieve exact information about thejournal or log position that is being processed on the target. Also, in situations offailure, you need to know exactly what was the last transaction applied for thesubscription so that you can set a journal or log position on the source, if need be. Inthe subscription environment, the last processed journal or log position is indicatedby a set of values that identifies a position or entry in the publication journal. This setof values is called a bookmark. This command allows you to view bookmarksinformation for a specified source identifier (or all). It can be invoked on a target andcan display the results in two different formats. In addition, instead of displaying theresults to standard output, you can direct them to a file for archiving purposes, orfuture viewing. Detailed information about the retrieved bookmarks is listed in theResults section below. Applies To—Target Parameters Table 1. Supported keywords

Library name (PRODLIB) The name of the product library where InfoSphere CDC is installed or the followingvalue:

NameThe name of the library.

*CURLIBSpecifies the current library.This is the default setting.

Source identifier (PUBID) The source identifier for which bookmarks are displayed.

NameSpecifies the source identifier for which bookmarks are displayed, as defined inManagement Console

Keyword Description Choices NotesPRODLIB Library name *CURLIB, Name OptionalPUBID Source identifier Name, *ALL RequiredOUTPUT Output location *DSP, *OUTFILE OptionalOUTFILE Output file Qualified object

nameOptional

Qualifier 1: Filename

Name

Qualifier 2: Library *CURLIB, Name MBROPT

147

--

--

--

-

---

--

--

--

--

-

--

--

*ALLSpecifies all defined source identifiers.

Output location (OUTPUT) Specifies where the output of this command is directed.

*DSPSpecifies that the output is directed to the job log if this command is issued fromthe command line, or sent to a spooled file if submitted as part of a batch job.This is the default setting.

*OUTFILESpecifies that the output of this command is written into a database file.

Output file (OUTFILE) Specify the name of the database file where the results of this command are sent.The name of the library where the database file resides must precede the databasefile specification. Qualifier 1: File name

NameThe name of the database file.You can specify either a new or an existing file.

Qualifier 2: Library Name

The name of the library where the database file resides.*CURLIB

Specifies the current library.This parameter applies only if you specified *OUTFILE for the OUTPUT parameter. Clear output file (MBROPT) Specify if the database file specified for the OUTFILE parameter is cleared beforenew records are added to the database file.

*REPLACESpecifies that the database file is cleared before new records are added to thedatabase file.This is the default setting.

*ADDSpecifies that the new records are appended to the existing database file.

This parameter applies only if you specified *OUTFILE for the OUTPUT parameter. Result Relevant messages are directed to the job log or to a database file. Messages in thejob log contain first and second level text. First-level text indicates the subscriptionID name. To view specific bookmark information, you need to display second levelmessage text. Second level text contains the following items of information:

Publisher IDThe subscription ID for which bookmark information is being retrieved.

EntryThe name of the journal or log, and where it is located.

148

--

--

--

--

--

Last Committed PositionThe position of the last journal or log entry to be applied to the target table thatis confirmed. Confirmed indicates either that the commitment control groupwhere the journal or log entry belongs has been committed, or that the journalor log entry was processed outside commitment control.

Earliest Open PositionThe position marking the beginning of the oldest commitment controltransaction that is still uncommitted or being rolled back.

Last Applied PositionThe position of the last journal or log entry applied to the target table. The LastCommitted Position, Earliest Open Position, and Last Applied Position settingsare the same when the commitment control level is set to *NONE.

Apply TimeThe timestamp of the last journal or log entry applied to the target table.

Log TimeThe timestamp in the publication journal or log of the last journal or log entryapplied to the target table. 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 theInfoSphere CDC installation in the current library. Bookmark information associatedwith source identifier PUB1 is directed to the job log or a spooled file. DMVWBKMK PRODLIB(D_MIRROR) PUBID(PUB1) OUTPUT(*DSP)Bookmarkinformation that is retrieved applies to the InfoSphere CDC installation in the productlibrary D_MIRROR. Bookmark information associated with source identifier PUB1 isdirected to the job log or a spooled file. DMVWBKMK PRODLIB(D_MIRROR) PUBID(*ALL) OUTPUT(*OUTFILE)OUTFILE(LIB1/FILE1) MBROPT(*ADD)Bookmark information that is retrievedapplies to the InfoSphere CDC installation in the product library D_MIRROR.Bookmark information associated with all source identifiers is added to the databasefile FILE1 located in library LIB1. Related reference: CHGDMTVAL - Set target system parameters

149

--

--

IBM InfoSphere Change Data Capture, Version 6.1 RTVDMJENT—Retrieve InfoSphere CDC journalentry Use this command to determine whether a user-specified journal receiver is beingused by InfoSphere® CDC. Based on a specified journal, this command returns thesequence number and journal receiver name of the last confirmed journal entryprocessed by InfoSphere CDC. Because this command uses return parameters, you should issue this commandfrom a CL program. Use the results provided by this command to determine if auser-specified journal receiver is being used by InfoSphere CDC and thereforeunavailable for deletion. When replicating data from a remote journal When InfoSphere CDC has been set up and installed to replicate from a remotejournal, you must issue this command from the source server where the remotejournal resides. InfoSphere CDC returns the sequence number and journal receiversof the remote journal. Applies To—Source Parameters Table 1. Supported keywords

Journal name (JOURNAL) The name of the InfoSphere CDC journalThis is a required parameter. Qualifier 1: Journal name

NameSpecifies the name of the journal.

Qualifier 2: Library Name

The name of the library where the journal resides. Result JRENTCONF The last confirmed (replicated) journal entry sequence number. JRNRCVNME The journal receiver name of the last confirmed entry. JRNRCVLIB The library where the journal receiver is located. Examples Examples

Keyword Description Choices NotesJOURNAL Journal name Qualified object

nameRequired

Qualifier 1: Journalname

Name

150

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

151

IBM InfoSphere Change Data Capture, Version 6.1 RTVDMJENT—Retrieve InfoSphere CDC remotejournal entry InfoSphere® CDC provides the RTVDMJENT command which lets you determinewhether a user-specified journal receiver is being used by InfoSphere CDC. Basedon a specified journal, this command returns the sequence number and journalreceiver name of the last confirmed journal entry processed by InfoSphere CDC. In a data replication scenario where InfoSphere CDC has been installed andconfigured to replicate data from a remote journal, you can use the RTVDMJENTcommand to retrieve the sequence number and journal receiver name of the lastconfirmed journal entry. You must run this command on Source Server where the remote journal resides andwhere InfoSphere CDC has been installed as the source product. InfoSphere CDCreturns the sequence number and journal receivers of the remote journal. Note: Local journal receivers reside on your Data Origin Server and remote journalreceivers reside on your Source Server.

Related reference: RTVDMJENT—Retrieve InfoSphere CDC journal entry

Parameter DescriptionCL var for JRNENTRY This parameter returns the last confirmed

(replicated) journal entry sequencenumber

CL var for JRN-RCVNME This parameter returns the journalreceiver name of the last confirmedentry.

CL var for JRNRCVLIB This parameter returns the library wherethe journal receiver is located.

152

--

IBM InfoSphere Change Data Capture, Version 6.1 VFYTSJRN—Verify journal Use this command to verify that the required InfoSphere® CDC journal exists for alltables selected for replication to the named subscription. If the journal cannot befound, this command ensures that the proper journal is created. All tables that havea replication method of refresh are excluded during this verification process. When replicating data from a remote journal When InfoSphere CDC has been set up and installed to replicate from a remotejournal, you must issue this command from the source server where the remotejournal resides. InfoSphere CDC verifies that the remote journal exists for all tablesselected for replication in a named subscription. Applies To—Source Parameters Table 1. Supported keywords

Subscription name (TARGET) Specifies the name of the subscription, as defined in Management Console, forwhich journaling is verified.This is a required parameter.

NameSpecify the name of a subscription. This must be the same name defined inManagement Console.

Result Relevant messages are produced to the job log. Examples VFYTSJRN TARGET(SUB1)Verifies journaling for all source table selected tosubscription SUB1.

Keyword Description Choices NotesTARGET Subscription name Name Required

153

--

IBM InfoSphere Change Data Capture, Version 6.1 VFYTSJRN—Verify remote journal InfoSphere® CDC provides the VFYTSJRN command which lets you verify if therequired journal exists for all tables you have selected for replication to the namedsubscription. In a data replication scenario where InfoSphere CDC has been installed andconfigured to replicate data from a remote journal, you can use the VFYTSJRNcommand to verify if the remote journal exists on the Source Server. Note: Local journal receivers reside on your Data Origin Server and remote journalreceivers reside on your Source Server. Applies To—Source Parameters Table 1. Supported keywords

Subscription name (TARGET) Specifies the name of the subscription, as defined in Management Console, forwhich journaling is verified.This is a required parameter.

NameSpecify the name of a subscription. This must be the same name defined inManagement Console.

Related concepts: About installing InfoSphere CDC for DB2 for i on the Data Origin Server About installing InfoSphere CDC for DB2 for i on the Source Server Related reference: VFYTSJRN—Verify journal

Keyword Description Choices NotesTARGET Subscription name Name Required

154

----

IBM InfoSphere Change Data Capture, Version 6.1 Communication commands In this section, you will learn about commands that:

STRDMTCP—Start InfoSphere CDC TCP/IP communications STRDMUDP—Start UDP Listener ENDDMTCP—End InfoSphere CDC TCP/IP communications ENDDMUDP—End UDP Listener

155

---

IBM InfoSphere Change Data Capture, Version 6.1 STRDMTCP—Start InfoSphere CDC TCP/IPcommunications Use this command when you want InfoSphere® CDC to start the TCPLISTENlistener job. TCPLISTEN is the job running on the target and waits for incomingcommunication requests. This must be started before communications can be madewith the target using TCP/IP. Even though multiple TCPLISTEN listener jobs can bestarted on the same server, only one TCPLISTEN listener job can be running at anypoint in time within the same subsystem. You can issue this command once in eachlibrary containing a job description that refers to a unique subsystem. To runTCPLISTEN listener jobs concurrently on the same server, separate installations ofInfoSphere CDC 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 tocreate each agent manually in Access Manager. This command can automaticallystart the UDPLISTEN listener job, which is used for autodiscovery. You can issue the STRDMUDP command to start the UDPLISTEN listener job. Applies To—Target Parameters Table 1. Supported keywords

Service table entry name (SERVICE) The TCP/IP service table entry name that is used by InfoSphere CDC for TCP/IPcommunications. This service table entry must not be used by another job. TheTCPLISTEN listener job listens on the port that is associated with this entry in theTCP/IP service table. You must allocate an entry and unique port number in theTCP/IP service table before invoking this command. The service name is case-sensitive and must be enclosed in single quotation marks.

NameSpecifies the TCP/IP service table entry name.The default setting is ‘dmirror'.

Job description name (JOBD) The name of the job description that you want to associate with both theTCPLISTEN and UDPLISTEN listener jobs. The default setting is DMCJOBD.

Keyword Description Choices NotesSERVICE Service table entry

name‘dmirror', Name Optional

JOBD Job descriptionname

*LIBL, *CURLIB Optional

HOST Host name ' ', Name OptionalAUTODISCOV Auto-discovery

status*NO, *YES Optional

ACPORT Port number 10101, Number Optional

156

--

--

-

---

---

---

-

---

You also need to specify the library where the job description resides. The librarywhere the job description resides must precede the job description specification. Specify the name of a library or one of the following values:

*LIBLSpecifies the set of libraries in your library list. The libraries are searched inorder for the first occurrence of the specified job description.This is the default setting.

*CURLIBSpecifies the current library.

Host name (HOST) The host name or full IP address of the server where InfoSphere CDC is running.

NameSpecifies the host name or full IP address.The default setting is ‘ ‘ (a single blank character which indicates the localserver)

Auto-discovery status (AUTODISCOV) Indicates if auto-discovery is enabled or disabled. Auto-discovery is a way forAccess Server to recognize, upon startup, all available replication agents on thelocal network so that you do not need to create each agent manually in AccessManager.

*NOSpecifies that auto-discovery is disabled.This is the default setting.

*YESSpecifies that auto-discovery is enabled.If you specify *YES, then a UDPLISTEN listener job with the same servicename as the TCPLISTEN listener job is started. In the TCP/IP service table,you can distinguish between them by examining the protocol type setting (UDPversus TCP).If you specify *YES, you then need to specify the ACPORT parameter.

Port number (ACPORT) The port number on an Access Server that is used to receive broadcasts from theUDPLISTEN listener job.This parameter is applicable only when the AUTODISCOVparameter is set to *YES. If you change the Access Server port numbers, you needto change this parameter setting as well.

NumberSpecifies the port number. The default setting is 10101.

Result Messages are placed in the Event Log. Examples STRDMTCPThe TCP/IP service table entry for InfoSphere CDC is dmirror. The jobdescription for both the TCPLISTEN and UDPLISTEN listener jobs is the firstoccurrence of the InfoSphere CDC job description (DMCJOBD) in the library list.

157

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 forInfoSphere CDC is tsmir. The job description for both the TCPLISTEN andUDPLISTEN listener jobs is JOBD1 in library SUBLIB. This command starts both theTCPLISTEN and UDPLISTEN listener jobs on the local server. The port number onthe Access Server that is used to receive UDPLISTEN broadcasts is 12121. STRDMTCP JOBD(*CURLIB/JOBD1) HOST(SYS1) AUTODISCOV(*NO)TheTCP/IP service table entry for InfoSphere CDC is dmirror. The job description forboth the TCPLISTEN and UDPLISTEN listener jobs is JOBD1, which is located inthe current library. This command starts the TCPLISTEN listener job on serverSYS1. Related reference: STRDMUDP—Start UDP Listener

158

---

-

---

---

IBM InfoSphere Change Data Capture, Version 6.1 STRDMUDP—Start UDP Listener Use this command to start the UDP listener job (UDPLISTEN). The UDPLISTENlistener job supports auto-discovery. Auto-discovery is a way for Access Server torecognize, upon startup, all available replication agents on the local network so thatyou do not need to create each agent manually in Access Manager. TheUDPLISTEN listener job responds to communications from Access Server. You can start the UDPLISTEN listener job together with the TCPLISTEN listener jobusing the STRDMTCP command. Applies To—Source and Target Parameters Table 1. Supported keywords

Service name (UDPSERVICE) The name of the service that was defined in the TCP/IP service table for theUDPLISTEN listener job. The default setting is ‘dmirror'.

NameSpecifies the service name.This parameter is case-sensitive and must be enclosed in single quotationmarks. The default setting is ‘dmirror'.

Service name (TCPSERVICE) The name of the service that was defined in the TCP/IP service table for theTCPLISTEN listener job.

NameSpecifies the service name.This parameter is case-sensitive and must be enclosed in single quotationmarks.

Port number (ACPORT) The port number on an Access Server that is used to receive broadcasts from theUDPLISTEN listener job. This parameter is applicable only when the AUTODISCOVparameter in a STRDMTCP command invocation is set to *YES.

NumberSpecifies the port number. The default setting is 10101.

Job description (JOBD)

Keyword Description Choices NotesUDPSERVICE Service name ‘dmirror', Name OptionalTCPSERVICE Service name Name OptionalACPORT Port number 10101, Number OptionalJOBD Job description *LIBL, *CURLIB Optional

159

--

--

-

The name of the job description that you want to associate with the UDPLISTENlistener job and all jobs started by the UDPLISTEN listener job. The job descriptionthat you specify is used only if you are using this command to start the UDPLISTENlistener job. If you use the STRDMTCP command to start the UDPLISTEN listenerjob, then the value that you specified for the JOBD parameter in the STRDMTCPcommand is used instead.The default setting is DMCJOBD Job Description Library The name of the library where the job description is locatedmust precede the job description specification. Specify the name of a library or one of the following values:

*LIBLSpecifies the set of libraries in your library list. The libraries are searched inorder for the first occurrence of the specified job description.This is the default setting.

*CURLIBSpecifies the current library.

Result Messages are placed in the Event Log. Examples STRDMUDPThe TCP/IP service table entry for the TCPLISTEN and UDPLISTENlistener jobs is dmirror. The port number on the Access Server that is used toreceive UDPLISTEN broadcasts is 10101. The job description for the UDPLISTENlistener job is the first occurrence of the InfoSphere® CDC job description(DMCJOBD) in the library list. STRDMUDP ACPORT(45454) JOBD(*CURLIB/JOBD1)The TCP/IP service tableentry for the TCPLISTEN and UDPLISTEN listener jobs is dmirror. The port numberon the Access Server that is used to receive UDPLISTEN broadcasts is 45454. Thejob description for the UDPLISTEN listener job is JOBD1, which is located in thecurrent library. STRDMUDP UDPSERVICE(‘tsmir') TCPSERVICE('srvc1') ACPORT(10101)JOBD(SUBLIB/JOBD1)The TCP/IP service table entry for the UDPLISTEN listenerjob is tsmir. The TCP/IP service table entry for the TCPLISTEN listener job is srvc1.The port number on the Access Server that is used to receive UDPLISTENbroadcasts is 10101. The job description for the UDPLISTEN listener job is JOBD1in library SUBLIB. Related reference: STRDMTCP—Start InfoSphere CDC TCP/IP communications

160

--

--

-

---

IBM InfoSphere Change Data Capture, Version 6.1 ENDDMTCP—End InfoSphere CDC TCP/IPcommunications Use this command to end a specific InfoSphere® CDC listener job. You must issuethis command from the same library that the Start InfoSphere CDC (STRDMTCP)was issued to start the InfoSphere CDC listener (TCPLISTEN) job. The InfoSphereCDC listener serves all the incoming network requests from other servers runningInfoSphere CDC and from client workstations running Management Consoleapplications. Applies To—Target Parameters Table 1. Supported keywords

End type (ENDTYP) Indicates how you want InfoSphere CDC to end TCP/IP communications.

*CNTRLDSpecifies that InfoSphere CDC end the TCPLISTEN listener job after all currentrequests have been processed. This is the recommended setting for thisparameter.This is the default setting.

*IMMEDSpecifies that InfoSphere CDC end that the TCPLISTEN listener jobimmediately, regardless of whether current requests have been completed ornot.

Service table entry name (SERVICE) The name of the TCP/IP service table entry that InfoSphere CDC uses for theTCPLISTEN listener job. InfoSphere CDC stops the TCPLISTEN listener job on theport reserved by the TCP/IP service table entry. The service name is case-sensitiveand must be enclosed in single quotation marks.

NameSpecifies the TCP/IP service table entry name.The default setting is ‘dmirror'.

Auto-discovery status (AUTODISCOV) Indicates if InfoSphere CDC ends or continues with the UDPLISTEN listener job

Parameter Description Choices NotesENDTYP End type *CNTRLD, *IMMED RequiredSERVICE Service table entry

name‘dmirror', Name Required

AUTODISCOV Auto-discoverystatus

*NO, *YES Optional

JOBD Job descriptionname

*LIBL, *CURLIB Optional

161

--

--

-

--

--

-

which terminates autodiscovery. Auto-discovery is a way for Access Server torecognize, upon startup, all available replication agents on the local network so thatyou do not need to create each agent manually in Access Manager.

*NOSpecifies that InfoSphere CDC continues the UDPLISTEN listener job andauto-discovery.This is the default setting.

*YESSpecifies that InfoSphere CDC ends the UDPLISTEN listener job and disablesauto-discovery.

Job description name (JOBD) The name of the job description that you want InfoSphere CDC to associate withboth the TCPLISTEN and UDPLISTEN listener jobs, and all jobs started byTCPLISTEN. By default, InfoSphere CDC uses the job description DMCJOBD. Youmust specify the name of the library before the name of the job description. Specifythe library name or one of the following values:

*CURLIBSpecifies the current library.

*LIBLSpecifies the set of libraries in your library list. InfoSphere CDC searcheslibraries in order of first occurrence of the specified job description.This is the default setting.

Result Messages are placed in the Event Log. Examples ENDDMTCPInfoSphere CDC stops the TCPLISTEN listener job in a controlledmanner 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)InfoSphere CDC stops TCPLISTEN listener job in a controlledmanner. This job was using tsmir as the TCP/IP service table entry. InfoSphereCDC also disables auto-discovery by stopping the UDPLISTEN listener job. Bothlistener jobs are using the job description JOB1 in the library LIB1. ENDDMTCP ENDTYP(*IMMED) SERVICE(‘tsmir') AUTODISCOV(*NO)JOBD(*CURLIB/JOB1)InfoSphere CDC stops TCPLISTEN listener job immediately.This job was using tsmir as the TCP/IP service table entry. InfoSphere CDCcontinues to use auto-discovery by continuing with the UDPLISTEN listener job.Both listener jobs are using the job description JOB1 in the current library.

162

--

--

-

---

-

IBM InfoSphere Change Data Capture, Version 6.1 ENDDMUDP—End UDP Listener Use this command to indicate how you want InfoSphere® CDC to end theUDPLISTEN listener job to terminate auto-discovery. You can also terminate auto-discovery by using the ENDDMTCP command. This command also ends theUDPLISTEN listener job. Applies To—Source and Target Parameters Table 1. Supported keywords

End type (ENDTYP) Indicates how you want InfoSphere CDC to end the UDPLISTEN job.

*CNTRLDSpecifies that InfoSphere CDC terminate the UDP listener job after all currentrequests between Access Server and the UDPLISTEN listener job areprocessed. This is the recommended setting for this parameter.This is the default setting.

*IMMEDSpecifies that InfoSphere CDC end the UDP listener job immediately,regardless of whether or not current requests between Access Server and theUDPLISTEN listener job have been completed.

Service table entry name (SERVICE) The name of the TCP/IP service table entry name that InfoSphere CDC uses for theUDPLISTEN listener job. InfoSphere CDC stops the UDPLISTEN listener job on theport reserved by this TCP/IP service table entry.

NameSpecifies the TCP/IP service table entry name.The service name is case-sensitive and must be enclosed in single quotationmarks.The default setting is ‘dmirror'.

Result Messages are placed in the Event Log. Examples ENDDMUDPInfoSphere CDC stops the UDPLISTEN listener in a controlled mannerand uses the default name for the the TCP/IP service table entry (dmirror). ENDDMUDP ENDTYP(*IMMED) SERVICE(‘tsmir')InfoSphere CDC stops theUDPLISTEN listener job immediately and uses tsmir as the TCP/IP service tableentry.

Keyword Description Choices NotesENDTYP End type *CNTRLD, *IMMED RequiredSERVICE Service table entry

name‘dmirror', Name Optional

163

Related reference: ENDDMTCP—End InfoSphere CDC TCP/IP communications

164

-

IBM InfoSphere Change Data Capture, Version 6.1 End and shut down InfoSphere® CDC commands In this section, you will learn about the following command:

DMENDPROC—End InfoSphere CDC jobs

165

-

-

--

---

--

--

IBM InfoSphere Change Data Capture, Version 6.1 DMENDPROC—End InfoSphere CDC jobs Use this command to end both active and suspended InfoSphere® CDC jobsassociated with an installation on a target and when you need to end obsolete jobsthat are still running due to abnormal or unusual circumstances. Using this command, you can:

End InfoSphere CDC jobs in the product library that support replication from anidentified publisher.End all InfoSphere CDC jobs in the product library.

Applies To—Target Parameters Table 1. Supported keywords

Product library name (PRODLIB) Specifies the name of the product library where InfoSphere CDC is installed.

NameSpecifies the name of the library.

*CURLIBSpecifies the current library.This is the default setting.

This command does not affect InfoSphere CDC jobs associated with other productinstallations on the same server that are located in different product libraries. Source identifier (PUBID) Specifies the source identifier, as defined in Management Console, which has itsInfoSphere CDC jobs ended by this command.

NameSpecifies the source identifier.

*ALLSpecifies all defined source identifiers.

Result Relevant messages are produced to the job log. Examples DMENDPROC PUBID(PUB1)Ends InfoSphere CDC jobs in the current library thatsupport replication from the publisher identified by PUB1. DMENDPROC PRODLIB(D_MIRROR) PUBID(*ALL)Ends all InfoSphere CDC jobsin the product library D_MIRROR. DMENDPROC PRODLIB(*CURLIB) PUBID(*ALL)Ends all InfoSphere CDC jobs inthe current product library.

Parameter Description Choices NotesPRODLIB Product library

name*CURLIB, Name Optional

PUBID Source identifier Name, *ALL Required

166

167

---

--

-

IBM InfoSphere Change Data Capture, Version 6.1 Other commands In this section, you will learn about commands that:

ADDS36TBL—Add S/36 flat file table DMCMVFY—Run communications verifier INSCDCMNT - Installing InfoSphere CDC for DB2 for i Maintenance Use this command to install an Interim Fix or Fix Pack to a given product install ofInfoSphere® CDC for DB2® for i.RTVDMVSTS—Retrieve InfoSphere CDC installation information CHGDMSVAL - Set source system parameters Use this command to set publisher system parameters using the command line.CHGDMTVAL - Set target system parameters Use this command to set subscriber system parameters using the command line.

168

1.2.

--

--

IBM InfoSphere Change Data Capture, Version 6.1 ADDS36TBL—Add S/36 flat file table Use this command to add non-externally defined tables to the Management Consolecatalog. Non-externally defined tables, such as System 36 (S/36) flat files, do nothave an external definition that can be accessed directly. There are two steps to adding S/36 flat files to the Management Console catalog.

Issuing this command.Defining the columns of the table that you are adding.

You can define the columns of the table that you are adding through the DefineColumns for Non-Externally Defined Table screen that is automatically displayedafter 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/36flat file including the sequence, data type, start position, and length of each column.InfoSphere® CDC does not perform any error checking to compare the entered filefield format with the actual data in the S/36 flat file. After defining the columns, theS/36 flat file is then added to the Management Console catalog. At this point, youcannot modify the field structure of the catalog table, for example, by invoking theManagement Console re-add function. If you need to re-define the file format afterthe table has been added to the Management Console catalog, you must delete thetable from the catalog, and then manually re-add the S/36 flat file back to theManagement Console catalog using this command. You cannot use theManagement Console re-add function to re-define the table structure. Applies To—Source Parameters Table 1. Supported keywords

Table name (TBLNAME) The full name of the S/36 flat file table to be added.

NameSpecifies the table name.

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

NameSpecifies the library name.

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

Keyword Description Choices NotesTBLNAME Table name Name RequiredLIBRARY Library Name Required

169

and the table is added to the Management Console catalog. Examples ADDS36TBL TBLNAME(S36TBL1) LIBRARY(LIB36_1)Adds table S36TBL1,located in library LIB36_1, to the Management Console catalog.

170

--

--

--

--

--

IBM InfoSphere Change Data Capture, Version 6.1 DMCMVFY—Run communications verifier Use this command to test TCP/IP communications between local and remoteservers. Before replicating data, communications between the publisher and targetmust be operational. This command allows you to verify TCP/IP communicationsbefore starting InfoSphere® CDC data replication. This command generates messages indicating whether the communications testwas successful or not. When unsuccessful, these messages identify the cause ofthe problems. Messages are placed in the DMVFYCMN message queue in thecurrent library. You can also display messages to standard output or you canredirect them to a file for future viewing. Before issuing this command, you need tomake sure that a InfoSphere CDC listener is running on the remote server withwhich you want to perform the communications tests. Each communications test consists of a number of steps. You can choose to displayinformation for each step. The steps are:

OpenOpen the communication channel.

ConnectAttempt to connect to the communication channel.

Send_controlSend control information across the communication channel.

Send_dataSend actual data across the communication channel.

CloseClose the communication channel.

Applies To—Source and Target Parameters Table 1. Supported keywords

Keyword Description Choices NotesRMTNME Remote server

nameName Required

RMTPRT Remote server portnumber

2223, Number Optional

TSTTYP Test type *PACKETS,*TIMED

Optional

NBRPKT Number of packets 5, Number OptionalTIMLMT Test duration time 60, Time OptionalVERBOSE Verbose format *NONE, *LOW,

*MEDIUM, *HIGHOptional

LCLNME Local server name *DFT, Name OptionalLCLPRT Local port number 0, Number OptionalPKTLEN Packet length 512, Length OptionalSNDDLY Send delay 0, Time OptionalRCVDLY Receive delay 0, Time Optional

171

--

---

--

--

-

-----

-----

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

NameSpecifies the host name or full IP address.

Remote server port number (RMTPRT) The port number on the remote server that is used to perform the communicationstest. This port number was allocated when you installed InfoSphere CDC.

NumberSpecifies the port number.The default setting is 2223.

Test type (TSTTYP) Specifies the type of communications test to run.

*PACKETSRuns the test by sending the number of packets as defined for the NBRPKTparameter.This is the default setting.

*TIMEDRuns the test for approximately the time specified for the TIMLMT parameter.This allows you to test the stability of the connection for a specified amount oftime.

Number of packets (NBRPKT) The number of packets that are sent to the remote server. This parameter is validonly when the TSTTYP parameter is set to *PACKETS.

NumberSpecifies the number of packets.Minimum Setting: 1 packetMaximum Setting: 99999 packetsDefault Setting: 5 packets

Test duration time (TIMLMT) Specifies the duration, in seconds, of the test. This parameter is valid only when theTSTTYP parameter is set to *TIMED. The value specified for the NBRPKTparameter is ignored. When the VERBOSE parameter is set to either *MEDIUM or*HIGH, a message is displayed for every packet that is sent. This can add to theamount of time the test requires to complete, and therefore, may cause the time ofthe test to exceed the time specified.

TimeSpecifies the duration, in seconds, of the test.Minimum Setting: 0 seconds. The test runs continuously.Maximum Setting: 999999 secondsDefault Setting: 60 seconds

Verbose format (VERBOSE)

172

--

--

--

-

--

--

--

-

---

-----

The amount of information that is displayed for the test.*NONE

Specifies that no messages are displayed during the test. A return code isgenerated after the test has completed.This is the default setting.

*LOWDisplays the return code and the amount of time each step took to complete.

*MEDIUMDisplays an asterisk (‘*') for every packet successfully sent. If a packet cannotbe sent, the test ends and a return code is displayed.

*HIGHDisplays a message for every packet that is successfully sent. The messageidentifiers the return code for every packet.

For your initial communications test, specify *HIGH to ensure the communicationslink is conveying each packet and to determine the amount of information in adetailed report. You can then reduce the amount of information generated forsubsequent tests by specifying *LOW or *MEDIUM. If you have specified a value forthe TIMLMT parameter, then this parameter should be be set to either *NONE or*LOW to make sure that the value specified for the TIMLMT parameter is respected. Local server name (LCLNME) The local server is the server where this command has been issued.

NameSpecifies the host name or full IP address of the local server in thecommunications test.

*DFTSpecifies the host name or full IP address of the server where this command isissued. This is the default setting for this parameter.This is the default setting.

Another physical server cannot be designated as the local server by identifying itshost name or full IP address. Therefore, this parameter must be set to the hostname or full IP address of the server where this command is issued, or *DFT. Local port number (LCLPRT) The port number on the local server that is used to perform the communicationstest. This port number was allocated when you installed InfoSphere CDC.

NumberSpecifies the port numberDefault Setting: 0. This allows the local server to use any available port number.

Packet length (PKTLEN) The length, in bytes, of each test packet that is sent to the remote server.

LengthSpecifies the length, in bytes, of each test packet.Minimum Setting: 100 bytesMaximum Setting: 63500 bytesDefault Setting: 512 bytes

173

---

--

---

--

--

Send delay (SNDDLY) The time interval, in milliseconds, to wait before sending more test packets to theremote server.

TimeSpecifies the time interval.Minimum Setting: 0 milliseconds. This indicates that there is no delay betweenconsecutive packets.Maximum Setting: 999 millisecondsDefault Setting: 0 milliseconds. This indicates that there is no delay betweenconsecutive packets.

Receive delay (RCVDLY) The time interval, in milliseconds, to wait for a confirmation to be received from theremote server. This value should consider communication bandwidth and utilization.

TimeSpecifies the time interval.Minimum Setting: 0 milliseconds. This indicates that there is no delay betweenconsecutive confirmations.Maximum Setting: 999 millisecondsDefault Setting: 0 milliseconds. This indicates that there is no delay betweenconsecutive confirmations.

Result 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.

Examples DMCMVFY RMTNME(SYS1)Verifies communications with remote server SYS1 bysending 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 byconducting 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 aresent from the local server on port number 5151. The length of each packet is 2,000bytes, and there is a 900 second delay between consecutive packet deliveries andconfirmations. Note: This command has replaced the DMVFYTCP command. For informationabout the DMVFYTCP command, contact your IBM® representative.

174

175

--

---

1.2.

IBM InfoSphere Change Data Capture, Version 6.1 INSCDCMNT - Installing InfoSphere CDC for DB2 fori Maintenance Use this command to install an Interim Fix or Fix Pack to a given product install ofInfoSphere® CDC for DB2® for i. The product library must already contain a existing product installation and all jobsmust have ended. See Updating InfoSphere CDC for DB2 for i to version 6.1 FixPack 2 for details on how this command is used when applying maintenance. The current library in which INSCDCMNT is run needs to contain the maintenanceinstallation objects. It is typically restored into a working library along with the actualmaintenance. The utility needs to be run with that working library set as *CURLIB. Applies To—Source and Target Parameters Table 1. Supported keywords

Product library name (PRDLIB) The name of the library containing the installation of InfoSphere CDC for DB2 for i

NameSpecifies the name of the library.

*CURLIBSpecifies the current library.This is the default setting.

Result On success, the product library specified in PRDLIB is updated with the InfoSphereCDC for DB2 for i Interim Fix or Fix Pack contained in *CURLIB. If a failure occurs,it will generate escape message DMI3006. The cause of the failure will be listed inthe job log. Usage Notes

This command cannot be used to revert/downgrade to a lower maintenance level.This command can be used to reapply maintenance to an InfoSphere CDC forDB2 for i installation.

Examples INSCDCMNT PRDLIB(MYPRDLIB)Installs the maintenance (Fix Pack or an InterimFix) to a library named MYPRDLIB.

Keyword Description Choices NotesPRDLIB Product library

name*CURLIB, Name, Required

176

177

--

--

--

-

--

IBM InfoSphere Change Data Capture, Version 6.1 RTVDMVSTS—Retrieve InfoSphere CDC installationinformation Use this command to determine whether InfoSphere® CDC has been installed. Ifinstalled, this command also returns the version installed, and the installation libraryname. The command searches all system libraries for the first occurrence of theInfoSphere CDC product data area D_MIRROR. Three variables are returnedindicating whether InfoSphere CDC has been installed, the installed product version,and the name of the installation library. Applies To—Source and Target Parameters None Result

STATUS*YES

InfoSphere CDC is installed*NO

InfoSphere CDC is not installedVERSION

Returns a InfoSphere CDC product version. For example, V11R3M3 where V =Version, R = Release, and M = Modification.

LIBRARYReturns the name of the library where InfoSphere CDC is installed.

Examples RTVDMVSTSIndicates whether or not InfoSphere CDC has been installed on theserver where this command is issued. Retrieves the InfoSphere CDC version,release, modification number, and library. This command uses return variables andtherefore should be executed from a CL program.

178

IBM InfoSphere Change Data Capture, Version 6.1 CHGDMSVAL - Set source system parameters Use this command to set publisher system parameters using the command line. System parameters can also be set in Management Console. It is recommendedthat you modify the system parameter settings in Management Console. For moreinformation about working with system parameters, see System parameters forInfoSphere® CDC for DB2® for i Applies To—Source Parameters Table 1. Supported keywords

Keyword Description Choices NotesJOURNAL Journal name Qualified object

nameOptional

Qualifier 1: Journalname

*SAME, Name

Qualifier 2: Library *LIBL, Name,*CURLIB, *SAME

NOTIFYQ

Message queuename

Qualified objectname

Optional

Qualifier 1:Message queuename

*SAME, Name Qualifier 2: Library

*LIBL, Name,*CURLIB, *SAME

NOTIFYCNT Error count

*SAME, Number Optional RESTORE Refresh method*SAME, *DELAY,*IMMED

Optional AUTCDE Authorization code

*SAME, Code Optional UPDCOLUMN Critical columnstatus

*SAME, *NO, *YES Optional CASCADE Cascadingreplication status

*SAME, *NO, *YES Optional REFWHLACT Refresh WhileActive

*SAME, *NO, *YES Optional USDEFJRN User-defined journalentries

*SAME, *NO, *YES Optional HEARTTIME Heartbeat timeout15, Time Optional REPTPOSTIM Report position time5, Time Optional BKMARKSYNC Synchronization

time60, Time Optional MONSAMPFRQ Latency metrics

update frequency5, Time Optional STARTUP Wait time for

initialization processtermination

120, Time Optional PROGRESS Progress message179

---

---

---

--

--

--

-

---

---

--

Journal name (JOURNAL) The name of the InfoSphere CDC default journal. By default, tables that are mirroredby InfoSphere CDC use this journal. Qualifier 1: Journal name

NameThe name of the default journal.The name of the library where the journal resides must precede the name of thejournal.

*SAMEKeeps the present setting for this parameter.This is the default setting.

Qualifier 2: Library Name

The name of the journal library.The name of the library where the journal resides must precede the name of thejournal.

*SAMEKeeps the present setting for this parameter.

*LIBLSpecifies the set of libraries in your library list. The libraries are searched inorder for the first occurrence of the specified default journal.This is the default setting.

*CURLIBSpecifies the current library.

Message queue name (NOTIFYQ) The name of the message queue where notifications are sent when the number oferrors detected by InfoSphere CDC exceeds the notify message thresholdQualifier1: Message queue name

NameThe name of the message queue.The name of the library where the message queue resides must precede thename of the message queue.

*SAMEKeeps the present setting for this parameter.This is the default setting.

Qualifier 2: Library Name

The name of the library where the message queue resides.

0, Time Optional LCKTIMEOUT Lock timeout30, Time Optional UNICODE_IS Unicode column

format*SAME, CHAR,NOCHANGE

Optional AUDFILTRAN Audit filter

180

-

--

--

--

-

----

---

---

--

--

--

---

The name of the library where the message queue resides must precede thename of the message queue.

*SAMEKeeps the present setting for this parameter.

*LIBLSpecifies the set of libraries in your library list. The libraries are searched inorder for the first occurrence of the specified message queue.This is the default setting.

*CURLIBSpecifies the current library.

Error count (NOTIFYCNT) The number of errors that InfoSphere CDC generates before a notification is sent tothe notify message queue.If a value smaller than the minimum setting is specified,the minimum setting is used. If a value larger than the maximum setting is specified, the maximum setting is used.

NumberSpecify the number of errors.Minimum Setting: 1 errorMaximum Setting: 99999 errors

*SAMEKeeps the present setting for this parameter.This is the default setting.

Refresh method (RESTORE) Indicates how InfoSphere CDC should refresh tables that have been restored. Thisincludes a refresh before mirroring is started.

*SAMEKeeps the present setting for this parameter.This is the default setting.

*IMMEDSpecifies that tables should be refreshed immediately when InfoSphere CDCdetects the restore.

*DELAYSpecifies that tables are refreshed the next time a refresh is started.

Authorization code (AUTCDE) The authorization code that is issued by IBM®. Adjustments to the authorizationcode are required when moving from a temporary license to a permanent license,when machine classes have changed, or when upgrading InfoSphere CDC to a newversion.

CodeSpecify the authorization code.

*SAMEKeeps the present setting for this parameter.This is the default setting.

Critical column status (UPDCOLUMN)

181

---

--

--

---

--

--

-

---

--

--

---

--

Indicates whether to enable critical column selection.*SAME

Keeps the present setting for this parameter.This is the default setting.

*YESEnables critical column selection.

*NODisables critical column selection.

Cascading replication status (CASCADE) Specifies whether to enable cascading replication.

*SAMEKeeps the present setting for this parameter.This is the default setting.

*YESEnables data that has been replicated to a subscriber to again be replicatedfrom that subscriber to another subscriber.

*NOPrevents replicated data from being replicated from the initial subscriber toanother subscriber.You should specify *NO if one or more tables are simultaneously maintainedbetween two servers.

Refresh While Active (REFWHLACT) Specifies whether or not to enable Refresh While Active, which is a feature thatallows InfoSphere CDC to refresh a target table while the source table is active andsubject to changes during the time of the refresh. After the refresh has beencompleted, source table changes that occurred during the refresh are also sent tothe target table.

*SAMEKeeps the present setting for this parameter.This is the default setting.

*YESIndicates that refresh while active is enabled.

*NOIndicates that refresh while active is disabled.

User-defined journal entries (USDEFJRN) Indicates whether or not user-defined journal entries should be processed forreplication. This parameter allows you to disable processing required for user-defined journal entries that could impact overall performance.

*SAMEKeeps the present setting for this parameter.This is the default setting.

*YESIndicates that the user-defined journal entries specified in the InfoSphere CDCmetadata table are processed for replication.

182

--

-----

-----

*NOIndicates that no user-defined journal entries are processed for replication.

Heartbeat timeout (HEARTTIME) Specifies the number of minutes of communication inactivity to wait before activeInfoSphere CDC jobs for a subscription are stopped.Heartbeat is a feature thatmanages InfoSphere CDC processes when a problem with communications or aprocess has been detected through the absence of communications over a specifiedperiod of time. For each active subscription, internal heartbeat messages are sentregularly from a publisher to a subscriber to determine communications and jobstatus. If a reply to a message is not received by the publisher within the specifiedtimeout interval, then InfoSphere CDC determines that a problem has occurred, andan attempt is made to stop all InfoSphere CDC publisher and subscriber jobs for thesubscription. In addition, messages (message identifiers DMU3165 and DMU0647)are placed in the event log when heartbeat time-outs occur. If a value smaller than the minimum setting is specified, the minimum setting isused. If a value larger than the maximum setting is specified, the maximum setting isused.

TimeThe amount of time, in minutes.Minimum Setting: 3 minutesMaximum Setting: 999 minutesDefault Setting: 15 minutes

Report position time (REPTPOSTIM) Specifies how often, in seconds, the publisher informs the subscriber about itsposition in the current journal during inactive periods. During inactive periods, whenthere are no journal entries pertaining to the current subscription, the publisherinforms the subscriber of its current position so that the subscriber can advance itsbookmarks accordingly. By specifying a low setting for this parameter, thesubscriber can reflect more accurately how far replication has progressed. Thisparameter can also prevent the reprocessing of entries that do not apply to the tablecurrently being replicated. The value of this parameter affects the information that isdisplayed in progress and bookmark messages in the Event Log Viewer, and in theMonitoring view in Management Console. A high setting for this parameter mayresult in information that is not up-to-date being presented. If a value smaller thanthe minimum setting is specified, the minimum setting is used. If a value larger thanthe maximum setting is specified, the maximum setting is used.

TimeThe amount of time, in seconds.Minimum Setting: 1 secondMaximum Setting: 300 secondsDefault Setting: 5 seconds

Synchronization time (BKMARKSYNC) The period of time, in seconds, between consecutive synchronizations performedbetween the publisher and the subscriber. Synchronization is achieved when thesubscriber reports to the publisher the position of the last committed change. If you

183

-----

---

--

-----

----

are replicating large volumes of information, you may want to set this value to alower number to allow obsolete journals receivers to be removed more frequently. Ifa value smaller than the minimum setting is specified, the minimum setting is used.If a value larger than the maximum setting is specified, the maximum setting is used.

TimeThe amount of time, in seconds.Minimum Setting: 1 secondMaximum Setting: 300 secondsDefault Setting: 60 seconds

Latency metrics update frequency (MONSAMPFRQ) The period of time, in seconds, between consecutive updates to a data store that isused to maintain replication latency metrics. The data store is referenced byManagement Console to present replication latency information.If a value smallerthan the minimum setting is specified, the minimum setting is used. If a value largerthan the maximum setting is specified, the maximum setting is used.

TimeThe amount of time, in seconds.Minimum Setting: 0 seconds. If this parameter is set to 0, replication latencymetrics are not updated in the datastore.Maximum Setting: 3600 seconds (1 hour)Default Setting: 5 seconds

Wait time for initialization process termination (STARTUP) The maximum amount of time, in seconds, to wait before terminating theInfoSphere CDC initialization phase. During InfoSphere CDC initialization prior todata replication, process termination on the publication or subscription server canresult in a suspension of the initialization phase.This parameter allows you to set themaximum waiting period in this case. If a value smaller than the minimum setting is specified, the minimum setting isused. If a value larger than the maximum setting is specified, the maximum setting is used.

TimeThe amount of time, in seconds.Minimum setting: 4 secondsMaximum setting: 3600 seconds (1 hour)Default setting: 120 seconds

Progress message (PROGRESS) The amount of time, in seconds, to wait before generating the next progressmessage. Progress messages are placed in the event log.If a value smaller than theminimum setting is specified, the minimum setting is used. If a value larger than the maximum setting is specified, the maximum setting is used.

TimeThe amount of time, in seconds.Minimum setting: 0 seconds. No progress messages are issued.Maximum setting: 7200 seconds (2 hours)

184

-

-----

--

---

--

---

-

-

-

Default setting: 0 seconds. No progress messages are issued. Lock timeout (LCKTIMEOUT) The amount of time, in seconds, InfoSphere CDC waits for a table or row to becomeunlocked before generating an error message in the event log.If a value smaller thanthe minimum setting is specified, the minimum setting is used. If a value larger than the maximum setting is specified, the maximum setting is used.

TimeThe amount of time, in seconds.Minimum setting: 2 secondsMaximum setting: 60 secondsDefault setting: 30 seconds

Unicode column format (UNICODE_IS) The default method of treating data in defined Unicode columns. In ManagementConsolee, you can establish how data in each Unicode column in a source table istreated. For each InfoSphere CDC installation on a server, this parameter definesthe system default method of treating data in Unicode columns. If a Unicode columnin Management Console is set to the system default, the current system defaultmethod, as defined by this parameter, is used.The following DB2 for IBM i datatypes are considered to be Unicode columns, and are therefore affected by thevalue assigned to this parameter:

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

*SAME

Keeps the present setting for this parameter.This is the default setting.

CHARInfoSphere CDC treats all data in Unicode columns as single-byte characters.Use this setting when Unicode columns contain single-byte character data.

NOCHANGEInfoSphere CDC treats all data in Unicode columns as a continuous bit stream. Use this setting when Unicode columns contain nonsingle- byte character data.NOCHANGE ensures InfoSphere CDC handles non-single-byte character datain the same way as previous InfoSphere CDC releases.NOCHANGE does not ensure that replicated non-single-byte character data inUnicode columns are represented properly on the subscription server.For replicated non-single-byte character data, you may have to apply user exitprograms or other customizations to properly represent the data in Unicodecolumns.

Audit filter (AUDFILTRAN) Indicates whether or not to audit both before and after images after a row updateresults 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.

185

-

-

---

--

--

-

Recording both the before and after images in the subscription audit table when arow update operation is applied to the assigned source table.Using row selection to filter rows placed in the subscription audit table. You canuse this parameter to override row selection when it is necessary to audit bothbefore and after images in the subscription audit table, but only one of theseimages satisfies the defined row selection expression.

You can use two journal codes (FP and FB) to identify before and after images inthe subscription audit table that do not satisfy a row selection expression in thissituation. The initial setting for this parameter differs based on whether you are upgradingfrom a previous InfoSphere CDC release that does not support this parameter orinstalling this InfoSphere CDC release. An initial setting of *YES applies wheninstalling InfoSphere CDC on an IBM i server. The initial setting for InfoSphere CDCupgrades, as described above, is *NO. This ensures that existing productfunctionality is maintained after completing this type of upgrade.

*SAMEKeeps the present setting for this parameter.This is the default setting.

*YESAudits both the before and after images when a row update results in only oneof these images satisfying a defined row selection expression.

*NOAudits only the after image that satisfies or does not satisfy a defined rowselection expression.This setting maintains existing InfoSphere CDC behavior prior to support forthis parameter.

Result Relevant messages are produced to the job log. Examples 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 libraryNOTQLIB. InfoSphere CDC can detect up to 10 errors before a notification is sent to themessage queue. Tables are refreshed immediately when InfoSphere CDC detects a restore. The authorization code is 12345678. 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 subscriberbefore an attempt is made to end all InfoSphere CDC publisher and subscriber jobs

186

for a subscription. The publisher informs the subscriber every 120 seconds about its position in thecurrent journal during inactive periods. Synchronizations between the publisher and subscriber to convey information aboutthe last committed change are performed every 15 seconds. Updates to the data store that is used to maintain replication latency metrics aremade every 15 seconds. The InfoSphere CDC initialization phase terminates if it cannot be completed in 180seconds. Progress messages are generated every 5 seconds. InfoSphere CDC waits 40 seconds for a table or row to become unlocked beforegenerating an error message in the event log. Data in GRAPHIC, VARGRAPHIC, CHARACTER, and VARCHAR columns aretreated as single-byte characters. When auditing changes applied to a source table, both the before and after imagesare placed in the subscription audit table when a row update results in only one ofthese images satisfying a defined row selection expression. Related reference: CHGDMTVAL - Set target system parameters

187

IBM InfoSphere Change Data Capture, Version 6.1 CHGDMTVAL - Set target system parameters Use this command to set subscriber system parameters using the command line. System parameters can also be set in Management Console. For more informationabout working with system parameters, see System parameters for InfoSphere®CDC for DB2® for i Applies To—Target Parameters Table 1. Supported keywords

Message queue name (NOTIFYQ) The name of the message queue where notifications are sent when the number oferrors detected by InfoSphere CDC exceeds the notify message thresholdQualifier1: Message queue name

Keyword Description Choices NotesNOTIFYQ Message queue

nameQualified objectname

Optional

Qualifier 1:Message queuename

*SAME, Name

Qualifier 2: Library *LIBL, Name,*CURLIB, *SAME

NOTIFYCNT

Error count *SAME, Count Optional AUTCDEAuthorization code *SAME, Code Optional REFRESHEnd on error *SAME, *NO, *YES Optional MIRROREnd on error *SAME, *NO, *YES Optional COLUMNVALColumn value check *SAME, *NO, *YES Optional NUMCOLMSGMessagegeneration format

*SAME, *NB, *NO,*YES

Optional CMTCTRL

Commitment control *SAME, *LEVEL1,*NONE

Optional MSGNOTNULL

Messagegeneration status

*SAME, *NO, *YES Optional DFTDATE

Date format *SAME, *NEW,*OLD

Optional MONSAMPFRQ

Latency metricsupdate frequency

5, Time Optional STARTUP

Wait time forinitialization processtermination

120, Time Optional PROGRESS

Progress message 0, Time Optional LCKTIMEOUTLock timeout 30, Time Optional RCDFMTCHKRecord formatcheck

*SAME, *YES, *NO Optional DBPERCENT

188

---

---

---

--

--

--

-

----

---

-

-

--

---

NameThe name of the message queue.The name of the library where the message queue resides must precede thename of the message queue.

*SAMEKeeps the present setting for this parameter.This is the default setting.

Qualifier 2: Library Name

The name of the library where the message queue resides.The name of the library where the message queue resides must precede thename of the message queue.

*SAMEKeeps the present setting for this parameter.

*LIBLSpecifies the set of libraries in your library list. The libraries are searched inorder for the first occurrence of the specified message queue.This is the default setting.

*CURLIBSpecifies the current library.

Error count (NOTIFYCNT) The number of errors that InfoSphere CDC generates before a notification is sent tothe notify message queue.

CountThe number of errors.Minimum setting: 1 errorMaximum setting: 99999 errors

*SAMEKeeps the present setting for this parameter.If a value smaller than the minimum setting is specified, the minimum setting isused.If a value larger than the maximum setting is specified, the maximum setting isused.This is the default setting.

Authorization code (AUTCDE) The authorization code that is issued by IBM®. Adjustments to the authorizationcode are required when moving from a temporary license to a permanent license,when machine classes have changed, or when upgrading InfoSphere CDC to a newversion.

CodeThe authorization code.

*SAMEKeeps the present setting for this parameter.This is the default setting.

End on error (REFRESH)

189

---

--

--

-

---

--

--

-

---

--

-

--

-

-

Specifies whether InfoSphere CDC ends a data refresh when an error isencountered.

*SAMEKeeps the present setting for this parameter.This is the default setting.

*YESSpecifies that InfoSphere CDC end a refresh immediately after it detects anerror.Unless you have a specific reason, you should set this parameter to *YES.

*NOSpecifies that InfoSphere CDC report the error and continue the refresh after itdetects the error.

End on error (MIRROR) Specifies whether InfoSphere CDC ends mirroring when an error is encountered.

*SAMEKeeps the present setting for this parameter.This is the default setting.

*YESSpecifies that InfoSphere CDC end mirroring immediately after it detects anerror.

*NOSpecifies that InfoSphere CDC report the error and continue mirroring after itdetects the error.Unless you have a specific reason, you should set this parameter to *NO.

Column value check (COLUMNVAL) Indicates whether InfoSphere CDC should check decimal and numeric columns forvalid formats before applying the numeric data to the target table.

*SAMEKeeps the present setting for this parameter.This is the default setting.

*YESIndicates that you want the data in each packed and zoned field to be validatedbefore it is applied to the target table.If invalid packed/zoned data is found, a message is generated and the field isset to 0 automatically.

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

Message generation format (NUMCOLMSG) Indicates how InfoSphere CDC generates messages when it detects invalid numericdata. InfoSphere CDC can convert invalid numeric data to zero on the subscriptionserver.

*SAME190

--

--

--

-

--

---

--

--

---

--

--

Keeps the present setting for this parameter.This is the default setting.

*YESSpecifies that a message be generated for each invalid numeric field detected.

*NOSpecifies that no messages be generated for each invalid numeric fielddetected.If you are sure that numeric data does not have to be validated, set thisparameter to *NO to maintain existing performance levels.

*NBSpecifies that no messages be sent when blank or uninitialized numeric fieldsare detected. Messages for other types of invalid numeric data are stillgenerated.

Commitment control (CMTCTRL) Specifies the level of commitment control for transaction processing.

*SAMEKeeps the present setting for this parameter.This is the default setting.

*NONETurns off commitment control for transaction processing. No attempt to maintaintransaction consistency is performed in the event that replication is interrupted.

*LEVEL1Only committed transactions are received by the subscriber. The subscriberapplies the transaction once the entire transaction is received from thepublisher. In the event of a subscriber failure while the transaction is beingapplied, the transaction is re-sent and the apply is completed the next timereplication is started.

If you select *LEVEL1, Refresh While Active on a publisher (see the CHGDMSVALcommand) must be disabled. Message generation status (MSGNOTNULL) Indicates whether you want to generate the same message each time an attempt ismade to replicate NULL to a target table column that is not NULL-capable.

*SAMEKeeps the present setting for this parameter.This is the default setting.

*YESGenerate a message each time NULL is replicated to a target table column thatis not NULL-capable.

*NODo not generate a message each time NULL is replicated to a target tablecolumn that is not NULL-capable. For all instances, you are not notified by amessage.

Date format (DFTDATE) Specifies the date that is returned when an invalid date is passed to the %TODATEcolumn manipulation function.

191

---

--

--

---

--

-----

--

*SAMEKeeps the present setting for this parameter.This is the default setting.

*NEWReturns the date 1901-01-01.

*OLDReturns the date 0001-01-01.

Latency metrics update frequency (MONSAMPFRQ) The period of time, in seconds, between consecutive updates to a data store that isused to maintain replication latency metrics. The data store is referenced byManagement Console to present replication latency information. This setting alsorepresents how often the data store is sampled to determine whether or not latencyhas exceeded or is less than the specified threshold settings. Latency messages aregenerated when latency has exceeded or is less than the thresholds, and alerts canbe configured in Management Console in response to a generated message.If avalue smaller than the minimum setting is specified, the minimum setting is used. If a value larger than the maximum setting is specified, the maximum setting is used.

TimeSpecifies the amount of time, in seconds.Minimum setting: 0 seconds. If this parameter is set to 0, replication latencymetrics are not updated in the data store.Maximum setting: 3600 seconds (1 hour)Default setting: 5 seconds

Wait time for initialization process termination (STARTUP) The maximum amount of time, in seconds, to wait before terminating theInfoSphere CDC initialization phase. During InfoSphere CDC initialization prior todata replication, process termination on the publication or subscription server canresult in a suspension of the initialization phase.This parameter allows you to set themaximum waiting period in this case. If a value smaller than the minimum setting is specified, the minimum setting isused. If a value larger than the maximum setting is specified, the maximum setting is used.

TimeSpecifies the amount of time, in seconds.Minimum setting: 4 secondsMaximum setting: 3600 seconds (1 hour)Default setting: 120 seconds

Progress message (PROGRESS) The amount of time, in seconds, to wait before generating the next progressmessage. Progress messages are placed in the event log.If a value smaller than theminimum setting is specified, the minimum setting is used. If a value larger than the maximum setting is specified, the maximum setting is used.

TimeSpecifies the amount of time.

192

---

-----

---

--

--

Maximum setting: 7200 seconds (2 hours)Minimum setting: 0 seconds. No progress messages are issued.Default setting: 0 seconds. No progress messages are issued.

Lock timeout (LCKTIMEOUT) The amount of time, in seconds, InfoSphere CDC waits for a table or row to becomeunlocked before generating an error message in the event log.If a value smaller thanthe minimum setting is specified, the minimum setting is used. If a value larger than the maximum setting is specified, the maximum setting is used.

TimeSpecifies the amount of time.Minimum setting: 2 secondsMaximum setting: 60 secondsDefault setting: 30 seconds

Record format check (RCDFMTCHK) Indicates whether or not InfoSphere CDC checks the record formats of the physicaland logical files when the physical file is selected to receive mirrored data using aunique key.

*SAMEKeeps the present setting for this parameter.This is the default setting.

*YESInfoSphere CDC 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 beselected as a destination of mirrored data using a unique key.

*NOInfoSphere CDC does not check the record formats of the physical and logicalfiles. You can select a physical file to be the destination of mirrored data using aunique key that does not have the same record format as the logical file.

Deadband percentage (DBPERCENT) The size of the range around each latency threshold setting.Based on latencythreshold settings defined in Management Console, a latency message is generatedwhen latency has exceeded or is less than a threshold. Latency is calculated atregular intervals, where the interval is the current setting for the MONSAMPFRQparameter. Alerts can be configured in Management Console in response to agenerated message. This parameter, which is expressed as a percentage, allows you to pad a thresholdequally on both sides to create a range around the threshold. By adjusting thisInfoSphere CDC parameter, the size of the range around the threshold can beincreased or decreased, and the threshold itself can be made thicker or thinner. Alatency message is generated only when latency has exceeded the high limit of therange or is less than the lowest limit of the range. By changing the value assigned tothis parameter, you can control the number of latency messages placed in the eventlog. For an example illustrating how this parameter can affect the number of latencymessages that are generated, see the Deadband Percentage system parameter. Since there are two latency threshold settings in Management Console (a warning

193

-----

threshold and a problem threshold), two separate ranges are defined when thisparameter is set to a non-zero value. Each range is attached to its threshold, and sothe two ranges can overlap with no change in behavior. If a value smaller than theminimum setting is specified, the minimum setting is used. If a value larger than themaximum setting is specified, the maximum setting is used.

NumberSpecifies the size of the range.Minimum setting: 3%Maximum setting: 10%Default setting: 3%

Result Output Relevant messages are produced to the job log. Examples 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 locatedin library NOTQLIB. InfoSphere CDC detects up to 10 errors before sending a notification to themessage queue. The authorization code is 23456789. Refresh or mirroring ends after InfoSphere CDC encounters an error. Data in each packed and zoned field is not validated before it is applied to the targettable. 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 columnthat is not NULL-capable. The date that is returned when an invalid date is passed to the %TODATE columnmanipulation function is 1901-01-01. Updates to the data store that is used to maintain replication latency metrics aremade every 240 seconds. The InfoSphere CDC initialization phase terminates if it cannot be completed in 60seconds. Progress messages are generated every 45 seconds. InfoSphere CDC waits 10 seconds for a table or row to become unlocked beforegenerating an error message in the event log. The record formats of the physical and logical files are not checked. Physical filesselected to be the destination of mirrored data using unique key can have differentrecord 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

194

Related reference: CHGDMSVAL - Set source system parameters

195

IBM InfoSphere Change Data Capture, Version 6.1 Data types supported by InfoSphere CDC for DB2for i For information about data types supported by InfoSphere® CDC for DB2® for i,see Supported data types.

196

IBM InfoSphere Change Data Capture, Version 6.1 System parameters for InfoSphere CDC for DB2 for i For information about system parameters for InfoSphere® CDC for DB2® for i, seeSystem parameters for InfoSphere CDC for DB2 for i.

197

-----

IBM InfoSphere Change Data Capture, Version 6.1 User exits for InfoSphere CDC for DB2® for i The following topics provide you with information on user exits you can configure forInfoSphere® CDC:

Invoking user exit programs before and after table and row-level operations Invoking user exit programs from expressions and row-filtering expressions Invoking user exit programs after receiving a notification Invoking user exit programs for conflict resolution Sample user exit programs

198

----

-

--

---

IBM InfoSphere Change Data Capture, Version 6.1 Invoking user exit programs before and after tableand row-level operations You can invoke user exit programs before and/or after table-level and row-leveloperations that InfoSphere® CDC applies to target tables. Table-level operationsinclude table truncate and refresh. Row-level operations include inserts, updates,and deletes. User exit programs let you further specify what you want done to themapped target table before and/or after InfoSphere CDC applies table/row-leveloperations. 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. Afterwriting the user exit program, you can configure InfoSphere CDC to call the programby specifying its name and location in the User Exits tab of Management Console. InfoSphere CDC calls your user exit program before it begins target jobs. Youshould note the following information about user exit programs in relation to targetjobs:

If a user exit program does not exist when the target job begins, the target job willend.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 Option Files created with the SHARE *YES option may cause problems if they are used inuser exit programs. The full (first) open of a shared file determines the open modeand open options for subsequent (shared) accesses of the same shared file. Thismeans that if a shared file is being updated by InfoSphere CDC, and is also used ina user exit program, a potential for conflicting requirements regarding open optionsexists. If the full open of the file does not specify the open mode and optionsrequired by the program to open the file the second time, the second attempt mayfail. Therefore, avoid using shared files that InfoSphere CDC is also updating in userexit programs. DMCJOBD Job Description Place your user exit program in the product library to ensure InfoSphere CDCinvokes them during replication. The default InfoSphere CDC job description calledDMCJOBD is created in the product library during installation. The library list usedby InfoSphere CDC jobs must include the libraries where you have placed your userexit program. Since the library list for the default job description references theInfoSphere CDC product library, it is recommended that you place the user exitprograms in the product library to ensure they are found during replication. In this section, you will learn:

Entry parameters for table-level and row-level user exits in RPG Entry parameters for table-level and row-level user exits in COBOL Entry parameters for table-level and row-level user exits in C/C++

199

200

--

--

---

----------

--

--

--

--

--

---

--

--

IBM InfoSphere Change Data Capture, Version 6.1 Entry parameters for table-level and row-level userexits in RPG Each of the following parameters in the entry parameter list must be defined in eachRPG table/row-level user exit program.

RTNCDThe return code that indicates whether or not the user exit program wassuccessful. In the user exit program, return an error message ID if errorsoccurred in the user exit program or blank characters if no errors occurred inthe user exit program.

PGMNMThe name of the user exit program that was called. This is the name of theprogram that you specify in Management Console.

ENTRYBThe table/row-level user exit point where the user exit program was called.The possible returns are:

1—Before Clear2—After Clear3—Before Insert4—After Insert5—Before Update6—After Update7—Before Delete8—After Delete9—Before Refresh10—After Refresh

BDATAThe row before image in the source/publisher table.

ADATAThe row after image in the source/publisher table.

BNULCBA count of the number of NULL-capable fields in the before image in thesource/publisher table. Each NULL-capable field will have a NULL indicator.

ANULCBA count of the number of NULL-capable fields in the after image in thesource/publisher table. Each NULL-capable field will have a NULL indicator.

BNULLNULL indicators for all NULL-capable fields in the before image in thesource/publisher table.This parameter returns one of the following values:

0—NULL-capable field is not set to NULL.1—NULL-capable field is set to NULL.

ANULLNULL indicators for all NULL-capable fields in the after image in thesource/publisher table.This parameter returns one of the following values:

0—NULL-capable field is not set to NULL.

201

--

-

--

--

-

--

-

-

--

--

---

--

-

1—NULL-capable field is set to NULL.BJRNL

Journal control information associated with the before image in thesource/publisher table.

AJRNLJournal control information associated with the after image in thesource/publisher table.

DTLNGTThe length of the fully formatted (final) image that will be applied to thetarget/subscriber table. The fully formatted (final) image and the length of this image will containinconsistent information in the certain situations. For example, in the situationwhere the subscriber job is operating under SQL update mode (in the targetsystem parameters), an update operation is performed, and there are targetcolumns with default values. In this case, the length of the final image and theimage itself will not include the columns with the default values. Therefore, thelength of the final image for a row update operation will be shorter than thelength of the final image for a row insert operation.

ATDATAThe fully formatted (final) image that will be applied to the target/subscribertable.Note: When the subscriber job is operating under SQL update mode (in thetarget system parameters), an update operation is performed, and there aretarget columns with default values. In this case, the length of the final imageand 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 beshorter than the length of the final image for a row insert operation. The fully formatted image contains the results of data transformations applied tothe replicated after image in the target environment. For target tables that havebeen 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 finalimage.

NULCNTThe number of NULL-capable fields in the fully formatted (final) image in thetarget/subscriber table. Each NULL-capable field will have a NULL indicator.

NULINDNULL indicators for all NULL-capable fields in the fully formatted (final) image inthe target/subscriber table.This parameter returns one of the following values:

0—NULL-capable field is not set to NULL.1—NULL-capable field is set to NULL.

SYSTEMThe source identifier identifying the subscription containing the source table.Source identifiers and subscriptions are defined in Management Console.

Both the BJRNL and AJRNL parameters contain the following journal control fields: JOEENTL

202

-

--

--

--

--

--

--

--

--

--

--

--

--

--

--

--

--

--

--

-

--

The length of the journal entry that includes the entry length field and allsubsequent positions of the journal entry.

JOSEQNThe sequence number assigned to the journal entry by the system.

JOJRNThe name of the journal.

JOJRNLIBThe name of the library where the journal is located.

JORCVNMEThe name of journal receiver attached to the journal.

JORCVLIBThe name of the library where the journal receiver is located.

JOCODEThe primary category of the journal entry.

JOENTTThe type of user-created or system-created journal entry.

ENTTSYSThe type of system-created entry.

JOTSTPThe system date and time when the entry was journaled.

JOJOBThe name of the source/publisher job that generated the journal entry.

JOUSERThe user profile of the user that started the source/publisher job.

JONBRThe job number of the source/publisher job generated the journal entry.

JOPGMThe name of the source/publisher program that generated the journal entry.

JOOBJThe name of the source table for which the journal entry was generated.

JOLIBThe name of the library containing the source table.

JOMBRThe source table name of the physical file member.

JOCTRRThe relative record number (RRN) of the row in the publication table thatcaused the journal entry or a count that is pertinent to the specific type ofjournal entry.

JOFLAGThe journal flag. Based on the type of entry, indicates whether or not there isextended information.The following values determine whether or not extended information ispresented:

1—Extended information is available.0—No extended information is available.

The extended information is placed immediately after the Entry Specific Dataand will have the following structure:

203

----

--

--

--

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.

JOCCIDThe number that identifies the commit cycle. This number only applies to anentry associated with a commitment transaction.

JOUSPFThe name of the user profile under which the source/publisher job was runningwhen the entry was created.

JOSYNMThe name of the publication system on which the journal entry was generated.

The total length of all journal control fields is 191. This is equal to the defined size ofboth the BJRNL and AJRNL parameters.

204

--

--

---

----------

--

--

--

--

--

---

--

---

-

IBM InfoSphere Change Data Capture, Version 6.1 Entry parameters for table-level and row-level userexits in COBOL

LK-RETURN-CODEThe return code that indicates whether or not the user exit program wassuccessful. In the user exit program, return an error message ID if errorsoccurred in the user exit program or blank characters if no errors occurred inthe user exit program.

LKPROGRAMThe name of the user exit program that was called. This is the name of theprogram that you specify in Management Console.

LK-ENTRYThe table/row-level user exit point where the user exit program was called.This parameter returns one of the following values:

1—Before Clear2— After Clear3—Before Insert4—After Insert5—Before Update6—After Update7—Before Delete8—After Delete9—Before Refresh10—After Refresh

LK-BEFORE-RECORDThe row before image in the source/publisher table.

LK-AFTER- RECORDThe row after image in the source/publisher table.

LK BEFORE-NULLIND-CNTA count of the number of NULL-capable fields in the before image in thesource/publisher table. Each NULL-capable field will have a NULL indicator.

LK-AFTER-NULLIND-CNTA count of the number of NULL-capable fields in the after image in thesource/publisher table. Each NULL-capable field will have a NULL indicator.

LK-BEFORE-NULLINDSNULL indicators for all NULL-capable fields in the before image in thesource/publisher table.This parameter returns one of the following values:

0—NULL-capable field is not set to NULL.1—NULL-capable field is set to NULL.

LK-AFTER-NULLINDSNULL indicators for all NULL-capable fields in the after image in thesource/publisher table.This parameter returns one of the following values:

0—NULL-capable field is not set to NULL.1—NULL-capable field is set to NULL.

LK-BEFORE-JOURNAL

205

-

--

--

-

--

-

--

--

---

--

Journal control information associated with the before image in thesource/publisher table.

LK-AFTER-JOURNALJournal control information associated with the after image in thesource/publisher table.

LK-DATA-LENGTHThe length of the fully formatted (final) image that will be applied to thetarget/subscriber table. The parameters containing the fully formatted (final) image and the length ofthis image will contain inconsistent information in the following situation: whenthe subscriber job is operating under SQL update mode (in the subscriptionsystem parameters), an update operation is performed, and there aresubscription columns with default values. In this case, the length of the finalimage 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 beshorter than the length of the final image for a row insert operation.

LK-DM-BUFFERThe fully formatted (final) image that will be applied to the target/subscribertable. The fully formatted image contains the results of data transformationsthat may have been applied to the replicated after image in the targetenvironment. For target tables that have been assigned under summarization,row consolidation (one-to-one and one-to-many), and adaptive apply, thisimage, in before user exit program invocations, will contain only default values(blanks, zeroes, and so on) instead of the final image.The parameters containing the fully formatted (final) image and the length ofthis image will contain inconsistent information in the following situation: whenthe subscriber job is operating under SQL update mode (in the subscriptionsystem parameters), an update operation is performed, and there aresubscription columns with default values. In this case, the length of the finalimage 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 beshorter than the length of the final image for a row insert operation.

LK DM-NULLIND-CNTThe number of NULL-capable fields in the fully formatted (final) image in thetarget/subscriber table. Each NULL-capable field will have a NULL indicator.

LK-DM-NULLINDSNULL indicators for all NULL-capable fields in the fully formatted (final) image inthe target/subscriber table.This parameter returns one of the following values:

0—NULL-capable field is not set to NULL.1—NULL-capable field is set to NULL.

LK-SYSTEMIDThe source identifier identifying the subscription containing the source table.Source identifiers and subscriptions are defined in Management Console.

Both the LK-BEFORE-JOURNAL and LK-AFTER-JOURNAL variables in the linkagesection contain the journal control fields listed in Entry parameters for table-level androw-level user exits in RPG.

206

207

--

--

---

----------

--

--

--

--

--

---

--

---

-

IBM InfoSphere Change Data Capture, Version 6.1 Entry parameters for table-level and row-level userexits in C/C++

pReturnCodeThe return code that indicates whether or not the user exit program wassuccessful. In the user exit program, return an error message ID if errorsoccurred in the user exit program or blank character if no errors occurred in theuser exit program.

pProgramNameThe name of the user exit program that was called. This is the name of theprogram that you specify in Management Console.

entryPointCodeThe table/row-level user exit point where the user exit program was called.This parameter returns one of the following values:

1—Before Clear2—After Clear3—Before Insert4—After Insert5— Before Update6—After Update7—Before Delete8—After Delete9—Before Refresh10—After Refresh

pBeforeRecordDataThe row before image in the source/publisher table.

pAfterRecordDataThe row after image in the source/publisher table.

nullIndBeforeCountA count of the number of NULL-capable fields in the before image in thesource/publisher table. Each NULL-capable field will have a NULL indicator.

nullIndAfterCountA count of the number of NULL-capable fields in the after image in thesource/publisher table. Each NULL-capable field will have a NULL indicator.

pBeforeRecordNullIndNULL indicators for all NULL-capable fields in the before image in thesource/publisher table.This parameter returns one of the following values:

0—NULL-capable field is not set to NULL.1—NULL-capable field is set to NULL.

pAfterRecordNullIndNULL indicators for all NULL-capable fields in the after image in thesource/publisher table.This parameter returns one of the following values:

0—NULL-capable field is not set to NULL.1—NULL-capable field is set to NULL.

pBeforeJournalHeader

208

-

--

--

--

-

--

--

---

--

Journal control information associated with the before image in thesource/publisher table.

pAfterJournalHeaderJournal control information associated with the after image in thesource/publisher table.

internalDataLengthThe length of the fully formatted (final) image that will be applied to thetarget/subscriber table.

pTSInternalBufferThe fully formatted (final) image that will be applied to the target/subscribertable. The fully formatted image contains the results of data transformations that mayhave been applied to the replicated after image in the target environment. Fortarget tables that have been mapped under summarization, row consolidation(one-to-one and one-to-many), and adaptive apply, this image, in before userexit program invocations, will contain only default values (blanks, zeroes, andso on) instead of the final image.

internalNullIndCountThe number of NULL-capable fields in the fully formatted (final) image in thetarget/subscriber table. Each NULL-capable field will have a NULL indicator.

pTSInternalNullIndNULL indicators for all NULL-capable fields in the fully formatted (final) image inthe target/subscriber table.This parameter returns one of the following values:

0—NULL-capable field is not set to NULL.1—NULL-capable field is set to NULL.

pSourceSystemIdThe source identifier identifying the subscription containing the source table.Source identifiers and subscriptions are defined in Management Console.

Both the pBeforeJournalHeader and pAfterJournalHeader parameters contain thejournal control fields listed in Entry parameters for table-level and row-level userexits in RPG.

209

-

-

IBM InfoSphere Change Data Capture, Version 6.1 Invoking user exit programs from expressions androw-filtering expressions You can invoke user exit programs from expressions and row filtering expressions inManagement Console:

Expressions—Expressions are stored and evaluated on target columns. Forexample, you can create an expression that: calls a user exit program. You canbuild an expression that contains a valid call to the %USER column manipulationfunction. Row-filtering expressions—In order to include or exclude particular rows forreplication, you need to build a row-filtering expression. All row-filteringexpressions that you define must return a boolean result. You can build a row-filtering expression that contains a valid call to the %USER column manipulationfunction.

The user exit program should return a result that is used in the expression topopulate data in a table column. Use the column manipulation function (%USER) tocall user exit programs from either type of expression. You can build the expressionin Management Console.

210

--

-

---

---

--

--

--

--

----

-

---

---

-

IBM InfoSphere Change Data Capture, Version 6.1 Invoking user exit programs after receiving anotification You can invoke a user exit program after receiving a notification in ManagementConsole. You may prefer to set up a user exit that triggers certain operations uponspecific InfoSphere® CDC events. If you want to invoke user exit programs when InfoSphere CDC generates anotification, the library list for the job description that is used by InfoSphere CDCjobs must include the libraries where the user exit programs reside. Since the librarylist for the default job description references the InfoSphere CDC product library, it isrecommended that you place the user exit programs in the product library to ensurethey are found during replication.

RTNCDThe 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 theuser exit program or non-blank characters if an error occurred.

PGMNMThe name of the user exit program that was called.This is the name of the program that you specify in Management Console.

ENGTYPThe environment in which the user exit program was called.This parameter returns one of the following values:

1: Publisher (Source)2: Subscriber (Target)

SRTGTNThe source identifier or publisher identifier (if program was called from a target)or the name of the subscription (if program was called from a source) fromwhich the user exit program was called.Source identifiers and subscriptions are defined in Management Console.

ZONEThe functional zone for which the user exit program was invoked.If Source (Publisher) or Target (Subscriber) Indicator is set to 1, one of thefollowing zone settings apply:

1: SCRAPE/REFRESH2: COMMUNICATIONS3: ENVIRONMENT4: JOURNAL/LOG MAINTENANCE

If Source (Publisher) or Target (Subscriber) Indicator is set to 2, one of thefollowing zone settings apply:

1: APPLY2: COMMUNICATIONS3: ENVIRONMENT

CTGRYThe message category for which the user exit program was invoked.This parameter returns one of the following values:

1: Fatal

211

----

--

--

--

--

---

---

--

--

--

--

--

--

--

--

--

--

--

--

--

--

-

2: Error3: Informational4: Status5: Operational

AREAA parameter reserved for future development.

MSGIDThe identifier of the message that caused the user exit program to be invoked.

MSGTXTThe text that has been substituted into the message.

MSGLNThe length of the text (in bytes) that has been substituted into the message.

SNDDTEThe date when the message was sent.The date is expressed in *ISO format.

SNDTMEThe time when the message was sent.The time is expressed in *ISO format.

JOSGNThe sequence number assigned to the journal entry by the system.

JOJRNThe name of the journal.

JOJLIBThe name of the library where the journal is located.

JORCNMThe name of journal receiver attached to the journal.

JOCODEThe primary category of the journal entry.

JOENTThe type of user-created or system-created entry.

JRENTThe type of system-created entry.

JOTSTThe system date and time when the entry was journaled.

JOJOBThe name of the publisher/source job that generated the journal entry.

JOUSRThe user profile of the user that started the publisher/source job.

JONBRThe job number of the publisher/source job that generated the journal entry.

JOPGMThe name of the publisher/source program associated with the journal record.

JOOBJThe name of the source for which the journal entry was generated.

JOLIBThe name of the library containing the source table.

JOMBR

212

--

-

--

-

--

-

----

--

--

--

--

--

--

The name of the source table member.JOCTR

The publication relative record number (RRN) of the row that caused the journalentry or a count that is pertinent to the specific type of journal entry.

JOFLGThe journal flag. Based on the type of entry, indicates whether or not there isextended information. The following values determine whether or not extended information ispresented:

1--Extended information is available. 0--No extended information is available.

The extended information is placed immediately after the Entry Specific Dataand 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.

JOCIDThe number that identifies the commit cycle. This number only applies to anentry associated with a commitment transaction.

JOUSPFThe name of the user profile under which the publisher job was running whenthe entry was created.

JOSYNMThe publication server name. The name of the system on which the journalentry was generated.

TGTTBLThe name of the target table that has been identified to receive transferreddata.

TGTLIBThe name of the library where the target table is located.

TGTMBRThe name of the member in the target table that has been identified to receivetransferred data.

213

-

IBM InfoSphere Change Data Capture, Version 6.1 Invoking user exit programs for conflict resolution When a conflict is detected, you can resolve the conflict by invoking a customizeduser exit program. The program allows you to define a conflict resolution strategythat is not covered by one of the standard resolution methods (publisher wins,subscriber wins, largest value wins, or smallest value wins). The user exit programcan resolve a conflict by returning a row that will be applied to the target table. After programs have been written and compiled, user exit programs must bereferenced in Management Console in order to call them when conflicts aredetected. DMCJOBD Job Description The default InfoSphere® CDC job description called DMCJOBD is created in theproduct library during installation. If you want to invoke user exit programs to resolve conflicts, the library list for the jobdescription that is used by InfoSphere CDC jobs must include the libraries where theuser exit programs reside. Since the library list for the default job descriptionreferences the InfoSphere CDC product library, it is recommended that you placethe user exit programs in the product library to ensure they are found duringreplication. In this section, you will learn:

Entry parameter list descriptions for conflict resolution

214

--

--

--

--

--

-

-

IBM InfoSphere Change Data Capture, Version 6.1 Entry parameter list descriptions for conflictresolution This section describes each parameter in the entry parameter lists that must bedefined in each conflict resolution user exit program. C definitions are illustrated, butconflict resolution user exit programs can be written in other languages. Use the dmResolveConflict function 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 calleddmResolveConflict. If you are using multiple user exit programs in yourconfiguration, the names of these programs can be different.

Control Structure (*pControl)A structure containing various items of information about the publisher andsubscriber, as well as various indicators.

Publisher Row Before Image (*pBeforeImage)A structure containing the image of the row in the source table before changeswere applied. The control structure contains an indicator that you can use todetermine whether or not this image was passed to the conflict resolutions userexit program.

Publisher Row After Image (*pAfterImage)A structure containing the image of the row in the source table after changeswere applied. The control structure contains an indicator that you can use todetermine whether or not this image was passed to the conflict resolutions userexit program.

Subscriber Row Before Image (*pTargetImage)A structure containing the image of the row in the target table when the userexit program was called. The control structure contains an indicator that youcan use to determine whether or not this image was passed to the conflictresolutions user exit program.

Result Image (*pDesiredImage)A structure containing the image of the row that will be applied to the targettable. If the conflict is resolved by the user exit program; this is the imagedefined in the user exit program, returned to the calling environment, andsubsequently applied to the target table. This parameter applies only to conflicts caused by rows being inserted orupdated in the source table. For row deletes; do not assign an image to thisparameter.The control structure contains an indicator that you can use to determinewhether or not this image can be returned by the user exit program.

215

216

IBM InfoSphere Change Data Capture, Version 6.1 Sample user exit programs InfoSphere® CDC provides several sample user exit programs for table/row-leveloperations, row filtering expressions, expressions, and notifications. You can usethese samples as a starting point for creating your own user exit programs byinserting your customized code. The sample user exit programs are automaticallyinstalled with InfoSphere CDC, and are members in the DMCSRC source file that isplaced in the InfoSphere CDC product library. The table below identifies the samples that are provided with InfoSphere CDC:

CAUTION: It is strongly recommended that you test all sample programs before they areinvoked in your production environment.

Application User Exit ProgramType

Program Names

Table/Row-LevelOperations

COBOL BEFOREUSER

Row FilteringExpressions

COBOL USERSEL1,USERSEL2

Expressions COBOL USERDRV1,USERDRV2

Expressions CL CLDRV1, CLDRV2Notifications COBOL DMCALRMCBLNotifications CL DMCALRMCLPNotifications RPG DMCALRMRPG,

DMCALRMRP3Conflict Resolution C CDRSAMPL

217