Connect:Direct configuration π
Sharing folders between Data Mover and the Connect:Direct node
When Data Mover and the Connect:Direct Node reside on different machines, the first and most important step is to correctly manage shared folders between them. Connect:Direct sends and receives files based on folder policies and the cdp script must contain a direct reference to the filesystems.
To configure the Data Mover Steng for the Connect:Direct server, follow these steps:
If the Connect:Direct server is remote, mount shared filesystems to exchange files.
Go to
${STENG_HOME}/cfgand configure thespeng.cd.pathremap.tablefile as described in the Remapping shared folders section below.Copy the Connect:Direct API library (CDJAI.jar) in this folder:
${STENG_HOME}/lib/cd.
Once the installation and the configuration are completed, restart the STENG before starting the server!
Remapping shared folders
To remap shared folders, edit the path remap configuration file speng.cd.pathremap.table in the directory ${STENG_HOME}/cfg.
This configuration file consists of several pairs of folder paths that remap incoming and outgoing files. Below, you can find some examples.
You can define a remote path containing a letter, a colon, and a Unix slash. Example: D:/dir1/dir2.
#########
## SpEng Path <----> Local CD Path
## ex:
## C:\share\cd=/home/connect/share/cd
##
## SpEng Path <----> Remote CD Path
## ex:
## /winCdrive/Out/=C:\Out\
#########
# First (incoming files)
C:\CDReceive=Z:\CDReceive
# Second (push files)
Z:\CDShared=C:\CDShared
# Third (pull files)
/winCdrive/Test/Out/=C:\Test\Out\
/masterInDirCd=C:\CDShared
C:/CDShared=Z:\CDSharedThe first example applies to incoming files:
β’ "Z:\CDReceive" is the shared partition defined on the local machine (Data One) β’ "C:/CDReceive" is the shared partition on the remote Connect:Direct server
The file received by the Connect:Direct server will be placed in the "C:/CDReceive" folder. The DataOne\CD connector will be prompted that a new file has arrived. In Data One, the file is stored in the "Z:\CDReceive" folder, where it is taken and moved in the Data One filesystem.
The second example applies to push operations. Outgoing files are copied from the Data One filesystem to the shared folder "Z:\CDShared". When the DataOne\CD connector submits the βcdpβ script to the remote Connect:Direct server, the correct remapped folder "C:\CDShared" will be specified in the Connect:Direct server.
The third example applies to pull operations. For Windows convention, we will use "/winCdrive" to indicate the "C:" drive path. The first step is to define a valid path for the Connect:Direct machine, for example: "/winCdrive/Test/Out/SourceFile.txt" and a virtual destination path, for example: "/masterInDirCd/DestFile.txt". Here below, you can find the remapping operations that are executed:
β’ From /winCdrive/Test/Out/ to C:\Test\Out\ (remapped path to fetch the source file on the C:D remote node) β’ From /masterInDirCd to C:\CDShared (remapped path where the file is received on the C:D server) β’ From C:/CDShared to Z:\CDShared (remapped path when the file is received, see first example)
π Disabling shared folders remap on remote paths
When a contract is defined, the remote path is remapped according to the specifications in the speng.cd.pathremap.table file. Remapping is enabled by default on the remote destination path (with sppush) or the source path (with sppull).
To disable remapping on the remote destination or source path, an advanced setting must be added in Data Mover:
Go to Setup β Advanced Settings.
Click the New button.
Enable the Click to add a new module/section toggle button.
In the Module edit box, enter STENG.
In the Section edit box, enter mft.
In the Property Name edit box, enter connectDirect.enableRemotePathRemap.
In the Property Value edit box, enter FALSE. The remote destination or source path entered in the contract is no longer remapped; the contract path is taken as written.
If this property is set to true, you must use these naming conventions to distinguish a Windows network share and support empty paths on z/OS:
Windows network share: /_WINSHARE_/host/dir1
Example: /_WINSHARE_/host/dir1 (which becomes \\host\dir1)
Empty paths on z/OS: /_EMPTYDIR_/
Esempio /_EMPTYDIR_/
π Using DFIC information in CDP template execution
In a Connect:Direct CDP template, you can leverage DFIC (Dataflow Instance Context) information to reference the variables:
use DFIC_dfiid to retrieve the unique identifier for the DFIC instance.
use DFIC_SYS* to retrieve DFIC system attributes.
use DFIC_USR* to retrieve DFIC user attributes.
CDP templates are written with the Freemarker v. 2.3.20 syntax.
Here is the supported syntax:
DFIID
'${DFIC_dfiid!"UNDEFINED"}'
${DFIC_dfiid!"UNDEFINED"}
DFIC_dfiid='d569s44b-091q-512n-056i-1e8t6lw878pr'
DFIC system attributes
'${DFIC_SYS["<original_attribute_name>"]!"UNDEFINED"}'
${DFIC_SYS["original-filename"]!"UNDEFINED"}
ASCII_OToWIN_ffhf8o3f.txt
DFIC user attributes
'${DFIC_USR["<user_attribute_name>"]!"UNDEFINED"}'
where <user_attribute_name> is the name of the user attribute you want to retrieve.
${DFIC_USR["user-location"]!"UNDEFINED"}
milan-italy
π Correct management of Connect:Direct process in status HOLD
When Connect:Direct detects a transfer problem (e.g., an inactive partner), the operation to be performed at the end of the retry attempts is configured in the Connect:Direct netmap.cfg file. The operation to be performed can be either to delete or to hold:
If
deleteis set, the process is deleted, and a record with the identifier PERR is issued in the statistics. Data One intercepts this record and acts accordingly, setting the transfer to FAILED.If
holdis set, the process is not deleted and set to HOLD. Data One intercepts this status and, when the set timeout expires, sets the transfer to FAILED. If a process in HOLD is restarted in Connect:Direct (even after a long time), a mismatch between Connect:Direct and Data One could occur. To avoid the mismatch, a hold timeout can be set in DMCFG ext_cfg manually (see How to modify DMCFG and deploy it for details):connect.direct.hold.timeout.sec=<seconds>connect.direct.hold.delete=true|false
The addition and tuning of these parameters depend on the client's environment and system policies.
connect.direct.hold.timeout.sec=<seconds>
It sets the number of seconds after which Data One considers a transfer failed.
Values:
0 / not defined / default: wait forever.
> 0: seconds after which Data One considers a transfer failed.
connect.direct.hold.delete=true|false
It is evaluated only if connect.direct.hold.timeout.sec is set to a value higher than 0.
Values:
true: when the Connect:Direct process is restarted during the timeout, the Data One transfer will also be restarted. If the timeout expires and the process is still on HOLD, the Data One transfer will be set to FAILED and the Connect:Direct process will be deleted.
false (default): after the transfer is declared FAILED, the process in Connect:Direct is left in HOLD.
Last updated