Hi, I have a question.
In my SAS log, I there are many occurrences of the following text which is split over 2 lines for example.
NOTE: The above message was for the following BY group:
Unique Subject Identifier=ABCD-123-4567-ABC0001-027 DAGRPID=DA
This text is "buried" in other varying text, example below:
ERROR: The ID value "XITDISP" occurs twice in the same BY group.
NOTE: The above message was for the following BY group:
Unique Subject Identifier=ABCD-123-4567-ABC0001-027 DAGRPID=DA
ERROR: The ID value "XITDISP" occurs twice in the same BY group.
ERROR: The ID value "XITDISP" occurs twice in the same BY group.
ERROR: The ID value "XITDISP" occurs twice in the same BY group.
I want to read in only the 2 lines I mention at the top of my post and store all of those in a data set. There are many occurrences of these 2 lines throughout my log file and the text above and below varies.
Any help would be apreciated.
Thanks.
Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.
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.