How to pull files from Sterling Connect:Direct for Windows to UNIX® using wildcards.

Technote (FAQ)


Question

How can I pull files from Sterling Connect:Direct for Windows to UNIX® then move the Windows files to an archive folder.

Answer

proc1 process snode=Windows
step1 copy from (file=c:\tempdir\*.txt snode)
                     to (file=/home/userdir/ pnode)
 if (step1 EQ 0) then
   run task snode
    sysopts="cmd(move c:\tempdir\*.txt c:\bakdir\)"
 eif
 pend;

If new files are written to the source directory after the process has started, they will be moved by the run task to the archive directory so there is the risk that they are not copied to the remote.
To avoid this you can add an additional Run Task step to move the files in the Temp directory to an upload directory first, then copy them from the upload directory and finally move them to the bakdir, that way any files put in tempdir after the process has started will not be actioned until the next invocation.

proc1 process snode=Windows
step1 run task snode
    sysopts="cmd(move c:\tempdir\*.txt c:\uploaddir\)"
if (step1 Eq 0)
step2 copy from (file=c:\uploaddir\*.txt snode)
                     to (file=/home/userdir/ pnode)
 if (step2 EQ 0) then
   run task snode
    sysopts="cmd(move c:\uploaddir\*.txt c:\bakdir\)"
 eif
eif
 pend;

Rate this page:

(0 users)Average rating

Document information


More support for:

Sterling Connect:Direct for UNIX

Software version:

3.8, 4.0, 4.1

Operating system(s):

AIX, HP-UX, Linux, Solaris

Reference #:

1639141

Modified date:

2013-09-02

Translate my page

Machine Translation

Content navigation