tibco perl directory named initiation (dni) installation ... · introduction directory named...

38
TIBCO ® Perl Directory Named Initiation (DNI) Installation and Operations Guide Software Release 8.0 July 2017 Two-Second Advantage ®

Upload: vuongliem

Post on 23-Aug-2019

241 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

TIBCO® Perl Directory Named Initiation (DNI)Installation and Operations GuideSoftware Release 8.0July 2017

Two-Second Advantage®

Page 2: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Important Information

SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCHEMBEDDED OR BUNDLED TIBCO SOFTWARE IS SOLELY TO ENABLE THE FUNCTIONALITY (ORPROVIDE LIMITED ADD-ON FUNCTIONALITY) OF THE LICENSED TIBCO SOFTWARE. THEEMBEDDED OR BUNDLED SOFTWARE IS NOT LICENSED TO BE USED OR ACCESSED BY ANYOTHER TIBCO SOFTWARE OR FOR ANY OTHER PURPOSE.

USE OF TIBCO SOFTWARE AND THIS DOCUMENT IS SUBJECT TO THE TERMS ANDCONDITIONS OF A LICENSE AGREEMENT FOUND IN EITHER A SEPARATELY EXECUTEDSOFTWARE LICENSE AGREEMENT, OR, IF THERE IS NO SUCH SEPARATE AGREEMENT, THECLICKWRAP END USER LICENSE AGREEMENT WHICH IS DISPLAYED DURING DOWNLOADOR INSTALLATION OF THE SOFTWARE (AND WHICH IS DUPLICATED IN THE LICENSE FILE)OR IF THERE IS NO SUCH SOFTWARE LICENSE AGREEMENT OR CLICKWRAP END USERLICENSE AGREEMENT, THE LICENSE(S) LOCATED IN THE “LICENSE” FILE(S) OF THESOFTWARE. USE OF THIS DOCUMENT IS SUBJECT TO THOSE TERMS AND CONDITIONS, ANDYOUR USE HEREOF SHALL CONSTITUTE ACCEPTANCE OF AND AN AGREEMENT TO BEBOUND BY THE SAME.

This document contains confidential information that is subject to U.S. and international copyright lawsand treaties. No part of this document may be reproduced in any form without the writtenauthorization of TIBCO Software Inc.

TIBCO, The Power of Now, TIBCO Managed File Transfer, TIBCO Managed File Transfer CommandCenter, TIBCO Managed File Transfer Internet Server, TIBCO Managed File Transfer Platform Server,TIBCO Managed File Transfer Platform Server Agent, and Slingshot are either registered trademarks ortrademarks of TIBCO Software Inc. or its subsidiaries in the United States and/or other countries.

Enterprise Java Beans (EJB), Java Platform Enterprise Edition (Java EE), Java 2 Platform EnterpriseEdition (J2EE), and all Java-based trademarks and logos are trademarks or registered trademarks ofOracle Corporation in the U.S. and other countries.

All other product and company names and marks mentioned in this document are the property of theirrespective owners and are mentioned for identification purposes only.

THIS SOFTWARE MAY BE AVAILABLE ON MULTIPLE OPERATING SYSTEMS. HOWEVER, NOTALL OPERATING SYSTEM PLATFORMS FOR A SPECIFIC SOFTWARE VERSION ARE RELEASEDAT THE SAME TIME. SEE THE README FILE FOR THE AVAILABILITY OF THIS SOFTWAREVERSION ON A SPECIFIC OPERATING SYSTEM PLATFORM.

THIS DOCUMENT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.

THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICALERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESECHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THIS DOCUMENT. TIBCOSOFTWARE INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S)AND/OR THE PROGRAM(S) DESCRIBED IN THIS DOCUMENT AT ANY TIME.

THE CONTENTS OF THIS DOCUMENT MAY BE MODIFIED AND/OR QUALIFIED, DIRECTLY ORINDIRECTLY, BY OTHER DOCUMENTATION WHICH ACCOMPANIES THIS SOFTWARE,INCLUDING BUT NOT LIMITED TO ANY RELEASE NOTES AND "READ ME" FILES.

TIBCO® Managed File Transfer Internet Server with RocketStream® Accelerator is entitled TIBCO®

Managed File Transfer Internet Server in certain other product documentation and in user interfaces ofthe product.

Copyright © 2003-2017 TIBCO Software Inc. All rights reserved.

TIBCO Software Inc. Confidential Information

2

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 3: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Contents

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

DNI Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5

DNI Transfers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

DNI Help Screens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

DNI Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8

Running the DNI Perl Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Changing the Debug Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Configuring the DNI Daemon for Command Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12

DNI Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

DNI Template Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

DNI Send Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

DNI Receive Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

FTP Receive Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Common Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Transfer File Disposition Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Transfer File Disposition Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Scan Schedule Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Miscellaneous Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21

Encrypting a DNI Template Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

DNI Tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Configuring DNI Management for Command Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

DNIUtility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

DNIUtility Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36

DNIUtility Command Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Executing the DNIUtility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

3

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 4: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Introduction

Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that havebeen placed within a directory and/or sub directories and automatically transfer those files to one ormore targeted MFT Platform Server remote systems.

When you set up a DNI transfer, MFT Platform Server scans a pre-defined local or remote directory at auser-defined interval. It returns and saves a list of all files in that directory. Any files that have changedbetween the scans are eligible to be transferred. Since there is no standardized way of locking files onUNIX, this is how MFT Platform Server can tell whether the file is in use or not. When a file transfer iscomplete, DNI allows you to delete the original file, move it to a new directory, or leave the file where itis.

DNI has many uses. For example:

● Copy entire directory structures from one system to another. You can tell MFT Platform Server DNIto copy all files from SystemA to SystemB and create the same directory structure that exists onSystemA on SystemB using the LocalFileName token. In this example, the DNI template onSystemA can be configured with the PPA SuccessAction set to "leave", the write mode set to CRNand SubDirectory parameter set to Yes for the directory structure to be created.

It is important that the DNI is only from SystemA to SystemB. A second DNI configuredsimilarly to copy from SystemB to SystemA could create an infinite loop.

● Copy files to another MFT Platform Server computer. As DNI detects that a file on SystemA haschanged, DNI sends the file to SystemB. In this case when the transfer has completed, you can movethe file to a backup directory, or delete the file.

● Execute any UNIX or Windows command based on the existence of a file. As DNI detects that a fileon SystemA has changed, DNI executes a pre-defined command. This command can includeinformation on the local file that was the source of the DNI request. It is up to the DNIAdministrator to define the actual command that is executed.

● Use DNI to send files to, or receive files from, an MFT Internet Server. The MFT Internet Server cantransfer files with remote servers using open protocols like: SFTP, FTP, FTPS, AS2, ...

4

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 5: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

DNI Requirements

DNI processing is done using a Perl script called dni. To support DNI, your system must have a versionof Perl installed.

