|Date: ||Wed, 21 Jun 2000 18:59:51 GMT|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|Organization: ||Deja.com - Before you buy.|
|Subject: ||Re: FTP via Filename,
multiple values within RCMD. Any SAS birdies comment??|
Thanks Don for answer my post. I have tracking number outstanding with
the SAS institute (5273498). They said that the FTP site has to be
able to accept multiple commands. I told then that QUOTE is
specifically designed for a signal command. Does anyone know of an FTP
site that takes multiple commands?
In article <3949F529.EC993CC7@xtra.co.nz>,
Don Stanley <email@example.com> wrote:
> I had a good play with this today and concluded that the usage note
> correct in its assertion that placing commas between commands will
> multiple commands to sent to the remote FTP. The SAS RCMD option
> permit the equivalent to what the FTP QUOTE command permits. QUOTE is
> clearly documented to allow one command to be sent to the remote.
> command such as RNFR is sent, which clearly demands some extra
> to add the new file name, you immediately send a second QUOTE to
> accomplish the new name part as follows::
> ftp> quote rnfr test.newname
> 350 RNFR accepted. Please supply new name for RNTO.
> ftp> quote rnto test.oldname
> 250 IS413.TEST.NEWNAME renamed to IS413.TEST.OLDNAME
> It is simply not possible to emulate this in datastep with a SAS
> because only one FILENAME can be open at a given time in a datastep.
> soon as you issue a second FILENAME to send the second RCMD with the
> command the first is closed and the FTP connection no longer knows the
> RNFR has been sent.
> The usage note referred to by the original sender documents a problem
> you cannot issue multiple RCMD comments in one filename. In fact you
> the real problem, which the usage note doesn't make a great job of
> stating, is that the second RCMD overrides the first. Thus a filename
> filename test ftp .... rcmd='rnft oldname' rcmd='rnto newname' ;
> will see only the rnto sent to the remote.
> When you try and carry out the workaround in the usage note, FTP
> interprets the whole text after the RNFR as a parameter to RNFR. The
> parameter is the filename. Thus, in the example below,
> ron.txt, rnto ron.txt2
> is interpreted as the filename you wish to rename. This is obviously
> unlikely to be a valid filename on any system.
> If you try and stack up comma delimited commands using QUOTE in FTP,
> is what you get ..
> ftp> quote pwd
> 257 "IS413." is working directory.
> ftp> quote pwd,stat
> 500 invalid command pwd,stat
> ftp> quote pwd , stat
> 501 PWD command syntax error : too many parameters
> Clearly, the comma is not an acceptable delimiter.
> Perhaps someone from SAS Inst could comment on this to me? I would
> much like to see usage note G351 proven correct, but as far as I can
> it is not unless SAS does something magic with RCMD that we cannot see
> yet. Certainly if it just passes RCMD through in a similar manner to
> QUOTE, it will not work.
> firstname.lastname@example.org wrote:
> > Has anyone been able to send multiple commands with the RCMD option
> > the FILENAME statement. I am trying to rename a file on the remote
> > host.
> > FILENAME tst FTP 'X' RCMD="rnfr ron.txt, rnto ron.txt2"
> > USER="&id" PASS="&PW" HOST="&host" debug;
> > data;
> > file tst;
> > run;
> > According to
> > You can do multiple values for RCMD with commas.
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> Don Stanley, B.SC, Dip O.R.S, MNZCS Director, Sysware Consulting
> Box 634, Wellington, NEW
> EMAIL:: email@example.com
> Author:: Beyond the obvious with SAS Screen Control Language.
> Author:: Solutions for your GUI Applications Development Using SAS/AF
> FRAME Technology
> Genealogy:: http://www.geocities.com/don_stanley_nz/family.htm
> SAS Tips:: http://www.geocities.com/don_stanley_nz/sastips.htm
Sent via Deja.com http://www.deja.com/
Before you buy.