06-04-2015 08:37 AM
I am testing the filename socket access type with the aim of transferring binary files between two SAS sessions, i.e. send a binary file from the client session, the server session should receive the file and make a copy on the server where it runs. The binary file to be transferred can have any length. I have found many examples that show how to send an ASCII file and how to transfer a SAS Dataset by serializing on the client and deserializing the data on the server, but the behaviour I am after would be similar to that of an ftp client sending a file to an ftp server.
What I am looking for is something like the code below which would work for any file.
On the server (i.e. on machine "server.com"):
filename srv socket ":5100" server;
On the client
filename client socket "server.com:5100";
input; /*The input here should ideally read the whole file*/
There a options for file type (A or B) and fixed length, streaming and others, but I have not managed to make it work, I don't even know if it is at all possible.
Any ideas? Thanks!
01-04-2017 10:13 AM
If over a client/server SAS connection why not to use the proc download/upload procedure with the BINARY option?
More on download procedure here:
Daniel Santos @ www.cgd.pt