How to transfer a file to a remote node, where the source file name is every time different and not distributed within a variable?

Technote (FAQ)


Question

How to transfer a file to a remote node, where the source file name is every time different and not distributed within a variable?
For this scenario it is required that first all old matching files have to be deleted, before a new file can be added to the source directory and the process is submitted to transfer the file.

Answer

Following process can be used to copy such a file:

RENA1 RUN TASK PNODE (PGM=Windows)
SYSOPTS="cmd(ren C:\Bye*.* Transfer.txt)"
.
GUVEN COPY
FROM
(
FILE=C:\Transfer.txt
SYSOPTS="datatype(text)"
)
TO
(
FILE=HLQ.DEST.FILE
DISP=RPL
)

In this run task step via windows command a rename of the
previous new added file is done to a constant file name Transfer.txt.


In the copy step then this constant file name Transfer.txt is referenced.

Rate this page:

(0 users)Average rating

Document information


More support for:

Sterling Connect:Direct for Microsoft Windows

Software version:

4.4, 4.5, 4.6

Operating system(s):

Windows

Reference #:

1634084

Modified date:

2013-04-12

Translate my page

Machine Translation

Content navigation