Essentially, MACRO code is code that writes Base code. Just remember that and you won't go far wrong.
So in theis case, you are returning all the Base code that the macro writes to the RHS of the UltimateParent assignment.
OK, think this one will do it ...
You will obviously be creating a composite surname variable from "name" as this is what identifies a family. That is your third variable along with address and telephone.
First sort by surname, then create a new dataset from that using by processing on the...
You know what, that's actually a bit trickier than you'd think at first glance.
Perhaps you could duplicate the dataset, and then do a cartesian join between the two, and delete rows where there wasn't a match on any of the three fields.
I'm not sure, will have to think about it. Difficult.
Can you please clarify ... the first two records match on name, but "Family ID" is 1, yet the last 3 records match on name, address and phone number and have a Family ID of 2.
Is it 2 if there's a match on any of the fields with another observation, and 1 if not?
you've said "total" number of employees is in dataset a ... but that both datasets have SSN (American social security number? Which would be unique), which would indicate that there is one record per employee in each dataset?
If so, just do a proc summary for both datasets, eg:
proc summary...
You need to get your hands dirty, it's a painful process, but you'll feel so much better for it at the end.
If your current job isn't offering you the opportunities, then you might need to look elsewhere.
Actually doing it is the best way to learn.
I spent 3 and a half years in a job then...
Being lazy helps ... it forces you to find better, more efficient, ways to do things.
Maybe joining the SAS-L mailing list would help, don't ask questions yourself, just lurk.
Not a big fan of the little SAS book myself, I prefer "Sharpening Your SAS Skills" but since all that does is more or...
Excellent post, unfortunately my company is still using version 8.02, and it seems this only works in version 9?
I shall give you a star anyway, because I will file that one away for future knowledge!
Thanks.
It's run in interactive mode, rather than from a shell.
Oh well, not to worry, thanks for trying.
You'd think they'd be some way, somehow, but alas not.
I think the following would be worth considering, it should be quite efficient, given number of obs ...
data dummy;
set test(where=(upcase(type)="TRADE" and time()-time<="00:30"t));
run;
data _null_;
set dummy nobs=last30tr;
put "Number of trades in last 30 mins is ..." last30tr...
Hi:
I need to obtain a string representing the "long" filename of a program, and the code actually needs to be written inside that program.
So, if the filename of the program is C:/Windows/Desktop/blah.sas I need some code I can put within that program that returns...
Use the control toolbox toolbar to draw a command button on your workbook - I have left t as command button 1, rename it to whatever you like, but if you do you'll have to edit the code below.
In design mode double click on the button and insert the code below into the shell code.
Take design...
Either use the filesystemobject (common to all ms office object models) or use open filename for [append|output] as #filenumber.
Try digging around in teh VBA help files.
Hmmm ... quirky.
One way round it is to have a named range, then pass the named range as the range argument rather than a non-contiguous set of ranges.
I think I'd rather remove the confirmation part and just make the function volatile.
The reason I'd coded the confirmation part was to ensure that if the user changed cells on sheet 1, they were given the chance to make the formulae recalculate. But if that's done automatically, there's no point.
A range in Sheet 1 is included in the UDF code, but not the worksheet function.
So that makes it volatile with reference to sheet 1?
The VBA help file comes up trumps - again - not.
OK dudes, riddle me this.
Volatile functions, VBA help:
Marks a user-defined function as volatile. A volatile function must be recalculated whenever calculation occurs in any cells on the worksheet.
I've marked my function as volatile - it is used on sheet 3, and takes two arguments - one is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.