04-16-2014 10:24 PM
I have using a web crawler to find multiple instances of keywords (in the code I am searching for "Notional") from sec files (see the code attached). I am using the prxnext function to do the job. But I am having a problem when I am trying to output lines surrounding the keywords. I am trying to increase the output lines for every instance of the keyword in the sec file. E.g. if there are 5 instances of "Notional" in the sec file, i am trying to output lines surrounding each one of the instances of the keyword (see the attached sas code)
But this code is not able to increase or decrease the output lines surrounding the keywords even by changing 10 to 15 or 5. Can anyone help with the issue? I have attached the code and a sample excel file.
03-20-2017 06:18 AM
could you please provide an example that is describing the problem?
Your excel-file seems to contain no information and your dataset 'sonik' is missing. It would be best, if you could provide some sample dataset, so that we can work on the problem without having to crawl the websites.
From what I understand, you want to output certain rows of a dataset.
For instance row 50, because some condition applies and then you also want row 49 and row 51, because they surround row 50?!
There are a number of ways, you could achieve that. Possibly a retain statement (with optional by-processing) could do the trick.
Another option would be to use a hash and hash-iterator.