Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

fromLocalTmpFile

&pagelevel(4)&pagelevel

You use fromLocalTmpFile to specify a temporary source file for file transfer from "remote" to "remote" (see “Types of file transfer” (transferFile)).

The temporary file is simply a buffer under the local ID. This temporary file is deleted automatically.

The data, maxRecSize, recordFormat, ccsname and autoDataSpec specifications in the ffromRemoteFile toLocalTmpFile activity apply implicitly. When a TmpFile is created from ffromRemoteFile then these specifications are inherited.

Restrictions

You may only use fromLocalTmpFile after a fromRemoteFile toLocalTmpFile activity since the file TmpFile already exists and must be accessible in the current context. For more information, see section “fromRemoteFile” and section “toLocalTmpFile”.

Format

<fromLocalTmpFile use="tmpID"/>

Attributes

Name

Value

Meaning

use

string

Reference to a file TmpFile which can be accessed in the current context. This file must previously have been created with a transferFile using toLocalTmpFile.

Example

 <?xml version="1.0" encoding="UTF-8"?>
 <ftscript version="1">
   <context>
     <partner id="FileServer" name="UnixP_1">
       <transferAdmission>
         <ftacAdmission ftacAdmission="FTACADM1"/>
       </transferAdmission>
     </partner>
     <list id="RemoteHostList">
       <partner name="UnixP_1">
         <transferAdmission>
           <ftacAdmission ftacAdmission="FTACADM1"/>
         </transferAdmission>
       </partner>

       <partner name="WindowsP_1">
         <transferAdmission>
           <ftacAdmission ftacAdmission="FTACADM2"/>
         </transferAdmission>
       </partner>
     </list>
   </context>
   <listDirectory listObject="FileList">
     <partner ref="FileServer"/>
     <baseDir name="frg_eis_19/datastore"/>
   </listDirectory>
   <foreach listRef="FileList" selectType="file"
            contextObject="File" execute="parallel">
     <transferFile>
       <fromRemoteFile ref="File">
         <partner ref="FileServer"/>
         <directory name="frg_eis_19/datastore"/>
       </fromRemoteFile>
       <toLocalTmpFile id="tmpFile"/>
     </transferFile>
     <foreach listRef="RemoteHostList" selectType="partner"
              contextObject="RemoteHost" execute="parallel">  
       <transferFile>
         <fromLocalTmpFile use="tmpFile"/>
         <toRemoteFile ref="File">
           <partner ref="RemoteHost"/>
           <directory name="frg_eis_19/targetDir"/>
         </toRemoteFile>
       </transferFile>
     </foreach>
   </foreach>
 </ftscript>

In the example, the files in the directory frg_eis_19/datastore are copied to the relevant frg_eis_19/targetDir target directory on the various computers.

listDirectory is used to identify the files on the FileServer.

The first foreach activity works through all the files identified on the FileServer. Each file is copied to a temporary file tmpFile.
In the second foreach activity, each temporary file is copied to the target directory frg_eis_19/targetDir on the RemoteHost.

Finally, the associated temporary file tmpFile is deleted.