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.
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.