The Perl program directory should be defined in the PATH environment variable. If you do not havePerl installed on your computer, it can be downloaded for free from web site: www.perl.org.

The MFT Platform Server DNI Perl script runs on both Windows and UNIX platforms. DNI templatesare provided for both platforms. The Perl DNI templates for the Windows platform do not work withor complement the MFT Platform Server for Windows (GUI) DNI feature in any way. For informationusing MFT Platform Server for Windows (GUI) DNI, please refer to the MFT Platform Server for Windowsdocumentation.

5

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 6: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

DNI Transfers

Transfer requests that can be processed using DNI are: DNI Send, DNI Receive, and DNI FTP Receive.

DNI Send

DNI Send reads the defined directory and executes a Send command when it detects an existing file.

DNI Receive

DNI Receive sends a request to the partner to list files in the defined directory and executes a Receivecommand when it detects an existing file.

DNI FTP Receive

DNI FTP Receive issues an FTP Directory request to the partner Server and executes an FTP GETcommand when it detects an existing file.

6

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 7: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

DNI Help Screens

There are help screens that give information on how the MFT Platform Server DNI script can be used.The help screens can be viewed by entering the following commands:

Command Description

perl dni help Provides general help information

perl dni help template Provides template configuration information

perl dni help tokens Provides substitutable token information

perl dni help encrypt Creates an encryption $(Password) token

perl DNIDaemon.pl help Manages DNI Daemons for MFT CommandCenter information

perl DNIUtility.pl help Provides command-line utility information

7

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 8: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

DNI Installation

DNI is distributed as a tar file called dni.tar.

● On a UNIX platform, the dni.tar file is located in the MFT Platform Server Install/dnidirectory.

● On a Windows platform, the dni.tar file is located in the MFT Platform Server Installdirectory.

● It is distributed with the MFT Internet Server and MFT Command Center products in the <MFT-Install>/distribution/dni directory.

To extract the files on a UNIX platform, execute the following tar command:

tar xvf dni.tar

To extract the files on a Windows platform, use a file extension utility, such as WinZip or 7-Zip.

Upon successful execution of this command, you find files both in the rootdirectory and in thetemplates directory.

You find the following files in the root directory:

File Name Description

dni The MFT Platform Server DNI Perl script program.

DNIConfig.cfg The configuration file which contains the settings to be used by theMFT Command Center DNI perl script program.

DNIDaemon.pl The MFT Command Center DNI perl script program.

DNIUtility.pl The command-line utility that can start or stop a template, stop alltemplates, start or stop the DNI Daemon.

Perl Directory NamedInitiation (DNI) Installationand Operations Guide.pdf

Installation and Operations guide to install and operate the PerlDNI program.

You will also find the following five directories:

1. temp: Directory used to hold temporary files for DNI Receive.

2. logs: Directory used to store the log file output.

3. leave: Directory where the leave files are saved.

4. templates: Directory where template files are located.

5. audit: Directory where audit files are saved when pDNI is confiured to write audit files.

You find following files in the templates directory:

File Name Description

dnitemplate.psend The DNI template for UNIX DNI Send via MFT Platform Server Agent.

8

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 9: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

File Name Description

dnitemplate.send The DNI template for UNIX DNI Send via MFT Platform Server forUNIX.

dnitemplate.recv The DNI template for UNIX DNI receive via MFT Platform Server forUNIX.

dnitemplate.recvftp The DNI template for UNIX DNI receive via FTP.

dnitemplate.wsend The DNI template for Windows DNI Send via MFT Platform Server forWindows.

dnitemplate.wrecv The DNI template for Windows DNI receive via MFT Platform Serverfor Windows.

dnitemplate.wrecvftp The DNI template for Windows DNI receive via FTP.

Given below are the template rules:

● Any data in a line after the # is a comment.

● If a line consists of all blanks, the line is ignored.

● All parameters are in the format of xxx: yyy, where xxx is the parameter name and yyy is theparameter value. There must be a blank space between the parameter name and the parametervalue.

● Parameter names and values are not case sensitive, although we suggest leaving them mixed casefor easier reading.

● The LocalFileName (lf) and RemoteFileName (rf) parameters must be specified in the DNItemplate. If you specify a transfer template in your DNI template, the LocalFileName (lf) andRemoteFileName (rf) parameters defined in the DNI template override these values defined in atransfer template.

● The use of Distribution lists (the Platform Server list parameter) is not recommended for use in DNI.This is because if any transfer defined in the distribution list fails, the entire send fails. Based on thedefined failure option, this may cause the entire distribution list to be retransmitted.

9

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 10: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Running the DNI Perl Script

● Use the following command to execute the DNI Perl script:

perl dni t:dnitemplatename {optional parameters}

If dnitemplatename is not in the current working directory, specify a fully qualified name.

The table lists the DNI script optional parameters.

Parameter Description

cold The "cold" parameter bypasses the reading of the Leave file that contains the listof files already transferred that is saved when the SuccessAction and/orFailureAction is set to "leave". As such, DNI transfers any file in the scandirectory when the script is started. This option should be used with great care.

This parameter overrides the start parameter in the MFT PlatformServer template.

warm This "warm" parameter is only used when a DNI SuccessAction or FailureActionis defined as "Leave". Due to this, DNI keeps track of files that have beentransferred and stores the information in a file. The warm parameter tells DNI toread the "Leave" file at start up and process the files normally as if MFT PlatformServer did not come down. This makes sure that a file is not transferred multipletimes by mistake. (This is the default when no option is set.)

This parameter overrides the start parameter in the MFT PlatformServer template.

hot When defined, DNI adds all files detected on the first directory scan to the Leavefile. Therefore the contents of the directory when DNI is started are nottransferred. Note that a Hot start creates the Leave file with the contents of thedirectory after the first scan. If DNI Receive is unable to get this list from theremote system due to a network error, then Hot start processing is notperformed.

This parameter overrides the start parameter in the MFT PlatformServer template.

debugon Turns on DNI debugging. This parameter overrides the debug parameter in theMFT Platform Server template. This parameter should only be used wheninstructed to do so by TIBCO Technical Support.

To toggle from debugon to debugoff, see Changing the Debug Setting

debugoff Turns off DNI debugging. This parameter overrides the debug parameter in theMFT Platform Server template. This parameter should only be used wheninstructed to do so by TIBCO Technical Support.

To toggle from debugoff to debugon, see Changing the Debug Setting

version (-v) This parameter displays the dni version and PTF level.

10

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 11: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Changing the Debug Setting

A new signal UNIX-USR1 is provided to toggle the "dni" script between debugon and debugoff.

● Use the following command to toggle the debug setting.kill -USR1 pid

This command can only be used for the "dni" script. It should not be used on theDNIDaemon.pl or DNIUtility.pl scripts.

