journal
all ![]() | Rob is 20,139 days old today. |
Mar 2002 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
May 2002 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 2001 jan feb mar apr may jun jul aug sep oct nov dec
2003 jan feb mar apr may jun jul aug sep oct nov dec |< << more >> >| |
Paul 1:15pm CDT Wednesday 24 April 2002 Just went to lunch with Dude at MB. He bought mine (cheap 2 for 1 today with coupon!) and I gave him my excess pounds and euros from European adventure. On the way back, an old man in a wheelchair slightly waved to me. I saw he was working on what appeared to be a model airplane. Turned around and met him. Name is Paul - he's invented a coffee machine, a type of grader to fit on a bobcat tractor thing, and has built fifty-some different model airplanes. He's invented more I'm sure, but I didn't stay very long. He invited me over sometime; I may do that. kevin 5:07pm CDT Wednesday 24 April 2002 Kevin is pretty amazing. He's my technical-oriented boss, (as opposed to Karla - I guess she would be my business-oriented boss) and has been working with SAS for several years (15). So anyway, I love the way he can use quirks of SAS to solve problems that I see as impossible. Here is the latest example: %if %qsubstr(&&&use_var,1,4) = VARS %then %do... Obviously this will cause a WARNING if the length of the value of the variable name stored in use_var (&&& = 2 levels of indirection in SAS) is less than 4. How to solve this? Determine the length of the thing and not hardcode 4, right? Well yes, but(!) in the context where this code exists, I cannot use any other data steps to determine the length of the value, and there are no macro functions to do it. I was stuck. But Kevin found a brilliant way to solve it, which amounts to artificially lengthening the value at the point of the comparison (but not changing its actual value): %if %qsubstr(&&&use_var..xxxx,1,4) = VARS %then %do... The two dots terminate the macro variable name, and the macro variable name it resolves to. Then the xxxx is appended to that value at the moment of the substring comparison. Perfect. prev day next day |