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)
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.