11

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 12: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Configuring the DNI Daemon for Command Center

In MFT Command Center, you can configure the DNI Daemon through the Add Server page or theUpdate Server page.

To make changes in the Add Server page, you must have AdministratorRight or UpdateServerRight.

Procedure

1. In MFT Command Center, click Servers > Add Server.

The Add Server page opens.

2. In the Management Options > Platform Server Management Option subsection, define the DNIManagement User Id and the DNI Management Password fields.

12

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 13: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

DNI Template

Each DNI template is divided into sections, DNI transfer information, Post Processing Actions, andDNI Scan Schedule.

The DNI transfer information section defines the directory to be scanned and what command is to beexecuted when a file is found in that directory. The sample shown below is this section of thednitemplate.send template.# Sample Platform Server for UNIX SEND template# Define DNI transfer information:# LocalDirectory Local Directory to scan for files# DNICommand Command to execute when file is detected# PreTransferCommand Command to execute before executing the DNICommand# PreTransferSuccessAction: Action to take on successful PreTransferCommand (RC=0)# PreTransferNetworkErrorAction: Action to take on PreTransferCommand Network Error (RC>0 and <=4)# PreTransferFailureAction: Action to take on PreTransferCommand Failure (RC>4)# SubDirectory Defines if subdirectory scanning is on (Yes) or off (No)# FileFilter Limits files selected to file names matching the Filter# DirectoryREGEX Limits directories selected to directory names matching the REGEX# FileREGEX Limits files selected to file names matching the REGEX# StartDate Limits files selected to files with ModifyDate >= StartDate# LeaveRetention Same as StartDate but this defines the number of days retained and is recomputed when the date changes# Valid DNI Tokens for DNICommand, PreTransferCommand, SuccessFile and FailureFile# $(YYYYMMDD) ==> Current Gregorian date in format YYYYMMDD# $(YYMMDD) ==> Current Gregorian date in format YYMMDD# $(YYYYDDD) ==> Current Julian date in format YYYYDDD# $(YYDDD) ==> Current Julian date in format YYDDD# $(YYYY) ==> Current Year in format YYYY# $(MM) ==> Current Month of Year in format MM# $(DD) ==> Current Day of Month in format DD# $(HHMMSS) ==> Current Time in format HHMMSS# $(HH24) ==> Current Hours in 24 hour format HH# $(MI) ==> Current Minutes in format MM# $(SS) ==> Current Minutes in format SS# $(LocalFile) ==> Local File name without Path Name# $(LocalFileBase) ==> Local File name without Extension and Path Name# $(LocalFileExt) ==> Local File name extension (after last .)# $(LocalFileName) ==> Local File name with Path Name# $(LocalFilePath) ==> Local File Path Name# $(LocalHLQ) ==> Local File Name High Level Qualifier# $(LocalNoHLQ) ==> Local File Name without High Level Qualifier# $(LocalFilePathLDir)==> Local File Path leftmost directory name# $(LocalFilePathRDir)==> Local File Path rightmost directory name# $(D01) ==> $(D16) ==> Directory names: left to right, 1 to 16# $(F01) ==> $(F16) ==> File names: left to right, 1 to 16# $(SubDir) ==> Subdirectory name without leading /LocalDirectory: /DNI/Files/ DNICommand: cfsend t:cftemplate lf:"$(LocalFileName)" rf:"/DNI/Target/$(LocalFile)" sm:y#PreTransferCommand: ***Add the command to execute***#PreTransferSuccessAction: Retry#PreTransferNetworkErrorAction: Retry#PreTransferFailureAction: ContinueSubDirectory: No# Note that FileFilter and FileREGEX are mutually exclusive#FileFilter: tes*.txt#FileREGEX: ^tes.*\.txt$#DirectoryREGEX: ^.*(\\|\/)output(\\|\/|\Z).*$#StartDate: 20150101#LeaveRetention: 30

The sample templates include a list of supported DNI tokens for the transfer type beingconfigured.DNI.

13

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 14: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

DNI Template Parameters

The parameters of the DNI template are described under these sections.

● DNI Send Parameters

● DNI Receive Parameters

● FTP Receive Parameters

● Common Parameters

● Transfer File Disposition Options

● Transfer File Disposition Parameters

● DNI Scan Schedule Parameters

● Miscellaneous Parameters

DNI Send ParametersThe table lists and describes the DNI Send parameters.

Parameter Description

LocalDirectory Used in the DNI Send template. Defines the local directory thatDNI scans to see if there are any files. DNI reads all normal filesfrom this directory. If the SubDirectory parameter is defined as"Yes", then DNI will also read normal files from all subdirectories.DNI Tokens can be used to customize this parameter.

This parameter is supported only for DNI Send.

DNICommand Defines the command that DNI executes when a file is detected.The default is to execute cfsend for DNI Send and cfrecv for DNIReceive command.

The default DNICommand defined in the template has DNI tokenssuch as $(LocalFileName) and $(LocalFile). These tokens aredefined in the section "DNI Tokens". This command can becustomized to add as many parameters as needed. An alternateway is to define all file transfer commands within the template. Butthe local and remote file parameters must be defined on theDNICommand parameter.

Also see: Encrypting a DNI Template Password

Also see: Common Parameters

14

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 15: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

DNI Receive ParametersThe table lists and describes the DNI Receive parameters.

Parameter Description

RemoteDirectory Used in the DNI Receive template. It defines the remote directorythat DNI scans to see if there are any files. DNI sends a command tothe remote system to read all normal files in this directory. If thesub directory parameter is defined as "Yes", then DNI reads allnormal files from all subdirectories.

RemoteCommand The command is executed to retrieve the list of files from thepartner Platform Server or Internet Server. You must define theconnectivity information to connect to this machine (use the sameconnectivity information that is in the DNICommand parameter).pDNI will add the parameters that define the directory to scan forfiles.

DNICommand Defines the command that DNI executes when a file is detected.The default is to execute a cfsend for DNI Send and cfrecv for DNIReceive command.

The default DNICommand defined in the template has DNI tokenssuch as $(LocalFileName) and $(LocalFile). These tokens aredefined in the section "DNI Tokens". This command can becustomized to add as many parameters as needed. An alternateway is to define all file transfer commands within the template. Butthe local and remote file parameters must be defined on theDNICommand parameter.

Also see: Encrypting a DNI Template Password

Also see: Common Parameters

FTP Receive ParametersThe table lists and describes the FTP Receive parameters.

Parameter Description

FTPHost FTP host name

FTPPort FTP port number

FTPUser FTP user id

FTPPassword FTP password

FTPPasswordEncrypted FTP password encrypted

FTPRemoteDirectory FTP server directory

15

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 16: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Parameter Description

FTPLocalDirectory Local directory to write files

FTPSlash Defines slash that FTP uses (/ or \)

