Date: Thu, 10 Jul 2003 09:03:20 -0400
Reply-To: "L. Bertolini" <bertolini.1@OSU.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "L. Bertolini" <bertolini.1@OSU.EDU>
Organization: Ohio State University
Subject: Re: ftp rcmd delete command
Content-Type: text/plain; charset=us-ascii; format=flowed
I'm not sure, but I think that the "rcmd" gets executed *before*
the file is transferred; thus if rcmd deletes the file, it won't be
there to transfer.
On what platform are you executing SAS, and on what
platform is the FTP server executing?
Joseph Schuchter wrote:
>I have been struggling w/ FTP access method, trying to delete a file
>after downloading it. In a previous posting, there were suggestions
>to use the RCMD option with the DELE command.
>I DO THIS.....
>filename outside ftp 'EP&filedate..TXT' cd='/one/two'
>pass='xxxxx' debug rcmd="dele EP&filedate..TXT";
>infile outside end=eof;
>AND IT WORKS.....
>NOTE: >>> dele EP070803.TXT
>NOTE: <<< 250 DELE command successful.
>HOWEVER, IT ALSO PRODUCES AN ERROR AS THE COMMAND SEEMS TO CONFUSE THE
>PDV, OR SOMETHING.
>NOTE: >>> RETR EP&filedate..TXT
>NOTE: <<< 550 EP&filedate..TXT: The system cannot find the file
>ERROR: Physical file does not exist, EP&filedate..TXT.
>NOTE: The SAS System stopped processing this step because of errors.
>IT APPEARS THAT MY MACRO VARIABLE IS SOMEHOW UNITIALIZED. FINE. THE
>TRANSFER AND DELTE WORKED. BUT I NEED TO SUPPRESS THE ERROR. I HAVE
>TRIED TO USE AN ANONYMOUS FILEREF,
>filename myfile ftp ' '
>THIS DOESN"T PRODUCE THE ERROR, BUT DOESN'T DELETE THE FILE EITHER.
>SO I AM CURIOUS IF THE FTP ACCESS METHOD IS THE CORRECT WAY TO DO
>THIS. ALTHOUGH MY ACCESS METHOD CODE IS ALREADY WRITTEN (FOR MULTIPLE
>DATA SOURCES), I MAY HAVE TO RESORT TO FTP BATCH FILES EXECUTED IN
>SAS. ANY SUGGESTIONS???