由买买提看人间百态

topics

全部话题 - 话题: dbms
首页 上页 1 2 3 4 5 6 7 8 9 10 (共10页)
E********9
发帖数: 7
1
来自主题: Statistics版 - help on importing csv file to SAS
Thank you for your reply.
Below is the log I got:
proc import datafile="---.csv" out=sasuser.trial dbms=csv replace;
NOTE: The previous statement has been deleted.
NOTE: The previous statement has been deleted.
3 delimiter=",";
4 getnames=yes;
5 MIXED=YES;
-----
180
6 USEDATE=YES;
-------
180
7 SCANTIME=YES;
--------
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
8 run;
I
d*******o
发帖数: 493
2
I feel SAS is not an ideal DBMS.
(1) For large data sets, building indexes is necessary to merge or sort. SAS
has no performance tuner. It is very hard to optimize the indexing.
(2) SAS runs with single-tread. Most CPU right now have more than one core.
(3) No automation for database maintenance including backup/restore.
(4) Not many security options.
s******r
发帖数: 1524
3
%macro M_test;
%do i=1 %to 100;
PROC IMPORT OUT= WORK.a&i
DATAFILE= "h:\a&i..xls"
DBMS=EXCEL REPLACE;
SHEET="sheet1";
GETNAMES=YES;
MIXED=NO;
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;
RUN;
%end;
%mend M_test;
%M_test;
f*****a
发帖数: 693
4
Try this one. Can some one give some improvement, such as change variable
file into a file which includes all the to be input file names? Thanks.
%macro openfile(file);
%let file=all you file name list with space as delimiter (no space inside
file names);
%let i=1;
%let name=%scan(&file,&i);
%do %until(not %length(&name));
proc import out=work.&name
datafile="h:\&name"
dbms=excel replace;
sheet="sheet1";
getnames=yes;
mixed=no;
scantext
s*****p
发帖数: 299
5
来自主题: Statistics版 - 贴简历,请大牛们帮我看看
怎么看我的简历怎么都觉得很烂,如果自己是HR的人肯定也是直接扔垃圾箱的。请板上
的大牛们多多给我意见,最好能具体些。
先谢谢了!!!
Name
Address Phone:
Email
City,State


Education
• M.S. in Statistics,
• B.S. in Accounting

Summary
•Excellen... 阅读全帖
t****n
发帖数: 1879
6
来自主题: Statistics版 - SAS 数据读入的问题 (proc import)
code:
proc import out = work.n3
datafile="c:\n3.xls"
dbms=excel replace;
range="sheet1$";
getnames=YES;
MIXED=NO;
scantext=YES;
usedata=yes;
scantime=yes;
run;
d*******o
发帖数: 493
7
来自主题: Statistics版 - SAS 数据读入的问题 (proc import)
By default, in Proc import, SAS read the first 8 observations to decide the
variable type. You can add more rows for SAS to guess.
proc import out = work.n3
datafile="c:\n3.xls"
dbms=excel replace;
range="sheet1$";
getnames=YES;
MIXED=NO;
scantext=YES;
usedata=yes;
scantime=yes;
GUESSINGROWS=10000;
run;
If you try to control exact variable type or length, I suggest to transform
EXCEL to CSV. Then you will specify anything there.
C******y
发帖数: 2007
8
来自主题: Statistics版 - ] 怎么把ACCESS里的数据导入SAS?
PROC IMPORT OUT= data1
DATATABLE= "xxx"
DBMS=ACCESS2000 REPLACE;
DATABASE="c:\1\2.mdb";
RUN;
The code may vary depending on version of access and sas

