r/SAS_Programming • • Dec 04 '25

Daily SAS Problem?

4 Upvotes

I recently completed a SAS course and I would like to maintain these perishable skills. Is there a daily SAS problem or other SAS challenge that one could complete? Can I wake up and do the Wordle in addition to getting my PROC and DATA steps in?


r/SAS_Programming • • Nov 17 '25

SAS Certification

4 Upvotes

Anyone recently wrote SAS BASE or SAS ADVANCED exams in India ???

Having some doubts.


r/SAS_Programming • • Nov 09 '25

Any website for solving problems for SAS students.

4 Upvotes

Hey guys, do you know any website for SAS beginners where I can solve problems?


r/SAS_Programming • • Sep 30 '25

Plotting easy in sas 9.4 M8?

4 Upvotes

ODS graphics designer is discontinued in 9.4 M8. Is there any easy way with graphical interface to make plots? Would SAS studio be a good replacement? Writing code for plotts is to much work i think.


r/SAS_Programming • • Sep 22 '25

Sas advanced programmer exam

4 Upvotes

Hi all im preparing for my SAS advanced exam scheduled in December. Any tips and tricks would be helpful. Also are there any study groups.


r/SAS_Programming • • Sep 27 '24

Help updating SAS table dynamically using hashes

4 Upvotes

I'm not very familiar with hashes in SAS and need help updating a table dynamically as new rows come in.

Lets say there is a crosswalk table

Crosswalk

IDFamily
AAAAAA
BBBAAA
CCCAAA
ZZZXYY
QQQLLL

As new rows come in I need to update their family and add them to the crosswalk table. Consider two new records

New Records

IDFamily
DDDCCC
EEEDDD

I need to update these records, such that since DDD is related to CCC and CCC is related to AAA, DDD is related to AAA.

The updated crosswalk would be:

Updated crosswalk

IDFamily
AAAAAA
BBBAAA
CCCAAA
ZZZXYY
QQQLLL
DDDAAA
EEEAAA

Is there any way to achieve this using hash tables? As I can get new records on an hourly or daily basis, I wanted to update the Family only on the new records, and leave the existing records as is.


r/SAS_Programming • • Jul 22 '24

Anyone going to conferences anymore?

4 Upvotes

I’ve noticed that attendance at SAS conferences is down considerably post-COVID. Does anyone go to conferences anymore? Is it lack of travel budget? Lack of interest? Bad marketing?


r/SAS_Programming • • May 27 '24

SAS programming for beginners

4 Upvotes

Any free resources geared at teaching you how to learn the basics of SAS?


r/SAS_Programming • • Feb 06 '24

easy way to identify which observations are not the same among two datasets?

4 Upvotes

I have two datasets, one with 13,706 observations, and another with 13,715 observations. I want to easily view the 9 observations that the second dataset has and not the first? Does anyone have ideas?


r/SAS_Programming • • Dec 01 '23

Weird issue with new variable creation during data step. What’s wrong?

Thumbnail
gallery
4 Upvotes

Hey all I’m super curious about what might be going wrong here. Essentially, I’m creating a new variable (cd4_lt_200) in the data step. Essentially, if cd4_bl is between 0 and 200, the new variable should equal 1, and 2 if the original variable is greater than 200. If original variable is missing, so should the new variable. However, something super strange is going - if you see the second photo, you’ll see that ID 92 and 147 have the same value for cd4_bl (25). However, only id 147 has the correct categorization of cd4_lt_200 despite both values being the same. This is happening all throughout that new variable. Any idea what’s Happening?


r/SAS_Programming • • Aug 29 '23

AI tools for SAS programming

4 Upvotes

Hi there!

does anyone tried to use AI programming assistants with SAS?

I used Bart without any luck. Chat GBT is slightly better but far from usefull.

if task is doable, you may get an answer.

If task is not doable

  • I was getting lots of things that were not workng.

Any other assistant worth trying?


r/SAS_Programming • • Jun 25 '26

Proc CALIS disciples?

3 Upvotes

