Writing the Command File

The command file (seteod.cmd), batch file (seteod.bat), or shell script (seteod.sh) must contain the following line:

dbutility process datasourcename

where datasourcename is the name of the datasource you want to process.

Optional Specifications

In addition to specifying the name of the datasource to process, the command file or batch file can indicate when the DATABridge Client is to stop processing updates.

Note: This guide provides guidelines for specifying these operations in a Windows command or batch file only. Use similar commands for the UNIX shell script.

In the following example, a site’s end-of-day processing is finished. An operator or WFL scheduler invokes the Notify utility on the host. In this case, the command file calls isql to do the following:

  • Update the stop_afn column of the DATASOURCES client control table to hold the AFN that signals the end of audit file processing. The AFN is received from the Notify utility and passed as a parameter in the command file. (In order to do this, you must also set the stop_after_given_afn parameter to True.)
  • Close the audit file by executing a dbutility switchaudit command to make sure that no more updates are added to the audit file.
  • Execute a dbutility process command to process updates. Since the stop_after_given parameter is set to True, the process command stops when the current audit file is completely processed.

Sample Command File

The following is a sample Windows command file that uses the optional specifications:

isql -U user -P passwd -d BANKDB -Q "update DATASOURCES set stop_afn=%1 where data_source='BANKDB'"

dbutility switchaudit BANKDB

dbutility process BANKDB