You can create “user defined” heuristic configurations that allow you to interface with other platforms that are not listed in the Directory Listing Styles. The Batch Adapter includes a mechanism that allows you to configure a set of heuristic properties so that the underlying parser can parse the LIST command result correctly. These properties are described under FTP Heuristics Configuration Parameters.
There are two methods for creating custom user defined directory listing styles:
Create a Custom Heuristics Configuration File: You can create a custom user defined heuristics configuration file, listing the style names and parameters in the same format as the FtpHeuristics.cfg file. This file is then located on the logical host. The configuration file location and the style name are then specified in the BatchFTP configuration properties (see To Create a Custom Heuristics Configuration File).
Modify the FTP Heuristics Configuration File: You can open FtpHeuristics.cfg file, add your user-defined style, and repackage the file. This method requires you to unzip a JAR file, add your custom style, and repackage the files (see To Modify the FTP Heuristics Configuration File). In many cases, this method may be more intrusive and cumbersome than the method listed above.
Using a text editor, create a user defined configuration file containing the property settings required to interface with your target platform. You can do this by copying a section (style) from the FtpHeuristics.cfg file that is similar to the style (platform parameter settings) that you are creating, or you can copy the format provided under Heuristics Configuration File Format.
Save your user defined configuration, as a CFG file, to a safe location on the logical host.
From the BatchFTP Environment properties, select the FTP ⇒ User Defined Heuristics Configuration File property, and enter the location and name of your user defined heuristics configuration file (for example C:\USER_DEFINED_HEURISTICS\UDH.cfg).
From the BatchFTP Connectivity Map properties, select FTP ⇒ User Defined Directory Listing Style, and enter the name of your user-named style (for example MY AS400-UNIX). You are allowed to list one user-named style. This style is now the configured Directory Listing Style, superseding the value of the Directory Listing Style property.
You can use this method to create multiple user-named styles by adding the styles to your user defined configuration file, and entering the different user defined style names in the Connectivity Map properties for each of your various FTPBatch component adapters.
You can also create multiple user defined configuration files if necessary, but this requires the creation of additional BatchFTP External Systems in the Environment. If you chose this method, you must copy your Environment components (drag-and-drop) to the correct BatchFTP External System before applying Automap.
If you decide to use this method for creating custom user defined heuristic configurations, take note of the following:
The BatchFTP Connectivity Map property, User Defined Directory Listing Style, supersedes the Directory Listing Style property. When a User Defined Directory Listing Style is specified, it is used as the heuristic configuration for the corresponding BatchFTP Adapter (OTD). To use the Directory Listing Style property value as the applied heuristic style, the User Defined Listing Style property value must be left blank.
Setting the User Defined Directory Listing Style property value to blank (no value) makes the selected Directory Listing Style property value (built-in heuristic configuration) the current enabled style.
At runtime, the user defined heuristics configuration file must exist on the logical host, and possess appropriate permission settings to allow the heuristic configuration parameters to be accessed by the deployed application.
An error message is generated by the BatchFTP OTD when a User Defined Directory Listing Style is specified, but the User Defined Heuristics Configuration File property value is blank, or associated the user defined heuristics configuration file is not accessible or does not contain a corresponding style configuration.
Setting the value of the User Defined Directory Listing Style triggers the loading of the corresponding heuristics configuration file specified by the User Defined Heuristics Configuration File property. If you make changes to the heuristics configuration file, set the User Defined Heuristics Configuration File property before setting the User Defined Directory Listing Style.
To modify the FtpHeuristics.cfg file to include your user defined heuristic configuration styles, do the following:
The FtpHeuristics.cfg file is contained by the stcbatch.jar file, which is found in the following location:
<JavaCAPS51>\edesigner\usrdir\modules\ext\batcheway\ stcbatch.jar |
where JavaCAPS51 is the Sun Java Composite Application Platform Suite install directory.
Unzip stcbatch.jar and locate the FtpHeuristics.cfg file.
Open FtpHeuristics.cfg with a text editor and add your user defined heuristic configuration styles.
Copy the User Defined section (or any other section), and paste it to the bottom of FtpHeuristics.cfg.
Rename the section and each property name with your user-defined name or one of the available listings (User Defined1, User Defined2, and so forth). See the example provided under Heuristics Configuration File Format. In this example, the user defined name is MY AS400-UNIX). Only one style with a user-defined name can be specified, but 10 configuration styles can be named as User Defined1-10.
Modify the new section’s properties for your target platform. See FTP Heuristics Configuration Parameters for property descriptions.
Repeat steps 2-4 above to create additional User Defined configurations.
Zip the stcbatch.jar file (including the updated FtpHeuristics.cfg file) and copy stcbatch.jar back to it’s original location.
From the BatchFTP Configuration Map properties, select FTP ⇒ User Defined ⇒ Directory Listing Style, and enter the name of your user-named style (for example MY AS400-UNIX), or you can select any one of the 10 User Defined properties from the Directory Listing Style dropdown list (see Creating User Defined Heuristic Directory Listing Styles).
Your configuration changes will be applied to any Projects that are built and deployed with this Enterprise Designer.
This example includes two user-named styles (MY AS400-UNIX, and UDH NT 4.0).
# # -------------------------------------------------------------------------- # Section: MY AS400-UNIX # -------------------------------------------------------------------------- # MY AS400-UNIX!Commands Supported By FTP Server!value=APPE%CWD%DELE%LIST%MKD%NOOP%PASS%QUIT%RETR%RNFR%RNTO %SITE%STOR%TYPE%USER!set=APPE%CWD%DELE%LIST%MKD%NOOP%PASS%QUIT%RETR %RNFR%RNTO%SITE%STOR%TYPE%USER MY AS400-UNIX!Header Lines To Skip!value=0!set=0 MY AS400-UNIX!Header Indication Regex Expression!value=!set= MY AS400-UNIX!Trailer Lines To Skip!value=0!set=0 MY AS400-UNIX!Trailer Indication Regex Expression!value=!set= MY AS400-UNIX!Directory Indication Regex Expression!value=!set= MY AS400-UNIX!File Link Real Data Available!value=No!set=No%Yes MY AS400-UNIX!File Link Indication Regex Expression!value=!set= MY AS400-UNIX!File Link Symbol Regex Expression!value=!set= MY AS400-UNIX!List Line Format!value=Fixed!set=Blank Delimited%Fixed MY AS400-UNIX!Valid File Line Minimum Position!value=52!set=52 MY AS400-UNIX!File Name Is Last Entity!value=Yes!set=No%Yes MY AS400-UNIX!File Name Position!value=52!set=52 MY AS400-UNIX!File Name Length!value=0!set=0 MY AS400-UNIX!File Extension Position!value=0!set=0 MY AS400-UNIX!File Extension Length!value=0!set=0 MY AS400-UNIX!File Size Verifiable!value=No!set=No%Yes MY AS400-UNIX!File Size Position!value=0!set=0 MY AS400-UNIX!File Size Length!value=0!set=0 MY AS400-UNIX!Special Envelope For Absolute Pathname!value=!set=’’ MY AS400-UNIX!Listing Directory Yields Absolute Pathnames!value=No!set=No%Yes MY AS400-UNIX!Absolute Pathname Delimiter Set!value=///!set=/// MY AS400-UNIX!Change Directory Before Listing!value=Yes!set=No%Yes MY AS400-UNIX!Directory Name Requires Terminator!value=No!set=No%Yes # # # -------------------------------------------------------------------------- # Section: UDH NT 4.0 # -------------------------------------------------------------------------- # UDH NT 4.0!Commands Supported By FTP Server!value=APPE%CWD%DELE%LIST%MKD%NOOP%PASS%QUIT%RETR%RNFR%RNTO%SITE% STOR%TYPE%USER!set=APPE%CWD%DELE%LIST%MKD%NOOP%PASS%QUIT%RETR%RNFR%RNTO%SITE% STOR%TYPE%USER UDH NT 4.0!Header Lines To Skip!value=0!set=0 UDH NT 4.0!Header Indication Regex Expression!value=!set= UDH NT 4.0!Trailer Lines To Skip!value=0!set=0 UDH NT 4.0!Trailer Indication Regex Expression!value=!set= UDH NT 4.0!Directory Indication Regex Expression!value=<DIR>!set=<DIR> UDH NT 4.0!File Link Real Data Available!value=No!set=No%Yes UDH NT 4.0!File Link Indication Regex Expression!value=\.lnk$!set=\.lnk$ UDH NT 4.0!File Link Symbol Regex Expression!value=!set= UDH NT 4.0!List Line Format!value=Blank Delimited!set=Blank Delimited%Fixed UDH NT 4.0!Valid File Line Minimum Position!value=4!set=4 UDH NT 4.0!File Name Is Last Entity!value=Yes!set=No%Yes UDH NT 4.0!File Name Position!value=4!set=4 UDH NT 4.0!File Name Length!value=0!set=0 UDH NT 4.0!File Extension Position!value=0!set=0 UDH NT 4.0!File Extension Length!value=0!set=0 UDH NT 4.0!File Size Verifiable!value=Yes!set=No%Yes UDH NT 4.0!File Size Position!value=3!set=3 UDH NT 4.0!File Size Length!value=0!set=0 UDH NT 4.0!Special Envelope For Absolute Pathname!value=!set= UDH NT 4.0!Listing Directory Yields Absolute Pathnames!value=No!set=No%Yes UDH NT 4.0!Absolute Pathname Delimiter Set!value=\\\\\\!set=\\\\\\ UDH NT 4.0!Change Directory Before Listing!value=No!set=No%Yes UDH NT 4.0!Directory Name Requires Terminator!value=No!set=No%Yes |