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.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.