OLE對象的類沒有在注冊數據庫中注冊
64位系統:
- 保證系統時間正確,處于當時的北京時間。
2.在C:\windows\SysWOW64\文件夾搜索mscomctl.ocx,不存在就下載一個,然后放到C:\windows\SysWOW64\。
3.在C:\windows\搜索cmd.exe,右鍵以管理員身份打開cmd.exe。 - 輸入一下命令:regsvr32.exe C:\windows\SysWOW64\mscomctl.ocx。顯示注冊成功信息即可。
- 不要關閉上面的cmd窗口,在SAS安裝文件夾搜索EditorControl.ocx,不存在就下載一個,然后記錄該文件的路徑,如:D:\SAS92\SharedFiles\EnhancedEditor\EditorControl.ocx。
- 在cmd.exe輸入一下命令:regsvr32.exe D:\SAS92\SharedFiles\EnhancedEditor\EditorControl.ocx。顯示注冊成功信息即可。
- 問題已經解決,打開SAS試一下吧。歡迎大家共同討論!
0 SAS程序
*數據步;
data 數據集名;
input 變量名;
cards;
數據
;
run;
*過程步;
proc 過程名 data=數據集名 [選項】;
過程步語句; /*過程步語句用于輔助SAS的實現,
VAR 指定需要分析的變量
WHERE 指定一定的分析條件
BY 指定變量的分組情況
MODEL 指定分析的模型
run;
1 .1 數據步
*data step;
input 變量名 [$] [選項(數據格式)] [@(默認 一行一個觀測)/@@];
infile 文件路徑 [選項];
示例
data stud; /*data work.stud data abc.stud 此注釋任意位置 *xxx;單獨一行/
input id$ name$ gender$ age hometown$ ;
cards;
201501001 周國興 男 19 長沙
201501002 李銘 女 18 廣州
;
*proc step;
proc print data=stud;
run;
DATA bands;
INFILE 'd:\data0520\bands.csv' DLM =',' DSD MISSOVER FIRSTOBS = 2;
INPUT BandName :$30. GigDate :MMDDYY10. EightPM NinePM TenPM ElevenPM;
RUN;
PROC print DATA = bands;
TITLE ’Customers at Each Gig’;
RUN;
title ‘成績統計’; /*此程序用于成績的簡單統計*/
data test; /*建立一個臨時數據集test*/
input nunmber math chinese english physics chemistry; /*列出輸入的數據名*/
avg = (math+ chinese+english+physics+chemistry)/5;
cards;
101 74 89 86 92 67
102 81 76 68 84 79
103 70 98 70 88 76
;
run;
proc print; /*打印輸入的成績數據集*/
run;
proc sort data=test; by descending avg; /*按均值對成績進行降序排列*/
run;
proc print; /*打印出排序后的成績*/
run;
1.2 數據步常用語句
*put;
data;
x=3;
put x;
put x= ;
run;
*length,label;
data test2_15;
length city$ 10; /*指定變量長度,默認為8*/
label city='城市' zip='郵政編碼'; /*為變量加上標簽*/
input city$10 zip; /*數據輸入*/
cards;
Birmingham 35201
Montgomery 36101
Huntsville 35801
Tuscaloosa 35401
Mobile 36601
;
run;
*keep drop;
/*where
where x >100;
where x betwee 100 ad 200;
where x i (10,20,30);
where x>100 &y>100;
*/
2.1 過程步
*output;
proc means data=sashelp.shoes; /*SAS的均值計算過程*/
var Sales; /*對變量sales進行均值分析*/
*輸出結果數據到數據集resultmean,并指定均值分析的幾個統計量的結果名 ;
output out=resultmean n=n_result min=min_result max=max_result mean=mean_result;
run;
*var;
*class;
data test2_22; /*創建數據集*/
input number grade;
cards;
1001 95
1002 89
1003 75
1004 90
1005 97
;
run;
proc means data=sashelp.class;
class sex; /*按照性別分類計算均值*/
var height;
run;
3.1 常用函數
https://wenku.baidu.com/view/41849311cd7931b765ce0508763231126edb77ac.html