Transfering files from Unix-sever to Windows

CaRloxz

New Member
This is the case:

We currently transfer production-files from our unix-server to several production-locations. These jobs are initiated by crontab at different times throughout the day. Some of the files must be transferred binary while other as ascii. All this is working fine. The request is that we have users sitting on windows-clients who somtimes want to re-transmit the files if something has gone wrong on the other side. But they also want to read/see the files on their local machine.

Retransmitting the files to the production-location is easy enough, but does anyone have suggestion about how to transfer them and display them on the Windows-machine to the local user?
I have some ideas about how to solve the task but I am very interested in hearing if anyone have suggestions to what would be best practice.

Kind Regards
Carloxz
 
method 1.
define input parameter fileName as character.
define output parameter textfile as longchar.

copy-lob from file fileName to textfile.

method 2 through web service:
Comments: File transfer through webservice splits file because WSA spends 3-5 minutes to encode 5-7MB binary file to soap protokol). But if chuck size 32kb-200kb it takes less than 20 seconds for the same file to transfer.
FileDBegin:
define input parameter HostFileName as character.
define output parameter HostFileSize as integer.

if search(HostFileName) = ? then
do:
RETURN.
end.

FILE-INFORMATION:FILE-NAME = HostFileName.
HostFileSize = FILE-INFORMATION:FILE-SIZE.

FileDChunk:
define input parameter HostFileName as character.
define input-output parameter BytesFrom as integer.
define input-output parameter BytesTo as integer.
define output parameter HostFileSize as integer.
define output parameter FileBinary as MEMPTR NO-UNDO.

define variable CopyBytes as integer.
if search(HostFileName) = ? then
do:
RETURN.
end.

FILE-INFORMATION:FILE-NAME = HostFileName.
HostFileName = FILE-INFORMATION:FULL-PATHNAME.
HostFileSize = FILE-INFORMATION:FILE-SIZE.

if BytesTo > HostFileSize then
BytesTo = HostFileSize.
if BytesFrom > BytesTo then
do:
RETURN.
end.

SET-SIZE (FileBinary) = 0.
CopyBytes = BytesTo - BytesFrom + 1.
SET-SIZE (FileBinary) = CopyBytes.

COPY-LOB FROM FILE HostFileName
Starting AT BytesFrom FOR CopyBytes TO FileBinary NO-CONVERT.
 
Top