BookmarkSubscribeRSS Feed
larkjr18
Fluorite | Level 6

Isn't that what the length statement does? Create the num_dob variable?

ballardw
Super User
data hi.student (drop=i);
   infile 'C:\Users\larkj\Desktop\STUDENT.DAT';
   length num_dob 8;
   input ssn 1-9 sex $ 11 term 17 type $ 19 div $ 21-24
   major 26-30 ed $ 32 state $ 34-35 sat 37-40 satm 42-44
   satv 46-48 gpa 50-53 rank 55-58 act 60-63 toefl 65-68
   honor $ 70 ethnic 72 year_dob 101-102 month_dob 103-104
   day_dob 105-106
   ;
   num_dob= input(char_dob,mmddyy10.);  /*<==== where does a value for char_dob come from??
                                        it is not on the input statement*/
   if char_dob eq '0' then call missing(num_dob);
   else num_dob=input(char_dob,mmddyy10. ??);
   Char_DOB = input(catx("/", month_dob, day_dob, year_dob),?? mmddyy8.); /* value assigned AFTER use above*/
   Total_DOB = input(catx("/", month_dob, day_dob, year_dob),?? mmddyy8.);

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
  • 16 replies
  • 3566 views
  • 0 likes
  • 4 in conversation