FTPActivePassive Defines whether to use Active or Passive FTP

FTPSubdirCount Defines the number of subdirectories to scan

Also see: Common Parameters

Common ParametersSome parameters are common for DNI Send, DNI Receive, and FTP Receive. The table lists anddescribes the common parameters.

Parameter Description

PreTransferCommand Defines the command to execute before executing the file transfer.When this parameter is defined, the following parameters must alsobe defined:

: PreTransferSuccessAction

: PreTransferNetworkErrorAction

: PreTransferFailureAction

These parameters define the action that should be taken based onthe return code from the PreTransferCommand.

This parameter is not supported for FTP Receive

PreTransferSuccessAction Defines the action to be taken when the PreTransfer commandexecutes successfully ( i.e. Return Code=0) Valid actions are:

: Continue: Process the file transfer

: Retry: Bypass the transfer and retry at the next transfer interval

PreTransferNetworkErrorAction

Defines the action to be taken when the PreTransfer command failswith a network error ( i.e. Return Code > 0 and <= 4) Valid actionsare:

: Continue: Process the file transfer

: Retry: Bypass the transfer and retry at the next transfer interval

PreTransferFaiureAction Defines the action to be taken when the PreTransfer command failswith a permanent error ( i.e. Return Code > 4) Valid actions are:

: Continue: Process the file transfer

: Retry: Bypass the transfer and retry at the next transfer interval

16

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 17: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Parameter Description

SubDirectory Defines whether subdirectories are scanned for files. The defaultvalue of "No" indicates that subdirectories are not scanned for files,while specifying "Yes" will cause DNI to scan all subdirectories forfiles.

FileFilter Setting this parameter allows a user to limit the files selected to betransferred based on the file name. FileFilter supports the wildcardcharacters * and ?.

Note:

● Filters run on UNIX platforms are case sensitive

● Filters run on Windows platforms are case insensitive

● DNI Receive filters are always case insensitive

● FileFilter is mutually exclusive with FileREGEX

Example file filter: tes*.txt

You should use the FileREGEX parameter to filter files.This parameter was left in for compatibility with olderreleases.

StartDate Defines the start date for files to be selected. All files that have aDate Last Modified before this date will not be transferred. Entriesin the leavefile with older Date Last Modified will be removed. Ifthis parameter is not defined, the file date will not be checked whendetermining the files that should be transferred or removed fromthe leavefile. The format for this field is: YYYYMMDD

Use LeaveRetention parameter instead of StartDateparameter as the LeaveRetention parameter computesthe StartDate dynamically at startup and when the datechanges.

LeaveRetention This parameter is similar to the StartDate parameter except that itcomputes the start date based on the number of days defined in theLeaveRetention parameter. Each day when the date changes theentries in the leavefile with older dates are removed. Note: Thisparameter is ignored on FTP Receive.

17

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 18: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Parameter Description

FileREGEX Limits files selected to the file names matching the REGEX.

Setting this parameter allows a user to limit the files selected to betransferred based on the file name. This parameter uses standardREGEX patterns to filter files.

Note:

● Filters that run on UNIX patterns are case sensitive

● Filters that run on Windows patterns are case insensitive

● DNI Receive patterns are always case insensitive

● FileREGEX is mutually exclusive with FileFilters

Example file filter: ^tes.*\.txt$

DirectoryREGEX Limits directories selected to directory names matching the REGEX.

Setting this parameter allows the user to limit the directories thatwill be scanned based on the directory name.

For Example, say you had the following directory structure:

/data/customer1/input

/data/customer1/output

/data/customer2/input

/data/customer2/output

You want to have a single DNI that processed the /data directorybut only wanted to process the "output" sub directories. You woulduse the DirectoryREGEX parameter so that only the directories withthe "output" were included. Other directories would not bescanned.

This parameter uses standard REGEX patterns to filter directories.

Note:

● Filters that run on UNIX patterns are case sensitive

● Filters that run on Windows patterns are case insensitive

● DNI Receive patterns are always case insensitive

● FileREGEX is mutually exclusive with FileFilters

Example file filter: ^.*(\\|\/)output(\\|\/|\Z).*$

Transfer File Disposition OptionsThe table lists and describes the disposition options or postaction parameter values.

Parameter Description

Leave The file remains in the directory. Internal tables are updated so the transfer is notexecuted again until the file size or date/time modified changes.

18

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 19: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Parameter Description

Move The file is moved to the directory defined by the SuccessFile, FailureFile orNetworkErrorFile parameters.

Delete The file is deleted.

Retry The file remains in the current directory and the transfer is retried at the next scaninterval.

Transfer File Disposition ParametersThe Transfer File Disposition section of the DNI template is used to configure what happens after theDNI transfer.

The example shown here is from the dnitemplate.send.# Transfer File Disposition:# SuccessAction Valid SuccessAction: leave, move, delete# SuccessFile Required if SuccessAction:Move - Defines Target File Name for move# FailureAction Valid values: leave, move, retry# FailureFile Required if FailureAction:Move - Defines Target File Name for move# NetworkErrorAction Valid values: leave, move, retry# NetworkErrorFile Required if NetworkErrorAction:Move - Defines Target File Namefor moveSuccessAction: moveSuccessFile: /DNI/Success/$(LocalFile).$(YYYYMMDD).$(HHMMSS)FailureAction: retryFailureFile: /DNI/Failure/$(LocalFile).$(YYYYDDD).$(HHMMSS)NetworkErrorAction: retryNetworkErrorFile: /DNI/Failure/$(LocalFile).$(YYYYDDD).$(HHMMSS)

The table lists the transfer file disposition parameters in the DNI template.

Parameter Description

SuccessAction Defines what is done with the file when the DNICommand is executedsuccessfully. Valid values: leave | move | delete

Note: It is best practice to define the DNI disposition as move or delete, asthis reduces overhead associated with managing the leave file and clearlyidentifies which files are pending transfer versus failed.

SuccessFile This parameter is only used when SuccessAction is defined as "move". Itdefines the fully qualified name of the target file for the move commandexecuted as a result of a successful DNICommand execution. You can useDNI tokens to customize the SuccessFile name. DNI Tokens can be used tocustomize this parameter.

FailureAction Defines what is done with the file when the DNICommand fails with apermanent error. Valid values: leave | move | retry

19

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 20: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Parameter Description

FailureFile This parameter is only used when FailureAction is defined as "move". Itdefines the fully qualified name of the target file for the move commandexecuted as a result of an unsuccessful DNICommand execution. You canuse DNI templates to customize the FailureFile name. DNI Tokens can beused to customize this parameter.

NetworkErrorAction Defines what is done with the file when the DNICommand fails due to anetwork error. Valid values: leave | move | retry

(Most applications set the parameter to "Retry" so the file transfer is retriedif a network error occurs.)

