create a file using filename FTP method

  • Follow


Hello:

I tried to create a file (test.dat)  using FTP method and can not figure out
what's wrong with the code, please help.

 14         filename x ftp   'test.dat' cd='/omf/he/sas'
15                  host='10.12.81.251'
16                  user='dhh\bjiang02' pass=XXXXXXXXXXXXXXXXXXXXXX recfm=v;
17         data _null_;
18         file x;
19          do i=1 to 10;
20               put i=;
21            end;
22
23         run;

NOTE: 220 Microsoft FTP Service
ERROR: Physical file does not exist, test.dat.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds



thanks,
baogong
0
Reply bgjiang 1/7/2010 7:27:20 PM

1) Make sure you have write access to the directory by using some
other FTP tool to create a file there.
2) Getting rid of the CD=3D option and including the path in the quoted
filename.
3) Your error message mentions Windows perhaps you need to use \
instead of / in your path.

On Jan 7, 2:27=A0pm, bgji...@GMAIL.COM (baogong jiang) wrote:
> Hello:
>
> I tried to create a file (test.dat) =A0using FTP method and can not figur=
e out
> what's wrong with the code, please help.
>
> =A014 =A0 =A0 =A0 =A0 filename x ftp =A0 'test.dat' cd=3D'/omf/he/sas'
> 15 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0host=3D'10.12.81.251'
> 16 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0user=3D'dhh\bjiang02' pass=3DXXXXXX=
XXXXXXXXXXXXXXXX recfm=3Dv;
> 17 =A0 =A0 =A0 =A0 data _null_;
> 18 =A0 =A0 =A0 =A0 file x;
> 19 =A0 =A0 =A0 =A0 =A0do i=3D1 to 10;
> 20 =A0 =A0 =A0 =A0 =A0 =A0 =A0 put i=3D;
> 21 =A0 =A0 =A0 =A0 =A0 =A0end;
> 22
> 23 =A0 =A0 =A0 =A0 run;
>
> NOTE: 220 Microsoft FTP Service
> ERROR: Physical file does not exist, test.dat.
> NOTE: The SAS System stopped processing this step because of errors.
> NOTE: DATA statement used (Total process time):
> =A0 =A0 =A0 real time =A0 =A0 =A0 =A0 =A0 0.00 seconds
> =A0 =A0 =A0 cpu time =A0 =A0 =A0 =A0 =A0 =A00.01 seconds
>
> thanks,
> baogong

0
Reply Tom 1/7/2010 9:09:04 PM


1 Replies
202 Views

(page loaded in 0.112 seconds)

Similiar Articles:













7/23/2012 10:13:43 PM


Reply: