Members

Blog Posts

Hack 6.1 Adding Color to Report Titles with the ODS ESCAPECHAR Statement

Posted by Michael A. Raithel on July 31, 2017 at 8:09am 0 Comments

SAS Programming Professionals,

Check out this hack: …

Continue

Hack 5.5 Using Macros to Comment Out Sections of SAS Programs

Posted by Michael A. Raithel on July 10, 2017 at 8:21am 0 Comments

SAS Programming Professionals,

Check out this hack: …

Continue
 

Latest Activity

Aroop Ghosh replied to Natasha Ulanowski's discussion Judy's Question in the group Friends of SAS Programming Problems
"/* I do not see the need for using a Macro level syntax to create an Excel file with different sheets for each Product category, unless just or the challenge (which I guess is the point). The desired objective can be achieved by…"
16 hours ago
Horst Wolter replied to Natasha Ulanowski's discussion Judy's Question in the group Friends of SAS Programming Problems
"proc sql; select distinct productinto :product1- from sashelp.shoes; %macro split;%do i=1 %to &SQLOBS ; proc export data=sashelp.shoes (where=(product="&&product&i")) outfile= "C:\shoe_cat.xlsx" dbms=xlsx replace;…"
20 hours ago
Richard Bemile replied to Natasha Ulanowski's discussion September 20 - Programming Problem in the group Friends of SAS Programming Problems
"%macro countm(col); count(&col) "Valid values for (&col)", nmiss(&col) "Missing values for (&col)" %mend; proc sql; create table column as select count(*) "Total No. of Rows", %countm(length) from…"
yesterday
Eshetu G. Atenafu replied to Natasha Ulanowski's discussion Judy's Question in the group Friends of SAS Programming Problems
"/* Using the SASHELP.SHOES dataset, create a SAS program that uses Macro level syntax to create an Excel file with different sheets for each Product category. */Proc freq data=SASHELP.SHOES; tables product; run; data shoes; set SASHELP.SHOES;if…"
yesterday
Rodger Zhang replied to Natasha Ulanowski's discussion September 20 - Programming Problem in the group Friends of SAS Programming Problems
"%macro check_value(varname); count(&varname) "Valid data for &varname", nmiss(&varname) "Missing or Valid data for &varname" %mend check_value; data data_need ; set SASHELP.SHOES ; if region =…"
yesterday
Richard Bemile replied to Natasha Ulanowski's discussion Judy's Question in the group Friends of SAS Programming Problems
"data shoe_cat; set sashelp.shoes; run; proc sort; by region; run; ods listing; proc sql; select distinct compress(trim(left(product)),' ') into :var1 - :var8 from shoes; quit; %macro report; ods tagsets.excelxp file =…"
yesterday
Arthur Tabachneck replied to Natasha Ulanowski's discussion Judy's Question in the group Friends of SAS Programming Problems
"One minor change. I was only creating temp so that I could insure I was sending correct commands to call execute: proc sql noprint;  select distinct product    into :products separated by '~'      from…"
yesterday
Arthur Tabachneck replied to Natasha Ulanowski's discussion Judy's Question in the group Friends of SAS Programming Problems
"I went with proc export: proc sql noprint;  select distinct product    into :products separated by '~'      from SASHELP.shoes        order by product  ;quit; data test;  length…"
yesterday
Rodger Zhang replied to Natasha Ulanowski's discussion Judy's Question in the group Friends of SAS Programming Problems
"proc sql; create table product as select distinct product from SASHELP.SHOES ; quit; data product; set product; order=_n_; length productname $ 20; productname=compress(product||order,' '); run; proc sql; select distinct…"
yesterday
Mathieu Gaouette replied to Natasha Ulanowski's discussion Judy's Question in the group Friends of SAS Programming Problems
"I went with ods excelxp as I was using SAS University and export in excel format doesn't work (no pc file server setup)."
Friday
Mathieu Gaouette replied to Natasha Ulanowski's discussion Judy's Question in the group Friends of SAS Programming Problems
"/********************************************//* Identify the distinct values for product *//********************************************/proc sql ;    create table distinct_products as    select distinct…"
Friday
Mathieu Gaouette replied to Natasha Ulanowski's discussion September 20 - Programming Problem in the group Friends of SAS Programming Problems
"After having posted, I had a good look at some of the other answers.  Arthur's answer has less limitations than my version.  With my version, since I'm using a "v7" type valivarname approach, this will create an error…"
Friday
Mathieu Gaouette replied to Natasha Ulanowski's discussion September 20 - Programming Problem in the group Friends of SAS Programming Problems
"/*******************************************************************************************//*…"
Friday
Mathieu Gaouette replied to Natasha Ulanowski's discussion Cristina's Question in the group Friends of SAS Programming Problems
"/* Initial setup.  Two tables with two variables each (on in common) */proc sql ;    create table table_1 as    select make,           model    from sashelp.cars    order by 1,2 ;quit ;proc sql ;    create table table_2 as    select make,          …"
Thursday
Arthur Tabachneck replied to Natasha Ulanowski's discussion September 20 - Programming Problem in the group Friends of SAS Programming Problems
"%macro miss(var);  count(&var) "Valid data for &var",  nmiss(&var) "Missing data for &var"%mend miss; data test;  set sashelp.class;  if _n_ in (2,5,10) then call missing(sex);run; proc…"
Thursday
Natasha Ulanowski added a discussion to the group Friends of SAS Programming Problems
Thumbnail

Judy's Question

Please post your solutions to Judy's problem here that is featured in the Back to SAS School Experience. Thank you!See More
Thursday
Michael Chu replied to Natasha Ulanowski's discussion Cristina's Question in the group Friends of SAS Programming Problems
"Here's my solution.  Like others, I discovered SAS Sample 24652, which demonstrates how to use a for loop to complement the DATA step's implicit looping:   data apples; infile datalines; input apple:$50.;…"
Thursday
Horst Wolter replied to Natasha Ulanowski's discussion September 20 - Programming Problem in the group Friends of SAS Programming Problems
"/* Not sure if I'm correct. I understood the question to want a macro "within" the SQL. Here's my solution */ proc sql; select distinct make into :make1 - from sashelp.cars; %macro get; %do i=1 %to &SQLOBS ; select count(*)…"
Wednesday
John Lam replied to Natasha Ulanowski's discussion September 20 - Programming Problem in the group Friends of SAS Programming Problems
"data numbers; Infile Datalines; informat num 3. ; input num; Datalines; 110 120 . 135 . . 140 ; run; proc sql; create table cnts as select count(num) as non_missing, nmiss(num) as missing from numbers ; quit; proc print data=cnts; title…"
Wednesday
Donald Wildeboer replied to Natasha Ulanowski's discussion September 20 - Programming Problem in the group Friends of SAS Programming Problems
"%macro blanks( table, field ); proc sql; SELECT COUNT( &field. ) LABEL "Number of blanks in &field." FROM &table. WHERE MISSING( &field. ); quit; %mend;"
Wednesday

Forum

Dataset URL for the Weekly Programming Problems

Started by Aroop Ghosh in Featured Discussions Jul 22. 0 Replies

Hello,I would like to use SODA  for the Weekly Programming Problems and use the dataset directly without downloading them, but have been unable to determine the URL. Can somebody tell me please the URL to use for the datasets used for the Weekly…Continue

Logsitic Regression Interaction Term

Started by Sam Davie in Featured Discussions. Last reply by SZ YAO Apr 18. 1 Reply

Hello,I am working on an analysis where I would like to know whether an intervention acts differently across levels of income (5 levels total). I'd like to do this for females only, and adjust for age. In the end, I'd like to obtain an odds ratio…Continue

Available SAS software

Started by Rex Deus in Featured Discussions. Last reply by Arthur Tabachneck Mar 21. 1 Reply

SAS Admin question,I run "proc setinit" and don't see SAS EG as available software, yet SAS EG is fully usable and running fine, am I missing something here?Continue

Do Loop?

Started by Sam Davie in Featured Discussions. Last reply by Arthur Tabachneck Nov 16, 2016. 1 Reply

Hi,I have a large dataset containing information about patients of a medical clinic, which doctor they are registered with (Registering Doctor), and which they saw on that particular visit (Attending Doctor). For each patient, I'd like to calculate…Continue

 
 
 

Photos

Loading…
  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2017   Created by Steve Mahoney.   Powered by

Badges  |  Report an Issue  |  Terms of Service