BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
pacruz
Calcite | Level 5

DATA two;
infile 'C:\Users\paul\Downloads\btt.dat';
input Childid 1-4 Sex 6 Bweight 8-11 Gestage 13-14 Momage 16-17
Parity 19 Mdbp 31-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 ldl5 59-62 trig5 64-67 smoke5 69 medaid5 71
socio5 73;
 if (Msbp >= 140) and (Mdbp >= 90) then class = 'Hypertension';
 if (Msbp >= 140) and (Mdbp < 90) then class = 'Isolated systolic hypertension';
 if (Msbp <= 140) and (Mdbp >= 90) then class = 'Isolated siastolic hypertension';
 if (Msbp < 140) and (Mdbp < 90) then class = 'Normotensive';
run;
proc print data=two (obs=10);
var class;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Copy the code an message from the log. Also paste code and logs into a code box using the {i} icon in the forum. Otherwise the pasted text gets reformatted making it harder to read sometimes. Log information often includes position indicators that get moved in that reformat hence use the code box.

View solution in original post

1 REPLY 1
ballardw
Super User

Copy the code an message from the log. Also paste code and logs into a code box using the {i} icon in the forum. Otherwise the pasted text gets reformatted making it harder to read sometimes. Log information often includes position indicators that get moved in that reformat hence use the code box.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1116 views
  • 0 likes
  • 2 in conversation