Here is a challenge for the SAS community. I have been given a word document from a colleague that is an output table from a SAS program form years ago. They do not have access to the original program or the original data. I need to input the data back into SAS. The problem is the file is in true report format, multiple headers, multiple lines for the headers and very irregular structured variable name - value placement for Filename commands.
I do not know where to start which is why I have no code attached, only a snippet of the word document. Please help, good luck.
Your first step is to save/as the file as a text file
Great... and then.
I just want to make sure you are aware that changing the document from .doc to .txt doesn't change or alter the problem. I think I understand what you are getting at but I am not sure you grasp the real issue. If you need to re-read the post you can, its up top.
You may get "a table" from one of the extraction tools. You still will have a LONG way to go to get a working data set because you will have to parse cells to extract multiple values from cells or different values that occur within the same column. SAS data sets one variable (or column) is a single value: Name, measurement, code value, what have you. That document has multiple values stacked in single columns.
I can and have read such "data" layouts (actually looks like a set of report tables). It is not a trivial or beginning exercise.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.