SAS® USER PROFILE
Names: Jim Burkhardt, Barry
Hong and Craig McCulloch
Location: Hamilton, Ontario
Company: U.S. Steel Canada.
Barry and Craig are in
the Hamilton Works -
Process Analysis and
Simulation Department,
whose mantra is “Enabling
knowledge-based decision
making.” Jim works for
Corporate in the Best
Practices Department.
SAS® History: In terms of platforms, we work on MVS, VMS, and Windows and primarily with Base SAS, SAS/STAT®, SAS/QC® and SAS/GRAPH®. Our total SAS work experience is 25 + 20 + 6 = 51 years.
Pets: Cats,
no cats and more cats. Five in
total!
Partner/Family: Yes, they are very understanding.
Sports/Hobbies: The three C’s: cycling, cruising and curling.
Oh, and skiing for good measure.
What your ideal
weekend would be: It wouldn’t be just a weekend
– we would be off the whole week!
Favourite Foods: M&Ms on Wednesdays
at SAS Canada headquarters, 280 King St. E.!
If we could be
anything at all (besides a SAS programmer), we would be: As a point of fact, we are not SAS programmers;
rather, we are metallurgical engineers who went over to the
“dark side.”
When not programming
in SAS, we like to be: Retired.
One thing every
SAS programmer should know: IT never fully
understands what we do, and version upgrades are always six
months late! Some advice for new engineers using SAS: If you
think to yourself “there has to be a better way,” there is
– call us! On a more serious note an actual tech tip: We use
the NOBS macro listed below to control program flow, error
trapping, etc.
%macro nobs(dsn);
/******************************************************************/
/* MACRO NOBS - Retrieves
the Number of Observations */
/* from dataset DSN */
/*----------------------------------------------------------------*/
/* extracted from SAS Communications
and modified for two part */
/* dataset names (1994). */
/*----------------------------------------------------------------*/
/* input: dsn - a one or two
part dataset name */
/* output: Nobs - macro variable
containing number of */
/* observations */
/******************************************************************/
%global nobs;
%let nobs=0;
%let lib=%upcase(%scan(&dsn,1,'.'));
%let mem=%upcase(%scan(&dsn,2,'.'));
%if &mem = %then %do;
%let mem=&lib;
%let lib=WORK; /* the default
one part name */
%end;
proc sql noprint;
select nobs-delobs into :nobs
from dictionary.tables
where libname="&lib" and memname="&mem";
quit;
%let nobs=%trim(&nobs);
%put ******************* MACRO:
NOBS ***********************;
%put **** No. OF OBSERVATIONS
FOR &LIB..&MEM is &NOBS ****;
%put **********************************************************;
%mend nobs; |