LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (June 2000, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 21 Jun 2000 18:59:51 GMT
Reply-To:   bracyr@MY-DEJA.COM
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   bracyr@MY-DEJA.COM
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 <don_stanley@xtra.co.nz> wrote: > I had a good play with this today and concluded that the usage note is not > correct in its assertion that placing commas between commands will permit > multiple commands to sent to the remote FTP. The SAS RCMD option should > permit the equivalent to what the FTP QUOTE command permits. QUOTE is > clearly documented to allow one command to be sent to the remote. When a > command such as RNFR is sent, which clearly demands some extra interaction > 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 FILENAME > because only one FILENAME can be open at a given time in a datastep. As > soon as you issue a second FILENAME to send the second RCMD with the RNTO > 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 that > you cannot issue multiple RCMD comments in one filename. In fact you can, > 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 like > > 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 only > 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, this > 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 very > much like to see usage note G351 proven correct, but as far as I can see > 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. > > Don > > bracyr@my-deja.com wrote: > > > Has anyone been able to send multiple commands with the RCMD option in > > 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 http://www.sas.com/service/techsup/unotes/V6/G/G351.html > > 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 Group > > Box 634, Wellington, NEW ZEALAND > http://www.sysware.co.nz > EMAIL:: don_stanley@xtra.co.nz > > Author:: Beyond the obvious with SAS Screen Control Language. > Author:: Solutions for your GUI Applications Development Using SAS/AF > FRAME Technology > > http://www.geocities.com/don_stanley_nz/don_home.htm > 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.


Back to: Top of message | Previous page | Main SAS-L page