I am trying to create a new variable "bmi" and print only variables childid, ht5, bweight, and bmi. When I run this I keep getting these errors. What am I missing? data question2;
infile "/home/u59352003/btt.dat.txt";
input childid 1-4 sex 6 bweight 8-11 gestage 13-14 momage 16-17 parity 19 mdbp 21-23 msbp 25-27 momeduc 29 mmedaid 31; socio 33 dbp5 35-37 sbp5 39-41 ht5 43 -47 wt5 49-52 hdl5 54 -57 trig5 64-67 smoke5 69 medaid5 71 socio5 73;
bmi = bweight/(ht5^2);
run;
proc print data = question2 (obs=10);
var childid ht5 bweight bmi
run; 76 ERROR 180-322: Statement is not valid or it is used out of proper order. ERROR 22-322: Syntax error, expecting one of the following: <, <=, =, >, >=, EQ, GE, GT, LE, LT, NE, NG, NL, ^=, ~=. ERROR 76-322: Syntax error, statement will be ignored.
... View more