Posts Tagged ‘ blogger ’

prxparse(dates)

February 4, 2010
By

suppose i’ve got some odd character dates defined as follows: d1='29-31 DEC 2009,04-05 JAN 2010'; *broken across month, year; d2='04-05,08-09,11-12 FEB 2010'; *broken within month; d3='01-03 MAR 2010'; *contiguous within month; d4=...
Read more »

Tags: , ,
Posted in SAS | Comments Off

the utility of generic macros

November 10, 2009
By

i’ve been using sas for roughly 5 years now. for the past few years, i’ve been building up my toolbox of what i call ‘utility macros’. these are macros that are generic enough to be used in a wide variety of situations, but perform very specifi...
Read more »

Tags: ,
Posted in SAS | Comments Off

an mmddyyyy hhmmss informat. kinda.

October 20, 2009
By

a while ago, i took the hack shortcut of reading character datetime stamps into datetime values. i even went so far as suggesting a regex would be a better solution. well, here’s that better solution: data mmddyyyy_hhmmss_xm; if _n_=1 then do; ...
Read more »

Tags: , , , , , ,
Posted in SAS | Comments Off

random dates

July 16, 2009
By

this is a cross posting from this sas discussion forum. assuming you know the min and max of allowable dates (01jan2005 - 30jun2009, for example), you can use random functions. data randates; mindate='01jan2005'd; maxdate='30jun2009'd; range = max...
Read more »

Tags: , , , ,
Posted in SAS | Comments Off

Calculating average time (duration)

July 10, 2009
By

this is summarizes my response to a thread on the SAS Discussion Forums in the original post, the poster wanted “…to calculate the length of time (mean, median, and mode) between when a record was created (“date reported” in my database) and w...
Read more »

Tags: , , ,
Posted in SAS | Comments Off

%d: a handy little macro for dynamic dating

July 8, 2009
By

for a little over a year now, i’ve been enjoying a little macro i wrote for writing date values in a variety of formats. the macro also integrates the intnx function (hence the ‘dynamic’ part). this allows me to easily use dynamic dates in both o...
Read more »

Tags: , , , ,
Posted in SAS | Comments Off

encoding data points for use with google charts api calls

June 1, 2009
By
encoding data points for use with google charts api calls

first step, build encoding tables based on the documentation: data encSimple encEnhanced; s='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-.'; format raw 8. enc $8.; raw=.; enc='_'; output encSimple; enc='__'; output encEnhanced;...
Read more »

Tags: , , ,
Posted in SAS | Comments Off

reading overlapping text segments

May 19, 2009
By

if you’re in the same boat as me, you’ve got sas 9.1.3 sp4 installed under windows. the thing about sas 9.1.3 sp4 running under windows is the lrecl is limited to 32,767 characters. (even though the sas kb says 1mb, that doesn’t appear to be true...
Read more »

Tags: , , ,
Posted in SAS | Comments Off

Proc-x is looking for sponsors!

Dear readers, proc-x is looking for sponsors who would be willing to support the site in exchange for banner ads in the right sidebar of the site. If you are interested, please e-mail me at: [email protected]

Welcome!

SAS-X.com offers news and tutorials about the various SAS® software packages, contributed by bloggers. You are welcome to subscribe to e-mail updates, or add your SAS-blog to the site.

SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.