LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2003, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 13 Nov 2003 20:11:02 -0800
Reply-To:     Bob Whitehead <bob@FINELINK.COM.AU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Bob Whitehead <bob@FINELINK.COM.AU>
Organization: http://groups.google.com
Subject:      Re: connect to FTP
Content-Type: text/plain; charset=ISO-8859-1

Hi,

If you are trying to connect to an OS/390 host then you may need to enclose arguments in more than one set of quotes.

eg. host = '''ftp.microsoft.com''' works for us.

It may take multiple quotes (we have used up to 7 each side of the argument).

It will depend on how the FTP facility is called at your site.

It worked for us only yesterday...

Bob Whitehead Finelink Nominees Pty Ltd bob@finelink.com.au

pchoate@DDS.CA.GOV (Choate, Paul@DDS) wrote in message news:<83F5497995A8D511965F00508BB929700271EFBE@ddsexmb01.cahwnet.gov>... > Gianluca - > > I notice you don't have a password specified, I would hazard a guess that it > may need "anonymous" as the user and an email address (with an @) as a > password. I have also found that passwords may need to be quoted in double > quotes, not single. You can also pass remote FTP commands using the rcmd='' > option in the filename statement. > > You probably want to add the DEBUG option in your filename to see all the > SAS log informational messages that are sent to and received from the FTP > server. > > filename ftpdata ftp '\path_or_empty_quotes\' > user='anonymous' > pass=" marchi.gianluca@LIBERO.IT" > host='ftp.microsoft.com' > debug; > run; > > I agree with Howard's good advice (as usual) that manually using FTP first > can be informative. You can open FTP at your Windows run command line (FTP) > and logon to Microsoft as a test: > > ftp> open > To ftp.microsoft.com > Connected to ftp.microsoft.com. > 220 Microsoft FTP Service > User (ftp.microsoft.com:(none)): anonymous > 331 Anonymous access allowed, send identity (e-mail name) as password. > Password: > 230-This is FTP.Microsoft.Com > 230 Anonymous user logged in. > ftp> dir > 200 PORT command successful. > 150 Opening ASCII mode data connection for /bin/ls. > dr-xr-xr-x 1 owner group 0 Nov 25 2002 bussys > dr-xr-xr-x 1 owner group 0 May 21 2001 deskapps > dr-xr-xr-x 1 owner group 0 Apr 20 2001 developr > dr-xr-xr-x 1 owner group 0 Nov 18 2002 KBHelp > dr-xr-xr-x 1 owner group 0 Jul 2 2002 MISC > dr-xr-xr-x 1 owner group 0 Dec 16 2002 MISC1 > dr-xr-xr-x 1 owner group 0 Feb 25 2000 peropsys > dr-xr-xr-x 1 owner group 0 Jan 2 2001 Products > dr-xr-xr-x 1 owner group 0 Apr 4 12:54 PSS > dr-xr-xr-x 1 owner group 0 Sep 21 2000 ResKit > dr-xr-xr-x 1 owner group 0 Feb 25 2000 Services > dr-xr-xr-x 1 owner group 0 Feb 25 2000 Softlib > 226 Transfer complete. > ftp: 809 bytes received in 0.20Seconds 3.99Kbytes/sec. > ftp> > > > Here's a SAS run that worked: > 55 filename ftpdata ftp '/deskapps/readme.txt' > 56 user='anonymous' > 57 pass="pchoate@dds.ca.gov" > 58 host='ftp.microsoft.com' > 59 debug; > 60 run; > 61 > 62 data _null_; > 63 infile ftpdata; > 64 input; > 65 list; > 66 run; > > NOTE: 220 Microsoft FTP Service > NOTE: <<< 220 Microsoft FTP Service > NOTE: >>> USER anonymous > NOTE: <<< 331 Anonymous access allowed, send identity (e-mail name) as > password. > NOTE: >>> PASS XXXXXXXXXXXXXXXXXX > NOTE: <<< 230-This is FTP.Microsoft.Com > NOTE: <<< 230 Anonymous user logged in. > NOTE: >>> PORT 10,10,10,81,4,115 > NOTE: <<< 200 PORT command successful. > NOTE: >>> TYPE A > NOTE: <<< 200 Type set to A. > NOTE: >>> PWD > NOTE: <<< 257 "/" is current directory. > NOTE: >>> RETR /deskapps/readme.txt > NOTE: <<< 150 Opening ASCII mode data connection for > /deskapps/readme.txt(1791 bytes). > NOTE: User anonymous has connected to FTP server on Host ftp.microsoft.com > . > NOTE: The infile FTPDATA is: > Filename=/deskapps/readme.txt, > Pathname= "/" is current directory, > Local Host Name=338306pchoate, > Local Host IP addr=10.10.10.81, > Service Hostname Name=ftp.microsoft.com, > Service IP addr=207.46.133.140, > Service Name=FTP,Service Portno=21,Lrecl=256, > Recfm=Variable > > RULE: > ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+- > ---8--- > 1 0 > 2 Welcome to the Microsoft FTP Server. This machine offers the 61 > 3 following materials and information for systems and network > products: 69 > 4 0 > 5 - Selected knowledge-base articles 35 > 6 - Selected product fixes 24 > 7 - Updated drivers 17 > 8 - Utilities 11 > 9 - Documentation 15 > RULE: > ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+- > ---8--- > 10 0 > 11 The deskapps directory is maintained by Microsoft Product Support. > Products 76 > 12 represented here are Access, Word (for MS-DOS and Windows), Excel, > Flight 73 > 13 Simulator, Creative Writer, Fine Artist, Office, PowerPoint, > Project, 70 > 14 Publisher, Works and Money. 27 > 15 0 > 16 Each has its own directory, with appropriate sub-directories > below. See 72 > 17 the readme.txt in each directory for more information. 54 > 18 0 > 19 Please report any problems with this area to "ftp@microsoft.com". > Sorry, 73 > 20 individual replies to this alias may not be possible, but all mail > will be 75 > 21 read. Please, this is not a product support alias! 51 > 22 0 > > 23 CHAR .............ftp> quote site dirstyle 61 > ZONE 0000000000000677327767627676266777766222222222222222222222222 > NUMR 9999999999999640E015F45039450492349C5000000000000000000000000 > 24 0 > 25 > ====================================================================== 70 > 26 0 > 27 THE INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY 52 > 28 OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER 56 > 29 EXPRESSED OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY > 65 > 30 AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL 56 > 31 MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY 56 > 32 DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, > 64 > 33 CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN > IF 68 > 34 MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE > 68 > 35 POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE > EXCLUSION 68 > 36 OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES > 68 > 37 SO THE FOREGOING LIMITATION MAY NOT APPLY. > 68 > > 38 CHAR ................. 17 > ZONE 00000000000000000 > NUMR 99999999999999999 > > 39 CHAR ...Copyright Microsoft Corporation 1993. > 71 > ZONE > 00046777666724667676672467767676662333322222222222222222222222222222222 > NUMR > 9993F09297840D932F3F6403F20F2149FE01993E0000000000000000000000000000000 > 40 0 > NOTE: <<< 226 Transfer complete. > NOTE: >>> QUIT > NOTE: 40 records were read from the infile FTPDATA. > The minimum record length was 0. > The maximum record length was 76. > NOTE: DATA statement used: > real time 2.07 seconds > cpu time 0.00 seconds > > hth! > > Paul Choate > DDS Data Extraction > (916) 654-2160 > > -----Original Message----- > From: Gianluca Marchi [mailto:marchi.gianluca@LIBERO.IT] > Sent: Thursday, November 13, 2003 6:31 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: connect to FTP > > Dear All, > > I'm facing the following problem: i have to connect to ftp (case sensitive) > using the following sas code: > > filename anon ftp '' ls host='xx.xx.xx.xx.xx' user='smp_it' prompt; > > > data _null_; > infile anon; > input; > list; > run; > > Then I get the following error message: > > ERROR: Logon attempt by SMP_IT rejected by FTP server.. > > probably due to uppercase conversion of the user string. > > Can you confirm this? How can I solve it? > > Thanks in advance > Gianluca


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