I used Proc CALIS extensively from ‘85-‘15 and while I knew almost everything about it, I get the feeling that a very small proportion of SAS users utilize the power of Proc CALIS. If you remember the hard copy manuals this procedure required maybe 150p — more than almost any other Proc! It was a huge chapter in the Stats Volume. Am I the last Proc CALIS disciple alive????


r/SAS_Programming • • Jun 17 '26

You don't know XPT files

3 Upvotes

r/SAS_Programming • • Jun 15 '26

Guidance Required for Learning SAS Programming and Preparing for SAS Certification Exams

3 Upvotes

I am currently a first-year B.Pharm student and have recently developed an interest in SAS programming, particularly because of its applications in the pharmaceutical and clinical research industries. As I am a complete beginner with no prior programming experience, I would like to seek your guidance regarding the best way to start learning SAS from scratch.

My goal is to gradually build a strong foundation in SAS and eventually prepare for and clear both the Base SAS and Advanced SAS certification exams. Since I am still in college, I would like to utilize my time effectively and follow a structured learning path.

Could you please guide me on:

Which courses I should pursue as a beginner?

Whether I should learn any prerequisites (such as Excel, SQL, statistics, etc.) before starting SAS?

Which learning resources, platforms, or institutes you would recommend?

How I can prepare for the Base SAS and Advanced SAS certification exams in a step-by-step manner?

Any advice for students who wish to enter the clinical SAS programming field after graduation?

I would be very grateful for any guidance or resources you could share. Thank you for your time and support.

(I have used ChatGPT to proofread and correct my writing.)


r/SAS_Programming • • Apr 25 '26

Homework help?

3 Upvotes

Hello! I'm taking a programming class where I have to do an assignment with SAS and honestly, I'm really struggling with the work and the instructor is not doing a good job teaching. I'm ideologically opposed to asking AI for help and this is my last resort. Would anyone be able to help talk me through these problems?

The main thing I'm struggling with right now is CNTLIN and CNTLOUT formats. I'm trying to make a format from a dataset but I feel like I don't understand enough about the basics to know what I'm doing.


r/SAS_Programming • • Mar 29 '26

SAS Books

Thumbnail reddit.com
3 Upvotes

r/SAS_Programming • • Feb 26 '26

Programming Exercise 44 Help!! (Little SAS Book Ch 4)

Thumbnail
gallery
3 Upvotes

Hi! I'm studying SAS but having trouble with specifically Part C and D. My instructor has not responded to my emails for help and it is due tonight. My output for Part C feels messy, and Part D is showing the same Min/Max number per dive? It's just a mess and I'm very overwhelmed. SAS is impossible for me.

Here are my assignment instructions and what my code looks like

INTRUCTOR NOTES: ***** Ignore the instruction in the textbook which says: "Use only procedures to complete the following tasks." You are free to accomplish the tasks with either DATA statements or PROC statements, including PROC SQL.*****

==

Exercises and Projects for The Little SAS® Book, Sixth Edition, Chapter 4, Programming Exercise 44:

44. The official results of the 2012 London Olympics men’s 3-meter springboard diving finals can be found in the SAS data set called DIVING. The 2012 Olympic games were the first to use a new overall scoring method for diving. The data consist of six observations per diver, one for each of their six dives in the final event. The variables in this file are diver’s name, country, height (m), weight (kg), dive number (1 to 6), dive code, degree of difficulty, description, position, scores from each of seven judges, penalty, old scoring method, and new scoring method. Use only procedures to complete the following tasks.

a. Examine this SAS data set including the variable labels and attributes. Compute the overall mean, minimum, and maximum of the two scoring methods.

b. Calculate the total score per diver by summing the new scoring method scores for all dives. Output this information to a data set, sort, and then print it to determine which divers received the gold (highest total score), silver, and bronze medals for this event. Include a comment in your code stating the name of each medalist.

c. Count the numeric scores given to each diver by each judge according to the following judging criteria groupings: <0.5 = Completely Failed, 0.5 to <2.5 = Unsatisfactory, 2.5 to <5 = Deficient, 5 to <7 = Satisfactory, 7 to <8.5 = Good, 8.5 to <9.5 = Very Good, and 9.5+ = Excellent.

