I have a data file with first name line like this
#ID Time Concentration Age Sex Weight etc.
Other lines below are numerical numbers. When I use INFILE statment to input the data file, I found that the "#" is not recognized (so, I used INPUT ID Time Concentration Age Sex Weight etc.), but this did not stop me from further processing the data. The problem is that I would like to keep #ID when I output the post-processed data file. I am hoping get some help about how to either keep # at the first place or add this symbol later.
Share what SAS code you are using, preferably in a SAS-generated log with all code revealed. Also, your SAS version, OS platform, whether running SAS local or remote (connection) is always helpful with getting an accurate and effective reply from forum subscribers.
So, if your point: "I would like to keep #ID when I output the post-processed data file" means that you want to have the first observation contain the data-string found in the header record of your input data, consider that the remaining observations (for the #ID variable) must also be CHARACTER, instead of NUMERIC. This will present challenges with sorting data.
You may want to clarify what your INPUT data looks like and also what you would like to see any OUTPUT (report, SAS dataset) look like. And also clarify why you want the #ID, given that the remaining rows are "numerical numbers".
The PROC EXPORT support for SAS label in the header is not until SAS 9.2. You may want to consider the DS2CSV macro for your export needs to a simple CSV, if you must have SAS variable label information in the output's column header.
Suggested Google advanced search argument, this topic/post: