Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

autoDataSpec

&pagelevel(4)&pagelevel

You use autoDataSpec to define the transfer mode for the file in which the element was specified.

If the file's data type is unknown then it is determined on the basis of the file name using pattern recognition.
The only pattern currently permitted is *.xxx since only the file name suffix is checked. The file name specified for the actual transfer is used.

If a Unix-specific file name and a Windows-specific file name are specified then the appropriate file name is analyzed depending on the partner in question.

The file types are described in the openFT manual "Concepts and Functions".

Data type

Format

Example

char

Text format

*.xml

bin

Binary format

*.doc in a Windows system

user

User format


autoDataSpec describes which pattern is assigned to which data type.
If multiple patterns for different file formats match a file name then the file type is determined in the sequence bin, char, user.

If an explicit data type is specified for the file after de-referencing then autoDataSpec is not evaluated.

Restrictions

The only useful pattern is *.xxx where xxx may be of any length. However, the overall length of 512 characters for the entire expression may not be exceeded.
Only the file name suffix is checked.

Format

 <autoDataSpec ref?="ID"
          charPattern?="patternList" binPattern?="patternList"
          userPattern?="patternList" default?="char|bin|user" >  
   comment?
 </autoDataSpec>

Attributes

Name

Value

Meaning

ref?

string                       

Reference to an autoDataSpec context object.

binPattern?

patternlist1

Wildcard pattern.
If the pattern matches the specified file name then the file is transferred in bin format.

charPattern?

patternlist1

Wildcard pattern.
If the pattern matches the specified file name then the file is transferred in char format.

userPattern?

patternlist1

Wildcard pattern.
If the pattern matches the specified file name then the file is transferred in user format.

default?

char | bin | user

The default value is char.
Specifies the assumed data type if no pattern is found.

1patternlist is the list of patterns separated by spaces.

Example

 <?xml version="1.0" encoding="UTF-8"?>
 <ftscript version="1">
   <context>
     <list id="FileList">
       <file name="bin.mp3"/>
       <file name="text.txt"/>
     </list>
     <list id="HostList">
       <partner name="UnixP_1">
         <transferAdmission>
           <ftacAdmission ftacAdmission="FTACADM1"/>  
         </transferAdmission>
       </partner>
       <partner name="WindowsP_1">
         <transferAdmission>
           <ftacAdmission ftacAdmission="FTACADM2"/>
         </transferAdmission>
       </partner>
     </list>
   </context>

   <foreach listRef="HostList" selectType="partner"
            contextObject="host">
     <foreach listRef="FileList" selectType="file"
            contextObject="file">
       <transferFile>
         <fromLocalFile ref="file">
           <directory name="W:/openFT/ftscript/Test/data/small"/>   
           <autoDataSpec charPattern="*.txt"
                       userPattern="*.tab *.dat" default="bin"/>
         </fromLocalFile>
         <toRemoteFile ref="file">
           <partner ref="host"/>
           <directory name="frg_eis_17"/>
         </toRemoteFile>
       </transferFile>
     </foreach>
   </foreach>
 </ftscript>

In the example, the file list FileList of local files is transferred to all the computers in the HostList. The file transfer modes are activated in accordance with the autoDataSpec specification. *.txt files are converted in accordance with the target system type. All unknown file types are transferred in binary form. *.tab and *.dat are defined for user transfers.