NetworkFile This parameter is only used when NetworkErrorAction is defined as"move". It defines the fully qualified name of the target file for the movecommand executed as a result of an unsuccessful DNICommand execution.You can use DNI templates to customize the NetworkFile name.

SuccessAction or FailureAction, Leave keeps copies of the directory entry for each file that has eithertransferred successfully or has failed. If you transfer many different files (over 10,000) then the memoryrequirements of the in-storage copy of the LeaveFile can get very high. That is why we suggest using"move" or "delete" as the SuccessDisposition.

Scan Schedule ParametersThe DNI Scan Schedule section allows you to define the times of each day that DNI scans theLocalDirectory (DNI Send) or RemoteDirectory (DNI recv) for files.

The days of the week must be defined using the English spelling. For example:Sunday: 0000:2359

The default is set to look for for files all day. You can define multiple records for each day to allowpDNI to scan for files only during the defined intervals. Note that the defined intervals are checked forscanning files only. It is possible for a file scan to fall within the defined intervals, but the transfer canexecute outside of the defined intervals.# DNI Scan Schedule:# Each day can be defined with a Start and Stop time in the format:# Day: HHMM:hhmm# Where Day is any day of a week from Sunday through Saturday.# HHMM is the start time from 0000 to 2359# hhmm is the stop time from 0000 to 2359# Note that the English spelling of these names is required.# These times determine when DNI scans the LocalDirectory for files.# To turn off scanning for a day, specify 0000:0000

Sunday: 0000:2359Monday: 0000:2359Tuesday: 0000:2359Wednesday: 0000:2359Thursday: 0000:2359Friday: 0000:2359Saturday: 0000:2359

The table lists and describes the scan schedule parameters in the DNI template.

You can define multiple start:end times for the same day. Put each start:end on a separate line.

20

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 21: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Parameter Description

Day Day is any day of the week from Sunday through Saturday.

HHMM Start time is from 0000 to 2359.

hhmm Stop time is from 0000 to 2359.

Miscellaneous ParametersThe last section of the DNI template shows additional parameters you can configure.# Miscellaneous parameters:#ScanInterval: Defines the number of minutes between directory scans#MultipleFileScans: Defines whether multiple files scans will be done to ensure that the file has not been changed.#MaxConcurrent: Defines number of concurrent transfers (1 to 16)#TokenEscapeCharacters: Defines the characters that will be escaped when building the command to execute.#FileOrder: Defines the order that transfers are executed#AutoEnable: Defines whether this template will be started at DNIDaemon initialization.#LeaveFileName: Defines Unique name of file when SuccessAction:Leave#PostActionFail: Defines action when a post action move or delete fails#AuditDirectory: Defines the directory where pDNI Audit logs are written#Start: Defines Start action when Action Leave is defined. Valid values are: Warm (default), Cold, Hot#Debug: Defines whether DNI debugging is on (Yes) or off (No)ScanInterval: 5MaxConcurrent: 1#TokenEscapeCharacters: "`$#FileOrder: Uncomment one line to sort the eligible transfer requests# By default, no sorting is done on eligible transfer requests#FileOrder: AscendingDate#FileOrder: DescendingDate#FileOrder: AscendingSize#FileOrder: DescendingSize#FileOrder: AscendingFileName#FileOrder: DescendingFileName#FileOrder: AscendingDirNameFileName#FileOrder: DescendingDirNameFileNameAutoEnable: NoLeaveFileName: ./leavefile.001PostActionFail: Ignore#AuditDirectory: ./Audit Start: WarmDebug: No

The table lists and describes the miscellaneous parameters in the DNI template.

21

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 22: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Parameter Description

ScanInterval Defines the number of minutes between scans of the LocalDirectory. Thedefault value is 10 minutes. The processing of this value depends onwhether DNI Send or DNI Receive is being executed:

DNI Send waits this interval between scans of the directory. By default,DNI Send makes sure that a file has not been updated within thisamount of time before it processes the DNICommand for that file. If afile has been changed in that interval, then DNI will not process the file.Since the file cannot be locked, this is how MFT Platform Server can tellwhether the file is in use or not. Use the MultipleFileScans parameterto define whether DNI Send waits for an interval to make sure that a filehas not been updated

DNI Receive waits this interval between scans. By default, it does notperform the same checking as DNI Send to see if a file has beenmodified within an interval. It will initiate a transfer as soon as it detectsthat a file has been modified. Use the MultipleFileScans parameter todefine whether DNI Receive waits for an interval to make sure that a filehas not been updated

For testing, you may want to use the minimum value of 1. Forproduction, unless the timeliness of the files is critical, a higher value isusually appropriate.

MultipleFileScans Defines whether multiple file scans are performed. Valid options are:

● Yes: Perform muliple file scans.

Files are not transferred until the File Size and Date/TimeModified are same across two scans.

● No: Perform a single file scan.

Files are tranferred as soon as the file is detected.

To retain compatibility with prior versions, below are the default valuesif this parameter is not defined:

● The default for a Send operation is ' Yes'.

● The default for a Receive operation is 'No'.

MaxConcurrent Defines how many threads will be created for DNI transfer requests.Valid values 1 - 16. Default value is 1.

22

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 23: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Parameter Description

TokenEscapeCharacters Defines the characters in token fields that should be escaped. The escapecharacters used depends on whether fields are delimited double quotes,single quotes or no quotes. Suggested values for UNIX are:

: Single Quotes: '$

: No Quotes: "'` $&

If you include a space, it must be in the middle of otherescape characters.

Escaping ' when using single quotes does not work. Wesuggest using " or no delimiters around fields with tokens.

EncodeDirectoryList Defines whether Directory Receive transfers should request that thetransfer partner base64 encode the data returned by the directory listrequest.

This parameter should be used if you are transferring fileswith special characters such as double-byte characters.

Valid values are Yes and No. The default is No.

Yes: Requests that the partner base64 encode directory list data.

No: Directory list data are not encoded.

Set this parameter to "Y" when files have non-standard ASCII charactersin the file name.

This parameter requires that the transfer partner supports encoding. Ifthe transfer partner does not support encoding, pDNI detects it andprocesses the data as if not encoded.

23

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 24: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Parameter Description

FileOrder Use to sort the files in the order you want the files to be transferred.Only one should be set per template. By default no sorting is done onthe files to be transferred. Valid values are:

● AscendingDate: Files are arranged as per the ascending order of thedates on which files are created.

● DescendingDate: Files are arranged as per the descending order ofthe dates on which files are created.

● AscendingSize: Files are arranged as per the ascending order of thesize of files.

● DescendingSize: Files are arranged as per the descending order ofthe size of files.

● AscendingFileName: Files are arranged as per the alphabetical orderstarting from A through Z.

● DescendingFileName: Files are arranged as per the alphabeticalorder starting from Z through A.

● AscendingDirNameFileName: Directory file names are arranged asper the alphabetical order starting from A through Z.

