Why HAVING clause in PROC SQL doesn't turn blue? - sas

I am creating an output that has duplicate values, but the HAVING clause doesn't turn 'blue'.
The code does what it is supposed to do though.
Could anybody explain why HAVING is not 'blue' and if this is a problem?

DM has its quirks, and this looks like one of them. Enterprise Guide highlights it correctly. As long as it works, don't worry about highlighting - if it doesn't work of course it can be an indication of a problem, but in this case it's fine.

Related

How to get means in LSMEANS in SAS 9.3

I am trying to get mean from the LSMEANS statement in SAS 9.3 but from the documentation on SAS website, it seams they have removed the means from default in the LSMEANS statement.
Per the documentation i am using ILINK option which is giving me "Mu", but that seem to be exactly same as my "Estimate"
Can anyone please help me on how we can get Mean in LSMEANS?
Thanks in advance!
I don’t think there has ever been a MEANS option in LSMEANS. Some procedures like GLM have MEANS statements in their own right, and I’m guessing that’s what you’re thinking of. In general, MEANS would often make no sense in GENMOD, which would explain why it is not available.

How to link multiple ports from a Expression to multiple groups of a Union

I add an image in order to explain myself better.
I have 300 something ports in a expression. I have created the equivalent number of groups in a union. I want each port of this expression to go to a port/field of the Union. One to one relationship. It seems like powercenter is not able to do this with autolink, or at least I'm unable to find the proper way to do this. How could I work arround this issue? Because I've been told that is likely that in a few days it will be more than 700 ports, and the amount it takes to do by hand is quite insane. Thanks in advance.
I'm surprised it validates... union is for homogenous sources but you seem to be trying to pivot your data (in which case I'd suggest using another transformation i.e. a normalizer and Informatica will start behaving as expected)
Possible solution: make a bunch of connections, save and export the file as xml, go to the lines when the connections are done, and replace that zone with as many rows as you need.
What I did specifically was to get the original rows, change the names as appropiate with the help of notepad++ and excel, and then go back to the original file and replace all of it. Check everything three times, and import the file back to powercenter.
I say possible solution because it's messy and dirty, but even though it may lead to mistakes I feel like the amount is vastly inferior and you have the versioning on your side, so just save before exporting. If someone with more experience could tell me it's thoughts about this, it would be a great opportunity to learn, just leaving this in case it goes unanswered

SAS Code to examine another SAS program

I have a bit of a problem trying to code up what I want to do in SAS and I was hoping to get some advice from someone. I was wondering if it is possible to write code that will examine another piece of existing SAS code and bring up a list of the required input datasets and variables. I am wanting to invoke other SAS code in an automated process using the %include function and a prompt for the user to define the exact name/ location of the code as this will be different every time. But before this I want to somehow check this code, rename an existing dataset to be the input dataset and check that I have all the required variables before running the %include.
I was hoping someone might be able to tell me if this is at all possible and if so what function I would use. I am using EG 5.1 if that makes any difference.
Thanks for your help.
Steph.
P.S. Thanks for your help guys. Sorry if this question is outside the scope of this site, I thought there might be a simple function to achieve this, similar to %include. Also, I have never posted on this site before so apologies if I did stuff wrong.

Using Clojurescript with Light Table

I have been trying to use Clojure Script with Light Table and lein-cljs without much success.
The main problem seems to be with dependencies. It seems like evaluating a cljs (ctrl-shift-enter) page does not recursively evaluate the dependencies. The result of this is that I have to manually evaluate each dependent file. If I refresh the HTML page, or make a change I have to do this all over again. Other times evaluating a page doesn't work, and just gives me good not found error.
Clearly this is not usable. Am I doing something wrong? For Clojure it seems to work just fine.
Stack Overflow is probably a bad place to learn more about Light Table. I'd drop into the Light Table channel at #lighttable on irc.freenode.net. Somebody can help you there!

Reorder list of numbered items using regular expressions

I got this list of items (it's in a sql script) and I would like to reorder it by number :
from this :
,user_1
,user_2
,user_3
,name_1
,name_2
,name_3
to this
,user_1
,name_1
,user_2
,name_2
,user_3
,name_3
I use sql server management studio 2008 so I have ability to replace using regex but I don't know if that kind of manipulation is even possible with regular expressions.
Just copy paste them in excel, then sort and then copy paste back to ssms.
It's that simple :)
I think you need to add a bit more description for this to really make sense.
Perhaps post the SQL script?
Is this data stored in a single varchar field and this is the reason you are looking for a regex solution?
You can easily parse the comma-seperated values using a regex, but you would need some other function to sort that result and it can fairly quickly get messy to do this in SQL.
In general I would say this problem is better handled outside of the SQL statement - eg. process this in your favorite programming/scripting language after getting the result back from the SQL.
Also this problem indicates a design problem with the database layout, if in any way possible the preferred way to solve this would probably be to restructure it.