Trying to write multiple text files to a server by the FTP method. I can get 1 file to write to the server I want to write to, but I would like to write different text files, using the name field in the dataset to set the name of the text file. Example dataset call testing: obs name lastname 1 bob smith 2 sandy lane 3 luke rath Would like to have the following text files created: bob.txt sandy.txt luke.txt Code I have...I have tried a lot of different things, this is the latest. data _null_; set testing end=eof; by name; if first.name then do; fname="'"||trim(left(put(name,$10.)))||".txt'"; filename create ftp "&fname"' cd='host_dir' host='hostname' user='test1' pass='xxxxxx' recfm=v; file create linesize=155; put @1 "<firstname="""name""" lastname="""lastname""">; end; If I replace &fname with 'testing.txt' I get one file with all the data in it. Is there a way to do this? Thanks, Tony
... View more