Currently, i have dataset which is combination of multiple txt file. Now, i want to create a variable called Date (the value should be extracted from the description part called start date for each dataset) Can you please help? If you see the start date, it repeats every 133 rows from the first dataset. I want date to be displayed from the each start date.
I am attaching the dataset. [https://docs.google.com/spreadsheets/d/1fswojOKc0WtGh1hVJQfm39p6qf-eAojN/edit?rtpof=true#gid=5924645...]
Please post datasets as self-contained data steps with datalines.
Your google drive is not publicly accessible, BTW.
From your description, I guess you need to RETAIN date, and set it whenever start_date is not missing.
As already stated, the best way to post data is a data step with datalines. No virus scans, no blocking firewalls, and on top we get an exact picture of your dataset, which we NEVER gef from a spreadsheet.
So you get that as text files. Please open such a text file with an editor (do NOT open it with Excel!) and copy/paste the header and the first few data lines into a window opened with the </> button. We can then provide you with code that reads the data correctly from the text files in the first place.
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 16. 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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: