Hi,
I have successfully updated this dat file but the first observation is the variables (see attachment).
This is the code I have used it:
DATA patients;
INFILE '/.../uis.dat';
INPUT id $ age $ gender;
RUN;
How can I fix this?
Thanks!
Thanks so much!!
: )))))
Given what I saw in your screenshot, I suggest changes to your code:
data patients;
infile '/.../uis.dat' firstobs=2;
input id $ age gender $;
run;
as age is always numeric, and gender might actually be a character value. Once you know what is in the character columns, you can adapt the lengths by using a informat.
I also guess that the trailing n for the physical filename is not needed.
BTW, you do not need to encapsulate screenshots in Word documents. Save your screenshot as a picture, and use the "camera" icon to insert the picture directly in your post. Word documents make it harder for many of us to view the picture, as corporate firewalls block the download of a .docx and/or the use of the previewer (as that works on a cloud storage service)
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.
Ready to level-up your skills? Choose your own adventure.