出错
m*******g
发帖数: 3044
9
来自主题: Statistics版 - 怎么把文本文件(TEXT)转到SAS
我要把TEXT文件导入SAS里,以下是我的CODE:
proc import datafile="P:\ClaimsData.text" out=sasuser.claim1;
run;
错误显示是:
ERROR: Unable to determine datasource type. Please use the DBMS= option.
请问我该怎么改?
我的TEXT文见里有10万个数据. 是用"|"这个符号分隔的,我用SAS IMPORT WIZARD功能
导入进去了,但都是乱的呀.
谢谢
h******e
发帖数: 1791
10
来自主题: Statistics版 - 怎么把文本文件(TEXT)转到SAS
google这个DBMS= option是怎么用的。
s*****d
发帖数: 2667
11
来自主题: Statistics版 - 怎么把文本文件(TEXT)转到SAS
proc import datafile="P:\ClaimsData.text" out=sasuser.claim1;
~~~~~~~~~~~~~~~~~~~~~~~~~~.txt~~~~~~~~~~~
DBMS = identifier REPLACE;
run;
identifiers:
Tab-delimited .txt: TAB
Delimiters other than commas or tabs: DLM
l*****8
发帖数: 483
12
来自主题: Statistics版 - 请教 SAS import excel RANGE 的问题。
我有很多个excel file, column name 都是在第三行,但每个文件都有不同的数量的
row.
如果用range的话, range='A3:最后一个数据“
我想写macro, 因为每个文件的大小不一样, 请问我如何知道最后一个数据的range.
我只知道起点是A3
不希望需要手工写 A3:N5 或者A3:N99。。。。。
谢谢
%macro read_excel(filename,dataset_name,tab_name);
proc import out=&dataset_name
datafile="C:\Documents and Settings\gguo\Desktop\&filename..xls"
dbms=excel2000 replace;
range ="&tab_name.&A3:最后一个数据的range";
getnames=yes;
run;
s****y
发帖数: 297
13
来自主题: Statistics版 - questions about SAS import Excel data
我试了,加进去报错。。不知道为什么。
PROC IMPORT OUT= WORK.s1
DATAFILE= "E:\schools.xls"
DBMS=EXCEL REPLACE;
RANGE="Sheet2$";
GETNAMES=YES;
guessingrows=1000;
------------
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
MIXED=NO;
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;