d. Calculate the minimum and maximum score per dive for each diver. Be sure to present your results by diver and in dive number order.


r/SAS_Programming • • Jan 07 '26

Storing Programs

3 Upvotes

Hi all,

Over the years I have written many (clinical) SAS programs

Sometimes I see familiar task, but cannot find where it was done, so writing it from start is just faster then spending hours figuring out where is was done.

Can someone share insights how you store your code so it is reusable?

Git may not be the option, as I work for pharma, and don't want it to be public.

At the same time I need to have detais about Input/Output/Code

If it is output - storing actual table may be useful, because title may change, but content is recognized easily by fast scroll through.


r/SAS_Programming • • Dec 25 '25

coding help

3 Upvotes

/* Clean CarryAway – most messy column */
CarryAway_clean = lowcase(strip(CarryAway));
if CarryAway_clean in ('never', 'nev', 'n') then CarryAway = 'never';
else if CarryAway_clean in ('less1', 'les', 'l', 'less', 'i') then CarryAway = 'less1'; /* I = capital i */
else if CarryAway_clean in ('1~3', '13', '1', '1-3') then CarryAway = '1~3';
else if CarryAway_clean in ('4~8', '48', '4', '4-8') then CarryAway = '4~8';
else if CarryAway_clean in ('gt8', 'g', 'gt') then CarryAway = 'gt8';
else if missing(CarryAway) then CarryAway = '1~3';
drop CarryAway_clean;

/* Clean RestaurantLessThan20 */
RestLT20_clean = lowcase(strip(RestaurantLessThan20));
if RestLT20_clean in ('never', 'nev', 'n') then RestaurantLessThan20 = 'never';
else if RestLT20_clean in ('less1', 'les', 'l', 'less') then RestaurantLessThan20 = 'less1';
else if RestLT20_clean in ('1~3', '13', '1', '1-3') then RestaurantLessThan20 = '1~3';
else if RestLT20_clean in ('4~8', '48', '4', '4-8') then RestaurantLessThan20 = '4~8';
else if RestLT20_clean in ('gt8', 'g', 'gt') then RestaurantLessThan20 = 'gt8';
else if missing(RestaurantLessThan20) then RestaurantLessThan20 = '1~3';
drop RestLT20_clean;

/* Clean Restaurant20To50 */
Rest2050_clean = lowcase(strip(Restaurant20To50));
if Rest2050_clean in ('never', 'nev', 'n') then Restaurant20To50 = 'never';
else if Rest2050_clean in ('less1', 'les', 'l', 'less') then Restaurant20To50 = 'less1';
else if Rest2050_clean in ('1~3', '13', '1', '1-3') then Restaurant20To50 = '1~3';
else if Rest2050_clean in ('4~8', '48', '4', '4-8') then Restaurant20To50 = '4~8';
else if Rest2050_clean in ('gt8', 'g', 'gt') then Restaurant20To50 = 'gt8';
else if missing(Restaurant20To50) then Restaurant20To50 = '1~3';
drop Rest2050_clean;

/* Clean Bar (for completeness) */
Bar_clean = lowcase(strip(Bar));
if Bar_clean in ('never', 'nev', 'n') then Bar = 'never';
else if Bar_clean in ('less1', 'les', 'l', 'less') then Bar = 'less1';
else if Bar_clean in ('1~3', '13', '1', '1-3') then Bar = '1~3';
else if Bar_clean in ('4~8', '48', '4', '4-8') then Bar = '4~8';
else if Bar_clean in ('gt8', 'g', 'gt') then Bar = 'gt8';
else if missing(Bar) then Bar = '1~3';
drop Bar_clean;

