data hrd.newtemp; set hrd.temp; Salary=payrate*hours; run;
data hrd.newtemp; set hrd.temp; Salary=payrate*hours; run;
9246 data hrd.temp; 9247 set hrd.temp; 9248 salary=payrate*hours; 9249 run; NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column). 9248:8 NOTE: There were 10 observations read from the data set HRD.TEMP. NOTE: The data set HRD.TEMP has 10 observations and 16 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds
Rate=payrate;
Salary=payrate*hours;
if payrate>=rate;
NewRate=sum(payrate,raise);
Character Value
|
Automatic Conversion
|
Numeric Value
|
---|---|---|
12.47 |
→
|
12.47
|
-8.96 |
→
|
-8.96
|
1.243E1 |
→
|
12.43
|
1,742.64 |
→
|
.
|
data work.convtest; Number=4; Character='4'; run; proc print data=work.convtest; where character=4; run; proc print data=work.convtest; where number='4'; run;
9254 data work.convtest; 9255 Number=4; 9256 Character='4'; 9257 run; NOTE: The data set WORK.CONVTEST has 1 observations and 2 variables. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.01 seconds 9258 proc print data=work.convtest; 9259 where character=4; ERROR: WHERE clause operator requires compatible variables. 9260 run; NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE PRINT used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 9261 proc print data=work.convtest; 9262 where number='4'; ERROR: WHERE clause operator requires compatible variables. 9263 run; NOTE: The SAS System stopped processing this step because of errors.
Syntax, INPUT function:
INPUT(source,
informat)
|
Character Value
|
Informat
|
---|---|
2115233 |
7.
|
2,115,233 |
COMMA9.
|
Test=input(saletest,comma9.);
input(payrate,2.)
data hrd.newtemp; set hrd.temp; Salary=input(payrate,2.)*hours; run;
9272 data hrd.newtemp; 9273 set hrd.temp; 9274 Salary=input(payrate,2.)*hours; 9275 run; NOTE: There were 10 observations read from the data set HRD.TEMP.
26/DP
).
data hrd.newtemp; set hrd.temp; Assignment=site||'/'||dept; run;
Syntax, PUT function:
PUT(source,
format)
|
data hrd.newtemp;
set hrd.temp;
Assignment=put(site,2.)||'/'||dept;
run;
proc print data=hrd.newtemp;
run;
9355 data hrd.newtemp; 9356 set hrd.temp; 9357 Assignment=put(site,2.)||'/'||dept; 9358 run; NOTE: There were 10 observations read from the data set HRD.TEMP. NOTE: The data set HRD.NEWTEMP has 10 observations and 17 variables.