/*練習(xí)1: 把文件夾中class1數(shù)據(jù)和class2數(shù)據(jù)縱向合并起來*/
data study.class12;set study.class1 study.class2;
run;
proc print data=study.class12;
run;
/*ERROR: Variable weight has been defined as both character and numeric.兩個(gè)表中的weight是不同類型的變量*/
data study.class12;set study.class1 study.class2(rename=(weight=wweight));
run;
proc print data=study.class12;
run;
class1
class2
class12
/*練習(xí)2: 把文件夾中class1數(shù)據(jù)和class3數(shù)據(jù)縱向合并起來,用兩種方式實(shí)現(xiàn)(class1和class3互換位置)觀察效果*/
data study.class13;set study.class1 study.class3;
run;
proc print data=study.class13;
run;
/*WARNING: Multiple lengths were specified for the variable weight by input data set(s). This can cause truncation of data.
WARNING: 輸入數(shù)據(jù)集為變量“weight”指定了多個(gè)長(zhǎng)度。這會(huì)造成數(shù)據(jù)截?cái)唷?數(shù)據(jù)截?cái)郼lass1中weight比class3的長(zhǎng)度短得多*/
data study.class31;set study.class3 study.class1;
run;
proc print data=study.class31;
run;