● DescendingDirNameFileName: Directory file names are arranged asper the alphabetical order starting from Z through A.

FileOrder parameter is not supported for FTP Receive.

AutoEnable This parameter controls if this dni template will be started automaticallywhen DNI templates are being managed by MFT Command Center.

Valid values are Yes and No.

Yes: The template is started when the DNIDaemon.pl is started.

No: The template is not started when the DNIDaemon.pl is started

LeaveFileName Defines the unique name of the leave file where DNI saves informationabout the DNICommand requests that have completed successfully.This file is only required when SuccessAction is defined as "leave". Ifyou have multiple scripts running with SuccessAction "leave" then thisfile MUST be unique across all executions of DNI. This file is used tosave the LeaveFile information across different executions of DNI. IfDNI comes down, or the system is booted, then DNI reads theinformation from the LeaveFile so that the DNICommand is notexecuted multiple times.

If not defined, the default is leave/templatename.leave

An '*' in the LeaveFIleName is replaced with the templatename.

24

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 25: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Parameter Description

PostActionFail Creates a leave file to record file names if the dispositions:SuccessAction, FailureAction or NetworkErrorAction fail to take place.This allows files that have been sent out successful to remote locationsnot to be sent out multiple times. Default value: Ignore. Valid values:Ignore, Leave

AuditDirectory Enable this parameter when you need to have an Audit file generatedthat contains details on each transaction that takes place with thetemplate.

Start Designed to give the Command Center Administrators the ability tostart the dni template with a warm, cold or hot start.

Cold - The "Cold" parameter bypasses the reading of the Leave file thatcontains the list of files already transferred that is saved when theSuccessAction and/or FailureAction is set to "leave". As such, DNItransfers any file in the scan directory when the script is started. Thisparameter should be used with great care.

Warm - This parameter is used when a DNI SuccessAction orFailureAction is defined as Leave. Due to this DNI keeps track of filesthat have been transferred and stores the information in a file. The warmoption tells DNI to read the "Leave" file and at start up and process thefiles normally as if MFT Platform Server did not come down. Thismakes sure that a file is not transferred multiple times by mistake. (Thisis the default when no option is set.)

Hot - When defined, DNI will add all files detected on the first directoryscan to the "Leave" file. Therefore the contents of the directory whenDNI is started is not transferred. Note that a Hot start creates the"Leave" file with the contents of the directory after the first scan. If DNIReceive is unable to get this list from the remote system due to anetwork error, then Hot start processing is not performed.

Debug Defines whether DNI debugging is turned on. This parameter shouldonly be set when instructed to do so by TIBCO Technical Support.

Valid values are "Yes" and "No".

Yes: Debugging is turned on.

No: Debugging is not turned on.

The Command Line Debug parameter overrides this setting.To toggle between debugon and debugoff, see Changing theDebug setting during execution.

TempDirectory It is used only by DNI Receive. It defines the name of a directory whereDNI saves temporary files. DNI must be able to create and read files inthis directory. This parameter is relative to the current workingdirectory.

25

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 26: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Parameter Description

EncryptedPassword This parameter is seen when the perl dni encrypt command has beenrun against the dnitemplate in order to encrypt the remote user'spassword that is associated with the dni template.

RecvIgnoreSizeChange Tells MFT to ignore file size changes for receive requests. This parametershould only be used when files are created but never modified. Thisparameter was created to resolve an issue receiving tape or migrateddisk files from zOS. Valid values are "No" or "Yes". The default is "No".

RecvIgnoreTimeChange Tells MFT to ignore file time changes for receive requests. Thisparameter should only be used when files are created but nevermodified. This parameter was created to resolve an issue receiving tapeor migrated disk files from zOS. Valid values are "No" or "Yes". Thedefault is "No".

26

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 27: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Encrypting a DNI Template Password

To perform a DNI transfer request to a remote platform, a remote user id and password is required.When the remote password is used in the DNICommand field within a DNI template, this password isdisplayed in clear text. For some environments this may not be acceptable. To encrypt the passwordbeing used for a DNI template, the perl dni encrypt command can be used. When the password isencrypted, the $(Password) token contained in quotes must be configured for the remote passwordfield. Below is an example of dni encrypt command:

perl dni encrypt t:dnitemplatename

This command prompts the end used to enter the password to be used for the dni template and toconfirm that password. When the command completes, the EncryptedPassword parameter is added tothe end of your DNI template containing the encrypted password.

DNICommand on a UNIX System

The DNICommand being run would then be changed to look like this on a UNIX system:

cfsend n:SystemA lf:"$(LocalFileName)"

rf:"/DNI/Target/$(LocalFile)" uid:remote_user pwd:”$(Password)” sm:y

DNICommand on a Windows System

The DNICommand being run would then be changed to look like this on a Windows system:

ftmscmd /tcp /send /file /node:SystemA

"c:\DNI\Source\Red\AcctData"

"c:\DNI\Target\AcctData" /ri:remote_user

/rw:"$(Password)" sm:y

The $(Password) token is only available to be used within the DNICommand field and not from atransfer template such as TSEND.

For more information on the dni encrypt command run the following dni help command:perl dni help encrypt

27

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 28: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

DNI Tokens

DNI File Tokens can be used for DNICommand, SuccessFile and FailureFile parameter values. Thetable lists and describes the tokens.

Token Name Description

$(YYYYMMDD) Current date in the format YYYYMMDD (Gregorian date)

$(YYMMDD) Current date in the format YYMMDD (Gregorian Date)

$(YYYYDDD) Current date in the format YYYYDDD (Julian date)

$(YYDDD) Current date in the format YYDDD (Julian date)

$(YYYY) Current Year

$(MM) Current Month

$(DD) Current Day within Month

$(HHMMSS) Current Time in format HHMMSS (24 hour format)

$(HH24) Current Hour in 24 hour format

$(MI) Current Minutes within the current hour

$(SS) Current Seconds within the current minute

$(LocalFile) File name without the directory. DNI Send only.

$(LocalFileName) Fully qualified file name (with directory). DNI Send only.

$(LocalFileBase) File name without the extension (file name before last period(.)).DNI Send only.

$(LocalFileExt) File name extension (file name after last period(.)). DNI Sendonly.

$(LocalFilePath) Path name of the file. DNI Send only.

$(LocalFilePathWODrive) Local File Path without Drive.

$(LocalHLQ) Local File Name High Level Qualifier

$(LocalNoHLQ) Local File Name without the High Level Qualifier

$(LocalFilePathLDir) Local File path leftmost directory name

28

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 29: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Token Name Description

$(LocalFilePathRDir) Local File path rightmost directory name

$(RemoteFile) File name without the directory. DNI Receive only.

$(RemoteFileName) Fully qualified file name (with directory). DNI Receive only.

