Shell Script Execution - connect_cdc_sqdata - Latest

Connect CDC (SQData) Apply engine

Product type
Software
Portfolio
Integrate
Product family
Connect
Product
Connect > Connect CDC (SQData)
Version
Latest
Language
English
Product name
Connect CDC (SQData)
Title
Connect CDC (SQData) Apply engine
Copyright
2024
First publish date
2000
ft:lastEdition
2024-07-30
ft:lastPublication
2024-07-30T20:19:56.898694

Executing the Engine is often performed using shell scripts. Once the ENGINE has been parsed it can and usually is started using the sqdmon utility together with a local Daemon Controller.

Example

The same Engine in the previous example, DB2TOORA.sqd that will perform near real-time replication of "Sales" application data from a DB2 database captured on a z/OS system named "MVS21" to Oracle tables running on a UNIX system. The source "Host" system and DB2 System ID were passed as parameters because the engine script has been written so that it can be reparsed to process data coming from other systems as well.
#!/usr/bin/bash
cd ./home/test/sales/ENGINE
sqdata ./DB2TOORA.prc 2>&1 | tee DB2TOORA.rpt
cd ..
Execution of the same engine using SQDENG, might look like this:
#!/usr/bin/bash
cd ./home/test/sales/ENGINE
sqdeng --script=./DB2TOORA.sqd ENGINE=DB2TOORA HOST=MVS21 SSID=DB2T --list=DB2TOORA.prt 2>&1 | tee DB2TOORA.rpt
Note:
  • In the example the working directory is one level up from the "ENGINE" directory containing the actual engine script. References in the script to the location of parts files like RDBMS DDL for table descriptions, called procedures, etc must be sensitive to their location in the directory hierarchy, ie: ./<directory_name>/<file_name>. In this case probably ./ORADDL (note the single dot).
  • See Command Line Execution for other Command line keywords and parameters.
Execute an engine script named DB2TOORA.sqd that will perform near real-time replication of "Sales" application data from a DB2 database captured on a z/OS system named "MVS21" to Oracle tables running on a UNIX system. The source "Host" system and DB2 System ID were passed as parameters because the engine script has been written so that it can be reparsed to process data coming from other systems as well.
sqdata ./engines/DB2TOORA.prc 2>&1 | tee DB2TOORA.rpt
Execution of the same engine using SQDENG, might look like this:
sqdeng --script=./ENGINE/DB2TOORA.sqd ENGINE=DB2TOORA HOST=MVS21 SSID=DB2T --list=DB2TOORA.prt DB2TOORA.rpt

The Engine (SQDATA) uses the parsed Apply Engine script as input. The engine can be either executed directly at the command line, using a shell script or started using the sqdmon utility and the sqdaemon.

Syntax
SQDATA <engine>.prc > <engine>.rpt
or using the sqdmon start command along with a properly configured daemon:
SQDMON start ///<engine_alias> --service=2626

Example

A simple shell script is frequently used to execute the engine:
sqdata ./ENGINE/ORATOORA.prc > ORATOORA.rpt
or using the sqd>mon start command along with a properly configured sqdaemon:
sqdmon start ///ORATOORA --service=2626
[ORATOORA]
type=engine
program=sqdata
args=./ENGINE/ORATOORA.prc
working_directory=/home/sqdata/demo
stdout_file=/ORATOORA.rpt
stderr_file=/ORATOORA.rpt
auto_start=no
Note: In the Engine example the working directory, /home/sqdata/demo is one level up from the directory containing the actual engine script, "ENGINE". References to the parsed script must be to the location of parsed script.