Hello Friends
I have the following programe. Can you please help me whether is there any issue with this code?
DATA test5;
INFORMAT LASTNAME $20. DOB MMDDYY8. GENDER $1.;
INPUT ID LASTNAME $12. DOB mmddyy8. HEIGHT 2. WEIGHT 3. GENDER $1. AGE 2.;
FORMAT DOB MMDDYY8.;
DATALINES;
1 SMITH 1/23/66 68 144 M 26
2 JONES 3/14/60 78 202 M 32
3 DOE 11/26/47 62 99 F 45
4 WASHINGTON 8/1/70 66 101 F 22
Run;
PROC PRINT;
TITLE 'Example 3.1';
RUN;
Thanks in advance.
something like this should work. plesse look into this link which will help you understand . http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a003209907.htm
DATA test5;
informat lastname $12.;
INPUT ID LASTNAME $ DOB: mmddyy8. HEIGHT WEIGHT GENDER $ AGE ;
FORMAT DOB MMDDYY8.;
DATALINES;
1 SMITH 1/23/66 68 144 M 26
2 JONES 3/14/60 78 202 M 32
3 DOE 11/26/47 62 99 F 45
4 WASHINGTON 8/1/70 66 101 F 22
Run;
PROC PRINT;
TITLE 'Example 3.1';
RUN;
something like this should work. plesse look into this link which will help you understand . http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a003209907.htm
DATA test5;
informat lastname $12.;
INPUT ID LASTNAME $ DOB: mmddyy8. HEIGHT WEIGHT GENDER $ AGE ;
FORMAT DOB MMDDYY8.;
DATALINES;
1 SMITH 1/23/66 68 144 M 26
2 JONES 3/14/60 78 202 M 32
3 DOE 11/26/47 62 99 F 45
4 WASHINGTON 8/1/70 66 101 F 22
Run;
PROC PRINT;
TITLE 'Example 3.1';
RUN;
Thanks a lot. Highly appreciated. This works.
I will check out the link you provided for more info.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.