First try the anydtdtm with a 32 width. Sometimes using the full width allowed works better, or don't specify one at all.
What file format is your raw data file? Since you are showing code for a data set already in existence you may want to back up a step.
If you start with Excel and are using Proc import you might try saving the data as CSV before attempting to import it. Use a largish value for a guessingrows parameter.
Your code is nice, but without an example of the data we can't say much.
Your code does not make sense. If you already have a dataset, you need no input statement, as the set statement does the read.
If you want to read from an external file, you have to use an infile statement to open the file for INPUTting.
Post an example of your raw data file, as a properly created data step will very probably fix your problems in one sweep.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.