This is my code:
data weight_club;
input IdNumber 1-6 Name $ 7-24 Team $ Job_title $ Salary StartWeight EndWeight Hire_date;
/*Loss=StartWeight-EndWeight;*/
datalines;
1023 David Shaw red Trainee 10000 189 165 122015
1049 Amelia Serrano yellow Trainee 20000 145 124 122015
1219 Alan Nance red Trainee 30000 210 192 122015
1246 Ravi Sinha yellow Trainee 10000 194 177 122015
1078 Ashley McKnight red Engineer 40000 127 118 122015
;
/*label Job_title='Sales Title'
Hire_date='Date Hired';
format Salary dollar8.;
format Hire_date ddmmyy10.;
var Name Job_title Salary Hire_date;*/
format Hire_date mmddyy10.
run;
proc print data = weight_club;
title " Fitness Center Weigh Club";
run;
I get this error:
Move the format statement up, also your code gives other problems when reading the data from datalines - idnumber is not 6 characters long.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.