Any SAS users (beside me) in this forum?

  • Thread starter Thread starter DrDu
  • Start date Start date
  • Tags Tags
    Forum
Click For Summary

Discussion Overview

The discussion revolves around the use of SAS (Statistical Analysis System) among forum members, focusing on their experiences, challenges, and preferences regarding the software. Participants share insights on its application in various fields, particularly in epidemiology and finance, and discuss the limitations of the SAS environment, especially under different operating systems.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • Some participants express frustration with SAS, noting its outdated interface and limitations, particularly in editing capabilities.
  • One user mentions using SAS primarily for accessing protected data sets, while others highlight its prevalence in fields like bio sciences and finance.
  • Several participants discuss their experiences with different editors for SAS, such as vim, Gedit, and Geany, and the challenges they face in integrating these with SAS.
  • There are mentions of the macro language in SAS being complicated and unintuitive compared to other programming languages.
  • One participant suggests that SAS's design reflects a lack of foresight from its original authors, leading to a system that feels patched together rather than cohesive.
  • Technical solutions for improving the SAS editing experience are proposed, including using key mappings and external tools like wmctrl and xdotool to enhance functionality.

Areas of Agreement / Disagreement

Participants generally agree on the frustrations associated with SAS, particularly regarding its interface and editing capabilities. However, there are varying opinions on the effectiveness of different workarounds and tools, indicating that the discussion remains unresolved on the best practices for using SAS effectively.

Contextual Notes

Limitations include the dependence on specific operating systems and the varying capabilities of different editors when working with SAS code. Some participants express uncertainty about the feasibility of certain technical solutions.

Who May Find This Useful

This discussion may be useful for users of SAS, particularly those working in statistical analysis, epidemiology, or related fields, as well as individuals seeking to improve their workflow with SAS in different operating environments.

DrDu
Science Advisor
Messages
6,423
Reaction score
1,004
I am using SAS (sweat and suffer) for many years now on a daily basis in work and it would be nice to be able to exchange here some problems. However, searching for "SAS" in physics forums only turns up tons of post related to science advisors (SAs).
 
Technology news on Phys.org
My main tool for statistical analysis is R, but I use SAS sometimes, because there are some protected data sets that can only be accessed through a SAS engine. I don't know if my little knowledge would be any use but if I see any new threads with SAS in the title I'd probably have a look and comment if I thought I could say anything useful, because I do need to keep my knowledge levels up.

Is your work in the bio sciences? My impression is that SAS has a very strong presence in that field, and much less so in physics. I come across it fairly often in my own field of finance, too - about 50/50 with R (and, very lamentably, Excel :eek:).
 
Yes, I work AS an epidemiologist.
 
Me, for my sins. Happy to discuss it - as long as you don't mind the occasional rant about how much I dislike it...
 
I don't know whether I ever met anyone who really liked SAS :-)
I am using SAS now under Linux and I am especially pissed off the stone age style integrated environment (not that I would be more fond having to work under Windows). I am trying now to use some other editor (vim in my case) with SAS. There exist EDITCMD and HOSTEDIT commands, but I didn't find much about its use on the internet. I also tried to copy code to some jointly used buffer and submit it from there, but I didn't figure this out yet.
 
@DrDu: My use of SAS is mostly under Linux too. I use UniversitySAS (because we don't have to pay for it) running in an Oracle VirtualBox virtual machine. The edit capability is very limited, although one thing I like about SAS is the pretty colour-coding. Whenever I have to do more complicated code editing I copy the code across to a text editor, make the changes, then copy it back to the SAS window (which is in a browser). Gedit has the advantage that it recognizes SAS code if you save the files as something.sas, and then does some colour-coding and bracket matching to help. Gedit doesn't have regular expression capability though, so I switch to Geany when I need to do that. One day I mean to re-learn emacs, which I suspect may be able to do both of those.

I think the reason SAS seems so old-fashioned is that it is AFAIK the oldest statistical processing language, and was developed in the seventies. So to me it looks a bit like FORTRAN. Even FORTRAN doesn't put a statement terminator after a DO though - I'm still coming to terms with the idea of:

DO;
something;
END;

The macro language seems so much more complicated and unintuitive than what's in other languages too. But I suppose one gets used to it and then doesn't notice any more.
 
Yes, emacs and vom also habe colouring schemes for SAS code.
 
I've got SAS on Windows, and am stuck with the built in editor because the system is so locked down. Actually, the Advanced Editor is one of the least dislikable parts of SAS. Its "keyboard macros" let you write a lot of standard stuff with a few keystrokes, and it's actually got regex search and replace.

I think the basic problem with SAS is that its original authors didn't quite have the vision to see what they wanted to do, and kept growing the system to plaster over shortcomings rather than rebuild. That's the macro language through and through - it's a patch to allow you to do things like process a bunch of data sets in the same way, but it's a layer on top of the data processing language and the interface between the two is quite clunky.

Personal opinion, obviously. But that's what it looks lik to me.
 
I agree with you on SAS problems.
Under Unix, there is no enhanced editor. What I did now was to set key F3 in SAS to "submit buffer=xclipbrd" so that I can submit simply the copied part from my text editor. Clearly it would be even nicer if I could define some key within the editor to pass the "submit" command to SAS. I tried something
like "echo tput (kf3) > /usr/proc/123/fg/0" but this didn't work.
 
  • #10
No enhanced editor would be a problem.

I can't think of a workaround to let you submit from your editor. The best I can think of is to do something like invoke SAS using -stdio and feeding its stdin from your editor and capturing its stdout and stderr somehow. Then start a second instance of SAS so that you can use the Explorer. Not sure how you'd handle the results window though, even assuming this works at all.
 
  • #11
I found a way to pass a command to the SAS Editor: with "wmctrl -l" I get a list of all open xwindows and their ID's.
With "xdotool key --window <ID> F3" I can pass e.g. the F3 key to that program.
This can be combined into
xdotool key --window $(wmctrl -l | grep "SAS: Program Editor" | awk '{print $1}') F3
which can be mapped to a key of the editor.
 
Last edited:
  • Like
Likes   Reactions: Ibix

Similar threads

Replies
38
Views
4K
  • · Replies 30 ·
2
Replies
30
Views
5K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 8 ·
Replies
8
Views
1K
  • · Replies 24 ·
Replies
24
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
8K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
10
Views
2K