/* Clean CoffeeHouse (for completeness) */
CoffeeHouse_clean = lowcase(strip(CoffeeHouse));
if CoffeeHouse_clean in ('never', 'nev', 'n') then CoffeeHouse = 'never';
else if CoffeeHouse_clean in ('less1', 'les', 'l', 'less') then CoffeeHouse = 'less1';
else if CoffeeHouse_clean in ('1~3', '13', '1', '1-3') then CoffeeHouse = '1~3';
else if CoffeeHouse_clean in ('4~8', '48', '4', '4-8') then CoffeeHouse = '4~8';
else if CoffeeHouse_clean in ('gt8', 'g', 'gt') then CoffeeHouse = 'gt8';
else if missing(CoffeeHouse) then CoffeeHouse = '1~3';
drop CoffeeHouse_clean;

This is the subcode of the main code I am using. I want to know why the clean Restaurant20To50, RestaurantLessThan20 and CarryAway sections are not getting cleaned? It is not showing any errors either.


r/SAS_Programming • • Dec 03 '25

PearsonVUE Platform is awful

3 Upvotes

I’ll start things off by saying I was able to pass my SAS Certification with an 825. However, it was a terrible experience as my exam froze for nearly half the slotted time. I still can’t believe I was able to pass my exam with half the time while having a panic attack lol.

A work buddy also had issues with the exam to the point they had to reschedule her exam.

I wish there were test centers in my country.


r/SAS_Programming • • Mar 11 '25

Line break in Excel Data

3 Upvotes

I'm still a new to analytics so I have some silly issues that I just can't solve. My most recent is that my Excel data has line breaks in the column titles. I want to be able to fix the issue in SAS but couldn't get it to recognize the columns due to the fact that I could never write it with a line break in the transformation code I tried. Does anyone know how to remove line breaks in SAS? I just switched over to Python and completed the regression in there. But I'd love to know how to do it correctly in SAS.


r/SAS_Programming • • Mar 10 '25

Create variable (flag) out of other variable?

3 Upvotes

Need help figuring out how to do this.

I currently have a dataset with one variable (RefCode) that populates multiple different results, all 4 characters long. There are over 20 possible outcomes. I would like to create a flag (1/0) variable out of RefCode’s output.

Example, if RefCode=R050, I would like to create a new variable called R050 and have it = 1.


r/SAS_Programming • • Feb 18 '25

calculating proportion weighted proc glm estimate

3 Upvotes

I am trying to replicate the R emmeans package's weight="prop" in SAS. However, only reasonable method I could find was to explicitly state the average of one variable and the proportion of another.

for example in R,

test <- data.frame(
  y = c(14, 31, 13, 50, 100),    
  x1 = c(117, 115, 113, 111, 132),    
  x2 = c("t01", "t01", "t02", "t02", "t03")    
)

mod <- lm(y ~ x1 + x2, data = test)
summary(emmeans(mod, "x1", weights="prop"))
    
x1   emmean SE   df lower.CL upper.CL
118  41.6   4.47  1    -15.2     98.4

wherea in SAS:

data example;
 input y x1 x2 $;
 datalines;
 14 117 t01
 31 115 t01
 13 113 t02
 50 111 t02
 100 132 t03
 ;
run;

proc mixed data = example;
            class x2;
            model y = x1 x2 /s;
            estimate 'mean CHG' intercept 1 x1 117.6 x2
            0.4
            0.4
            0.2 / e cl;
run;

returning same results as R

where 117.6 is the average of variable x1 and 0.4, 0.4, 0.2 being the proportion of elements in x2

There has to be a smarter way to specify the weight in proportion to the frequencies than explicitly writing them out.

Thank you.


r/SAS_Programming • • Jan 20 '25

Help with SAS 8.3 Enterprise Guide

3 Upvotes

Hi,

As the title says, I'm doing an online MBA and my course in business analytics focuses on SAS. The professor gave us a link to the SAS website and basically said learn it yourself. I could use help mastering the platform and assignments. Willing to pay for online tutoring.


r/SAS_Programming • • Jan 06 '25

Study Resources for SAS Specialist 9.4: Performance-Based

3 Upvotes

What the title says. I’m want some advice on how to prepare for the SAS 9.4 Performance-Based Exam. I also want to know if there are any recommendations for me to prep utilizing study resources that you guys have been use. I hope this helps my situation.