Download file from server

Author: (lalitpct)

While downloading a file in unix server to the client (windows server), i have used below steps

cat <file> (command in unix to read unix file , putting putput in result)
lfiledump script_output, "%%$result"

this step is ok for ASCII format file but for binary files (like unix zip files) it is having some issue.
Is there a better way to download files from unix server ,as this method has limitation of size as well.?


  1. If you want the contents of a file lfileopen should be able to read it to a variable for you. If you want the output of a command, check out Operating System Commmand signatures, and then COMMANDOUT operation.

    Author: Iain Sharp (
  2. But its same as what we already used above ,command is as shown below
    unixos(cat <file>,output) (command in unix to read unix file , putting result in output)
    lfiledump output, "%%$result"

    here unixos is commandout is executed on server (unix) and then copied to variable ,which is then dumped to local machine (windows).
    It works fine for ascii file and small file ,but creates problem for
    1)Big size file
    2)Binary files


    Author: lalitpct (
  3. Hi Lalit,

    Unfortunately, uniface works with x00 separated strings.

    So whenever a binary file has this value; it is treated as the end of the string.


    Perhaps you can experiment using RAW for your variable, which transfers the characters to "printable" characters including the x00



    But I think there are better tools to download files from a server to a client without bringing the whole file into a uniface application.

    Maybe some FTP agent like Filezilla would suit your needs

    Author: ulrich-merkel (

  4. Thanks ,
    users are given acess to only uniface application , hence will try with raw kind of variable.
    By the way what will be the size limit ,any idea ?

    Author: lalitpct (
  5. I have implemented NcFTP ( from within a Uniface application to allow for ftp access between machines without the fileload/filedump. Why are you using cat? If you are running services on the unix box, use lfileload to load a variable, pass it to the client in an outparam then lfiledump to save it. Iain

    Author: Iain Sharp (
  6. does cat on a binary file really give the correct binary output, or just some sort of visual representation?

    Author: Theo Neeskens (
  7. its shows non printable characters.

    Author: lalitpct (