$(RemoteFileBase) File name without the extension (file name before last period(.)).DNI Receive only.

$(RemoteFileExt) File name extension (file name after last period(.)). DNI Receiveonly.

$(RemoteFilePath) Path name of the file. DNI Receive only.

$(RemoteFilePathWODrive) Remote File Path without Drive.

$(RemoteHLQ) Remote File Name High Level Qualifier

$(RemoteNoHLQ) Remote File Name without the High Level Qualifier

$(RemoteFilePathLDir) Remote File path leftmost directory name

$(RemoteFilePathRDir) Remote File path rightmost directory name

$(D01) - $(D16) Directory names: left to right, 1 to 16

$(F01) - $(F16) File names: left to right, 1 to 16

$(SubDir) Subdirectory of the file (directory name after removing theLocalDirectory. This template does not contain a leading slash (/or \ depending on whether you are running on UNIX orWindows). This token is unique and can be used in a special way.Please read the section Special SubDir Token Use.

The table lists tokens that support Arithmetic. These tokens can use + or – to alter the token values.

Replace n with a number to add or subtract the defined value.

Token Name Description

$(YYYYMMDD+n) Adds days

$(YYYYMMDD–n) Subtracts days

$(YYMMDD+n) Adds days

$(YYMMDD–n) Subtracts days

29

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 30: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Token Name Description

$(YYYYDDD+n) Adds days

$(YYYYDDD–n) Subtracts days

$(YYDDD+n) Adds days

$(YYDDD–n) Subtracts days

$(HHMMSS+n) Adds seconds

$(HHMMSS–n) Subtracts seconds

$(YYYY+n) Adds years

$(YYYY–n) Subtracts years

$(MM+n) Adds months

$(MM–n) Subtracts months

$(DD+n) Adds days

$(DD–n) Subtracts days

$(HH24+n) Adds hours

$(HH24–n) Subtracts hours

$(MI+n) Adds minutes

$(MI–n) Subtracts minutes

$(SS+n) Adds seconds

$(SS–n) Subtracts seconds

Special SubDir Token Use

Note that there is a special use for the $(SubDir) token. Let's say that you have 5 systems running MFTPlatform Server, and that you want to send files to each of the 5 systems. You could set up 5 DNIexecutions, each of which has a template configured especially for that system. A second option is to setup your directory structure in such a way that the subdirectory name matches the Node name for theremote systems.

As an example, let's say that you have 5 systems running MFT Platform Server. They are called:

Red, Blue, Green, Black, White

You could set up your directory structure in the following manner:

30

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 31: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

/DNI/Red

/DNI/Blue

/DNI/Green

/DNI/Black

/DNI/White

You could set up your DNI transfer fields, so that a single DNI task could handle transfers to all 5 of thesystems. The following table shows the LocalDirectory name and DNICommand on differentplatforms:

On a UNIX system you could have for example:

LocalDirectory: /DNI

DNICommand: cfsend t:templateName n:$(SubDir) lf:$(LocalFileName) rf:/DNI/Target/$(LocalFile) sm:y

On a Windows system you could have for example:

LocalDirectory: c:\DNI\Source

DNICommand: ftmscmd /tcp /send /file /node:$(SubDir) /rd:domainname "$(LocalFileName)" "c:\DNI\Target\$(LocalFile)

DNICommand overrides the Node parameter (n:) with the name of the subdirectory. In this case, youmust define MFT Platform Server nodes for each of the subdirectories using the cfnode program. Inother words, you must execute the cfnode program 5 times to add node definitions for Red, Blue,Green, Black and White systems

.

When file "AcctData" is added to the Red directory, DNI detects the file, and execute theDNICommand. Before executing the DNICommand, it performs token substitution, and replaces thevalue $(SubDir) with the value Red. Therefore, the DNICommand is changed to the following:

On a UNIX System:

cfsend t:templateName n:Red

lf:/DNI/Red/AcctData rf:/DNI/Target/AcctData sm:y

On a Windows System:

ftmscmd /tcp /send /file /node:Red

"c:\DNI\Source\Red\AcctData"

"c:\DNI\Target\AcctData"

Another use for the $(SubDir) token is to specify a subdirectory name when performing Post Processingactions. If you want to move files based on success or failure and you want to retain the directorystructure, you can use the $(SubDir) token.

31

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 32: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Configuring DNI Management for Command Center

You can use the MFT Command Center v7.2.0 or higher to manage all DNI templates from a singlelocation. To allow an MFT Command Center to communicate with either a Platform Server on a UNIXor Windows platform or Platform Server Agent, you must first set the DNI communication parameterscontained in the DNIConfig.cfg file.

This functionality is not supported on HP-UX RISC systems.

DNI Communication Parameters

The table lists and describes the communication parameters.

Parameter Description

ListenPort Defines the IP Port that the DNI Daemon listens for incoming requests fromMFT Command Center. Preset to value 47777.

AdapterIPAddress Defines the IP Address of the Adapter that the DNI Daemon binds to. Presetto value All. When All is used the IP address to bind to is 0.0.0.0.

AcceptIPAddress Defines an IP address or DNS name that points to an MFT CommandCenter. One parameter per IP address or DNS name can be defined. If youwant to allow all incoming requests regardless of the IP or DNS name youcan set this parameter to All.

LogDirectory Defines the directory where the log files from the DNI processes are saved.

TemplateDirectory Defines the directory where DNIDaemon.pl searches for DNI templates. Bydefault, DNI templates are in the ./templates directory. This directory isrelative to the working directory when DNIDaemon.pl is started.

Debug Defines whether DNIDaemon.pl debugging is turned on. This parametershould only be set when instructed to do so by TIBCO Technical Support.Preset to value No.

32

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 33: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Parameter Description

EncryptCmdPwd When this parameter is enabled and an MFT Command Center user creates/updates a template file, DNIDaemon does the following:

If the Template Parameter Name is "DNICommand" or "RemoteCommand":

1. If the sub-parameter is "/rw:" or "/RemotePassword:" or "/rw=" or "/RemotePassword=" or "pwd:" or "password:" :

a. Extracts the password from the command line parameter.

2. If the password is NOT $(Password):

a. Encrypts the password using the existing password encryptionalgorithm.

b. Replaces the password with the $(Password) token.

c. Adds the "EncryptedPassword" parameter to the last line of the dnitemplate file (replace existing EncryptedPassword file if necessary).

UtilityUsers Defines a list of comma delimited user IDs that are authorized to use theDNIUtility.pl script. This parameter is ignored by the DNIDaemon.pl script.When DNIUtility.pl is executed, it extracts the current logged in user andcompares it to the list of user IDs defined by this parameter. If the user ID isdefined in this list, the request is accepted; otherwise the request is rejected.

When running on Windows, the domain name should be left outof this parameter.

Setting the Parameters

Once you have set the ListenPort, the AdapterIPAddress if needed, and the AcceptIPAddress of an MFTCommand Center, you have to define and encrypt a user id and password to be used by MFTCommand Center to authenticate to the server. This can be any user id and password you wish to use.Below is an example of the command to run:

perl DNIDaemon.pl c:DNIConfig.cfg encrypt

When you run the command, you are prompted for the user id and password.

Be sure and note the user id and password that has been set as the MFT Command CenterAdministrator needs this information. If you have forgotten your user id and password, you can reset itby running the command again.

The command adds the Authenticate parameter to the DNIConfig.cfg file with the informationencrypted.

Running the DNIDaemon perl script

You are now ready to run the DNIDaemon perl script. This script listens for incoming requests fromMFT Command Center.

Use the following command to run the script in the foreground.

perl DNIDaemon.pl c:DNIConfig.cfg

If you are working on a UNIX platform, placing an ampersand (&) at the end of the command allows itto run in the background. Below is an example:

33

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 34: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

perl DNIDaemon.pl c:DNIConfig.cfg &

If you are working on a Windows platform, you can use the start command to run the program in aseparate window while writing the output from dni to a log file. Below is an example:

perl DNIDaemon.pl c:DNIConfig.cfg &

start /D"c:\dniDirectory\" cmd /C perl DNIDaemon.pl c:DNIConfig.cfg ^> LogFileName

2>&1

34

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 35: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

DNIUtility

The DNIUtility performs the following functions:

● Stops a template

● Stops all templates

● Stops the DNI daemon

● Stops all templates and stops the DNI daemon

● Starts a template

● Starts the DNI daemon

35

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 36: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

DNIUtility Parameters

The table lists the parameters of the DNIUtility.

Parameters Shortcut Description

Request Req Defines the request type:

● StopAllTemplates: Stops all templates.

● StopOneTemplate: Stops a template.

● StopDaemon: Stops the DNIDaemon but leaves templates active.

● StopAll: Stops all templates and then stops the DNIDaemon.

● StartOneTemplate: Starts a template.

● StartDaemon: Starts the DNIDaemon.

This parameter is case insensitive.

Config C Defines the DNIDaemon config file. This parameter extracts the userid, password, and IP port of the DNIDaemon.pl script.

On UNIX, this parameter is case sensitive.

On Windows, this parameter is case insensitive.

User Defines the user id. Not required if the config parameter is defined.

This parameter is case sensitive.

Pwd Defines the password. Not required if the config parameter is defined.

This parameter is case sensitive.

Ip Defines the IP address of the DNIDaemon.pl script.

Defaults to 127.0.0.1

Port Defines the IP port. Not required if the config parameter is defined.

Defaults to 47777

Template T Defines the template to start or stop. Required for StopOneTemplateand StartOneTemplate. Not allowed for StopAllTemplates.

This parameter is case sensitive.

Prompt Prompts the user to enter the required parameters.

Help -h, ? Displays the help information.

Debugon Turns the debugging on.

36

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 37: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

DNIUtility Command Examples

The table lists the functions and command examples of DNIUtility.

Function Command Examples

Stops a template perl DNIUtility.pl req:StopOneTemplate c:DNIConfig.cfg

template:TemplateToStop

perl DNIUtility.pl req:StopOneTemplate ip:1.2.3.4 port:47777

user:dniuser pwd:dnipass template:TemplateToStop

Stops alltemplates

perl DNIUtility.pl req:StopAllTemplate c:DNIConfig.cfg

perl DNIUtility.pl req:StopAllTemplate ip:1.2.3.4 port:47777

user:dniuser pwd:dnipass

Stops the daemon perl DNIUtility.pl req:StopDaemon c:DNIConfig.cfg

perl DNIUtility.pl req:StopDaemon ip:1.2.3.4 port:47777

user:dniuser pwd:dnipass

Stops alltemplates andstops the daemon

perl DNIUtility.pl req:StopAll c:DNIConfig.cfg

perl DNIUtility.pl req:StopAll ip:1.2.3.4 port:47777

user:dniuser pwd:dnipass

Starts a template perl DNIUtility.pl req:StartOneTemplate c:DNIConfig.cfg

template:TemplateToStart

perl DNIUtility.pl req:StartOneTemplate ip:1.2.3.4 port:47777

user:dniuser pwd:dnipass template:TemplateToStart

Starts the daemon perl DNIUtility.pl req:StartDaemon c:DNIConfig.cfg

perl DNIUtility.pl req:StartDaemon

37

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide

Page 38: TIBCO Perl Directory Named Initiation (DNI) Installation ... · Introduction Directory Named Initiation (DNI) allows MFT Platform Server to detect the existence of files that have

Executing the DNIUtility

You can execute the DNIUtility in the following ways:

● Executing DNIUtility through a Windows Command Prompt or UNIX Shell

● Executing DNIUtility.pl through a Platform Server Send Command request

● Executing DNIUtility.pl through the MFT Command Center Scheduler

Executing DNIUtility through a Windows Command Prompt or UNIX Shell

The DNIUtility.pl script can be executed through a Windows Command Prompt or UNIX Shell. Hereare some examples:

perl DNIUtility.pl req:StartOneTemplate ip:1.2.3.4 port:47777 user:dniuser

pwd:dnipass template:TemplateToStart

perl DNIUtility.pl req:StopOneTemplate ip:1.2.3.4 port:47777 user:dniuser

pwd:dnipass template:TemplateToStop

Also see: DNIUtility Commands

Executing the DNIUtility.pl through a Platform Server Send Command Request

The DNIUtility.pl script can be executed through a Platform Server command. Here are some examples:

cfsend n:psnode trtype:c uid:myuser pwd:mypass rcmd:"perl c:/pdniInstall/

DNIUtility.pl c:c:/pdniInstall/DNIConfig.cfg req:startonetemplate

template:TemplateToStart"

cfsend n:psnode trtype:c uid:myuser pwd:mypass rcmd:"perl c:/pdniInstall/

DNIUtility.pl c:c:/pdniInstall/DNIConfig.cfg req:stoponetemplate

template:TemplateToStop"

Executing DNIUtility.pl through the MFT Command Center Scheduler

1. The DNIUtility.pl script can also be run through the Command Center Scheduler.

2. Add a job through the "Scheduler Add Job" page.

3. Set the Job Type to Execute Command.

4. In the Execute Command box, set Execute Command to "On a Platform Server".

5. Set Full path of Command to: perl c:/pdniInstall/DNIUtility.pl.

6. Set Command Parameters to: c:/pdniInstall/DNIConfig.cfg req:startonetemplatetemplate:SendAcctFiles.

7. Set other Platform Server properties as needed.

8. Click Execute Now or add a scheduler trigger for this job.

38

TIBCO® Perl Directory Named Initiation (DNI) Installation and Operations Guide