RUN;
l*****8
发帖数: 483
14
来自主题: Statistics版 - import excel data problem
add memosize=1024 and see if it works.
Proc Import datafile="&flname" out=treat4 DBMS=Excel replace; Memosize=1024;
run;
p**5
发帖数: 2544
15
谁能看看这个error?谢谢
191
192 PROC IMPORT OUT= WORK.text
193 DATAFILE= "D:\Journal\2009_IF.xls"
194 DBMS=EXCEL REPLACE;
NOTE: The previous statement has been deleted.
NOTE: The previous statement has been deleted.
NOTE: The previous statement has been deleted.
NOTE: The previous statement has been deleted.
195 GETNAMES=NO;
NOTE: The previous statement has been deleted.
196 DATAROW=5;
-------
180
ERROR 180-322: Statement is not valid or it is used out of pr... 阅读全帖
l***a
发帖数: 12410
16
不是所有行都多了双引号,只有那些原来就有双引号的(比如引用了macro var)的行
,就会把原来双引号以外的部分另加双引号也括起来。。。这怎么解决?
我是用的proc export成.sas为扩展名的dbms=tab类型文件
o****o
发帖数: 8077
17
try Range Statement:
.... DBMS=EXCEL REPLACE;
RANGE="MYSHEET$A10:Z1000";
....
RUN;
S********a
发帖数: 359
18
谢谢!找了找,没搞懂encoding 怎么用,我的是windows 7, 下面的行不通啊
proc import datafile="Z:\a.xls" out=b DBMS=excel replace;
sheet="H"; getnames=yes;mixed=yes;
run;
data c (encoding=euc);
set b (encoding=euc);
run;
x*******u
发帖数: 500
19
来自主题: Statistics版 - help! 读CSV文件读得要崩溃了
谢谢大家的帮助, 最后是SAS Technical Support 解决了问题。
It looks like you may have a Unicode file that has a hex '00' between each
character. Are you using PROC IMPORT to read the file? Use a FILENAME
statement to create a fileref for the file you want to read. On the
FILENAME statement add the ENCODING=UNICODE option. Then in the PROC IMPORT
, use DATAFILE=.
For example,
filename temp 'c:\temp\qualityinfo.csv' encoding="unicode" lrecl=32767;
proc import datafile=temp out=quality dbms=csv ... 阅读全帖
p*********r
发帖数: 14
20
来自主题: Statistics版 - 急需:SAS developer
大家好,手上最近有个职位非常急需。 请发简历至 p**************[email protected]
Requirement:
Job Role: SAS Developer
Location: McLean, VA
Duration: Full Time
Required:
Experience as SAS developer using SAS Data Integration Studio (Required).
• Minimum 2+ years of experience in SAS Base, Macros and Error
Debugging (Basic Requirement).
• Basic understanding of Data warehousing concepts.
• Ability to deal with extremely large dataset.
• Uses Data Integration Studio ETL and traceability features to ensur... 阅读全帖
M*********t
发帖数: 250
21
来自主题: Statistics版 - 帮我看看如何导入.dat file into sas吧
我一直都这么做的,不知道怎么的今天code就不行了。。。
libname trial 'C:';
proc import datafile='C:\trial1.csv'
out=trial.item dbms=csv replace;
getnames=yes;
run;
error is "Physical file does not exist"...
但是trial这个路径下有trial1.dat file 啊
g******d
发帖数: 231
22
我用了下面的code把 .csv 文件import到SAS里。file有很多columns, 而且都带有小数
位。
PROC IMPORT OUT=work.getit
FILE="C:\source.csv"
DBMS=csv REPLACE;
GETNAMES=YES;
DATAROW=2;
RUN;
import之后出现了一个状况:有一个column不能import成功。
在log file中其他的column的import过程显示:informat varname best32. -->
format varname best12. (input varname)。
但是这个column的显示是informat varname $1. --> format varname $1. (input
varname $ ). 但是明明source file中,该column就是numeric的。
请大虾指教。这是怎么回事,有办法修正吗?
十分感谢!
x**********0
发帖数: 163
23
来自主题: Statistics版 - SAS macro to import multiple csv file??
I want to import multiple csv file
acc1990
acc1991
..
acc2010
I write a SAS macro like this
%MACRO importAcc (first=1990, last=2010);
%local year;
%do year=&first %to &last;
proc import datafile="C:\Users\acc&year..csv"
out=acc&year
dbms=csv
replace;
getnames=yes;
run;
%end;
%MEND importAcc;
%importAcc
But it is wrong and give back nothing, Can anybody help me with this? Thanks
t********m
发帖数: 939
24
如果我在一个文件夹下面有很多的sas data set,现在我想将它们全部转换成stata
data set,怎样方便快捷呢?我能想到的是写一个macro,但是文件名还是得一个一个
输,请教各位大牛,有没有什么办法能自动get到所有文件,然后转换后的文件default
就用原来的文件名?谢谢!
%macro convert(name);
proc export data=lib.&name
outfile="D:\work\&name..dta"
dbms=stata replace;
run;
%mend convert;
%convert(name1);
%convert(name2);
%convert(name3);
......
P**********c
发帖数: 17
25
一种方法:
你的文件名没有规律
%macro convert (infilelist=);
%let i=1;
%let infile=%scan(&infilelist,&i);
%do %while ("&infile"~="");
proc export data=temp.&infile
outfile="c:\temp\&infile..dta"
dbms=stata replace;
run;
%let i=%eval(&i+1);
%let infile=%scan(&infilelist,&i);
%end;
%mend convert;
%convert(infilelist=name1 name2 name3 ...);
二种方法:
如果你的文件名有规律,例如 name1 name2 name3 name4 ... name20
你可以再写一个macro,调用你自己写的convert macro
%macro out_to_stata... 阅读全帖
j*****7
发帖数: 4348
26
libname test "X:\XXX\XXX\XXX";
proc sql noprint;
create table ddfdata as
select memname as dataset label='Data Set Name',
name as variable label='Variable Name',
label label='Variable Label',
type label='Variable Type',
count (distinct memname) into :totmem
from sashelp.vcolumn where libname='TEST'
order by dataset,name;
quit;
%macro trans;
data _null_;
set ddfdata;
by dataset notsorted;
retain b 1;
if first.dataset then do;
call symput(compress(trim(left('member'||t... 阅读全帖
d******9
发帖数: 404
27
来自主题: Statistics版 - SAS MACRO question (包子求教重金酬谢)
If you do NOT have so many variables, you can rename the variables manually,
the below MACRO will work.
Please send me your BAOZI, thank you.
-------------------------------------------------------------
libname A 'your physical path';
****Use SAS MACRO to read in external CSV files from storage library.****;
filename Raw 'your physical path';
data AAA (drop=RC);
length Memname In_Name Out_Name $30;
Did=dopen("Raw");
if did> 0 then do;
Num=dnum(did);
do J=1 to Num;
Memname=dread(did, J);
In_Na... 阅读全帖
c*****a
发帖数: 16
28
来自主题: Statistics版 - SAS MACRO question (包子求教重金酬谢)
I will single out those different files first.
Also, since I have 49 variables, could you pls help me with how to get them?
If it is not easy, that is OK - I will do it mannually. Thanks a lot.
proc import datafile=Mem&I out= A.&&OUT&I(rename=(var1=Date &#
160; var2=Tier &#
160;var3= Ccy var4= Doc var5=Sd1y &#
160; var6=Sd2y))
DBMS=CSV REPLACE;
x*******u
发帖数: 500
29
来自主题: Statistics版 - SAS date format 的问题
有人给我一个数据, 两种格式, 一个是csv 原始数据, 一个是SAS data。
本来应该是一样的, 对比的时候发现
原始数据有两个variables是年份
year1 year2
2001 2002
2001 2003
2001 2002
...
SAS data里面却是
year1 year2
01JAN20:00:00:00 2002
01JAN20:00:00:00 2003
01JAN20:00:00:00 2002
如果我用proc import读取CSV原始data,
PROC IMPORT OUT= WORK.mydata
DATAFILE= "c:\mydata.csv"
DBMS=CSV REPLACE;
GETNAMES=YES;
RUN;
得到的SAS data跟别人给我的一样。year1 也是怪怪的。
如果我copy and paste上面import程序的log, 然后删掉year1 的format(DATETIME.)
和informat(ANYDTDTM40.),
得到的year... 阅读全帖
p******s
发帖数: 229
30
please see the log as follows:
40 proc import datafile= 'C:Projectsrawdata.xls' out= w1
41 dbms= excel ;
The SAS/ACCESS Interface to PC Files is not installed. Please install this
module in order to IMPORT/EXPORT to these file types.
NOTE: The SAS System stopped processing this step because of errors.
Then I checked if SAS/ACCESS is installed. please see the following:
42 proc setinit ; run ;
NOTE: PROCEDURE SETINIT used (Total process time):
System birthday: 27FEB2013.
Operating Sys... 阅读全帖
t**i
发帖数: 688
31
来自主题: Statistics版 - 求帮助:excel数据转csv和sas的读取
Use proc import with DBMS=excelcs
c**********e
发帖数: 2007
32
来自主题: Statistics版 - proc export to Excel: can not read it!
I use the following code to tranform a SAS dataset an Excel file on Unix.
libname myfolder '/abcd/efgh/ijkl';
proc export DBMS=XLS
data=myfolder.mydata
outfile="/abcd/efgh/ijkl/myfile.xls"
replace;
run;
quit;
But my Excel file can not be opened. Anybody knows how to solve it?
The error message:
"Excel found unreadable contents in 'myfile.xls'.
Do you want to recover the contents of this workbook?
If you trust the source of this workbook, click Yes."
c**********e
发帖数: 2007
33
来自主题: Statistics版 - Is the following SAS code wrong?
Could you anybody test running the following SAS code? Of course, the output
path should be changed to yours. Thanks a ton!
data one;
input x y;
datalines;
-1 -1
-1 0
0 -1
0 1
1 0
1 1
;
run;
proc export DBMS=CSV
data=one
outfile="C:/Users/CareerChange/My Documents/one.csv"
replace;
putnames=yes;
run;
quit;
k*****n
发帖数: 361
34
来自主题: Statistics版 - 大家觉得这种职位薪水多少
We have modest goals: Improve the lives of others. Change the landscape of
health care forever. Leave the world a better place than we found it. Such
aspirations tend to attract a certain type of person. Crazy talented.
Compassionate. Driven. To these select few, we offer the global reach,
resources and can-do culture of a Fortune 17 company. We provide an
environment where you're empowered to be your best. We encourage you to take
risks. And we offer a world of rewards and benefits for performa... 阅读全帖
l*****o
发帖数: 61
35
来自主题: Statistics版 - "Failed to connect to the server" SAS 9.4
新装了SAS9.4。用proc import to import excel file to 撒施.可是以前好好的程序
现在老是出"failed to connect to the server" error。 这是怎么回事啊?难道还象
SAS9.3那样子要单独装PC file server吗?
libname mylib "c:saslib";
proc import datafile='C:FMData_MMST2012.xlsx'
out=mylib.FM2012
dbms=excelcs replace;
sheet='FApp';
run;
a*******g
发帖数: 80
36
来自主题: Statistics版 - Cannot import data into sas
I imported this data set before but after reinstalling sas 9.3, I ran the
same
codes and was returned with sas error:
ERROR: This DBMS table or view cannot be accessed by the SAS System because
it contains column
names that are not unique when a SAS normalized (uppercased) compare
is performed. See
"Naming Conventions" in the SAS/ACCESS documentation.
ERROR: Import unsuccessful. See SAS Log for details.
How can I solve it?
Thanks very much!!
n*****t
发帖数: 1015
37
比如第一个loop里yr=2005, mon=1,我在log file里得到这样的error message:
ERROR: Physical file does not exist, E:vrpdata_analysishighfreq_datastk_list_
2004.txt.
ERROR: Import unsuccessful. See SAS Log for details.
ERROR: File ORIG.MT_.DATA does not exist.
ERROR: File WORK.YR_1.DATA does not exist.
我的程序如下:谢谢!
%macro subsetall;
%do yr=2005 %to 2006;
data _null_;
if &yr<=2005 then idxm=12;
else idxm=6;
call symput('idxm',idxm);
run;

%put &idxm;
%do mon=1 %to &idxm;
... 阅读全帖
a******5
发帖数: 199
38
来自主题: Statistics版 - 统计学位的有不会R的?
本人是金融的,真心不懂,真心请教:data scientist还用SQL吗?难道现在互联网上
collect的数据还是用Relational DBMS吗?
i**z
发帖数: 194
39
来自主题: Statistics版 - 紧急求助!!!
先 load data 到 SAS 里面, proc import datafile="" out= dbms=xls; getnames=
yes;run;
x*******u
发帖数: 500
40
来自主题: Statistics版 - SAS proc import excel file 紧急求助
Thanks. But there is an error message.
1040 PROC IMPORT OUT= WORK.US_pre
1041 DATAFILE= "G:\mydata.xlsx"
1042 DBMS=EXCEL REPLACE;
1043 GETNAMES=YES;
NOTE: The previous statement has been deleted.
1044 MIXED=YES;
1045 SCANTEXT=YES;
1046 USEDATE=YES;
1047 SCANTIME=YES;
1048 GUESSINGROWS=MAX;
------------
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
1049 RUN;
而且那个variable value有长有短。
k*****n
发帖数: 361
41
来自主题: Statistics版 - SAS EG输出到excel 2010多tab一直不行
想用macro输出结果到一个excel多tab上,但是一直出错说EG是32bit,2010是64bit,
google了也没好办法,code如下
%macro exportexcel(indata,sheetnm);
proc export data= &indata
outfile="\la.comaddgroupincmdm.xlsx"
DBMS=XLSX REPLACE;
SHEET="&sheetnm";
newfile=yes;
VERSION=2010;
run;
%mend;
%exportexcel(myfile_d.AddGroupNOTInCMDM,Sheet1);
%exportexcel(myfile_d.AddGroupInCMDM,Sheet2);
l**********8
发帖数: 305
42
来自主题: Statistics版 - sas import .xlsx
请教各位, log这么报错,是为什么
342 PROC IMPORT OUT= WORK.lung
343
344 DATAFILE= "E:summer projectBaliketal.xlsx"
345
346 DBMS=EXCEL REPLACE ;
347
348 GETNAMES=YES;
349
350 MIXED=NO;
351
352 SCANTEXT=YES;
353
354 USEDATE=YES;
355
356 SCANTIME=YES;
357
358 RUN;
ERROR: Connect: Class not registered
ERROR: Error in the LIBNAME statement
另外问一下,我excel 有2页sheet, 是否能一次一次import
K***a
发帖数: 72
43
来自主题: Statistics版 - SAS 转 Excel
Try this:
proc sql noprint;
select count(*), memname into :tb1-:tb100, :numDs
from sashelp.vtable where libname="Urlibname";
quit;
filename outfname ".../Libname.xlsx";
%macro expdt;
%do i = 1 %to &numDs;
proc export data=&&tb&i
outfile=outfname dbms=xlsx replace;
sheet=&&tb&i;
run;
%end;
%mend;
%expdt;
A*****a
发帖数: 1091
44
我用SAS9.4,32-bit office, installed PC files server,可以import excel
需要DBMS=EXCELCS
http://blogs.sas.com/content/sasdummy/2012/05/01/64-bit-gotchas

in
a******g
发帖数: 116
45
filename in ftp 'newfile.csv'
host = 'hostname.com'
user = 'sasuser'
pass = 'passwd'
port = 11
debug;
proc import datafile = in out =ff dbms =csv replace;
run;
要求直接从server上读。
我是有哪里不对吗,每次都显示
error:invalid reply receieved from ftp server
error:import unsuccessful. see sas log for detail.
请大神帮忙看看。谢谢!
R******d
发帖数: 1436
46
我有一个很大的数据集,要计算25000个变量和将近3000个变量之间的相关性。
结果出来,发现有很多空行没有相关系数,比如L19, L33这样的。如果把为空的数据点
(L19, L33)单独拿出来,则可以算出结果。请问这是什么问题?
谢谢了。
data mydata;
infile "/dir/file" firstobs=2 lrecl=2000000;
input C1-C25000 L1-L3000;
run;
proc corr data=mydata outp=corr(where=(_NAME_ ne "") drop=_TYPE_) noprint;
var C1-C25000;
with L1-L3000;
run;
proc export data=corr
outfile="/dir/out"
dbms=tab replace;
run;
i**i
发帖数: 1500
47
这是在比较苹果和橘子
Big data = big + unstructured data. 解决存储什么的问题
Datamining = data --> information. 描述一个分析的过程
wiki:
Big data can also be defined as "Big data is a large volume unstructured
data which can not be handled by standard database management systems like
DBMS, RDBMS or ORDBMS".
c*********i
发帖数: 2749
48
来自主题: CellularPlan版 - s信号好强,美国基站信号普遍较弱
每个国家甚至每个运营商对于标准的制定都是不同的,中国移动的规范规定,手机接收
电平>=(城市取-90dBm;乡村取-94dBm)时,则满足覆盖要求,也就是说此处无线信号强度
满足覆盖要求,即接受电平>=-90dBm,就可以满足覆盖要求,大家也可以用这个值去衡
量自己的信号是否达标。
http://www.igao7.com/news/201406/0116-ben-dbm.html
信号情况
一般情况下,-40到-50为基站附近、 -50到-60为信号强、 -60到-70为良好、-70到-80
为信号微弱、-80到-90为较弱、-100的话建议开启飞行模式,不然耗电有辐射大。
http://www.wuji8.com/meta/45401112.html
中西部大农村,Verizon经常是-100甚至更低,Sprint好一些,锁定在3G模式可以保持
在-70~-90
a***a
发帖数: 2493
49
来自主题: CellularPlan版 - freedompop 显示3G R不能用数据
按4楼所说,手动选operator,先试att,你既然h2o没问题,fp也应该没问题,区别
是fp只能最高上到hspa+,不支持lte。
在android下:
用“gsm signal monitor”, 看看连的是否hspa+
用 “lte discovery”看看连hspa+时的dbm是多少
还有你没说清楚,是不是在家不行,一出家门就可以?出门离家有多远?
f****o
发帖数: 4067
50
来自主题: CellularPlan版 - Freedompop GSM LTE 卡很操蛋啊

gsmarena 显示 D801没有BAND 17. 我用att的zte zmax2, lte discovery显示lte连
band 17, 110-115 dbm
首页 上页 1 2 3 4 5 6 7 8 9 10 (共10页)