Any SAS users (beside me) in this forum?

  • Thread starter DrDu
  • Start date
  • Tags
    Forum
In summary, the author does not like the Macros in the SAS Editor and wishes to use a different editor.
  • #1
DrDu
Science Advisor
6,357
974
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
  • #2
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:).
 
  • #3
Yes, I work AS an epidemiologist.
 
  • #4
Me, for my sins. Happy to discuss it - as long as you don't mind the occasional rant about how much I dislike it...
 
  • #5
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.
 
  • #6
@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.
 
  • #7
Yes, emacs and vom also habe colouring schemes for SAS code.
 
  • #8
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.
 
  • #9
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 Ibix

Related to Any SAS users (beside me) in this forum?

1. Who can use SAS?

Anyone can use SAS as long as they have access to the software and have a basic understanding of programming and data analysis.

2. What are the benefits of using SAS?

SAS offers a variety of benefits, including its ability to handle large datasets, its wide range of statistical analysis and data visualization tools, and its compatibility with other software and systems.

3. Is SAS difficult to learn?

While SAS may have a steeper learning curve compared to other software, it is considered user-friendly and has a robust support community. With resources such as online tutorials and courses, anyone can learn SAS with dedication and practice.

4. Are there any alternatives to SAS?

Yes, there are other software programs that offer similar capabilities to SAS, such as R, Python, and SPSS. However, SAS is known for its reliability and industry-standard status in many sectors, including healthcare, finance, and government.

5. Can I use SAS for free?

SAS offers a free version called SAS University Edition, which is available for students and learners to practice and build their skills. However, the full version of SAS requires a license or subscription.

Similar threads

  • Programming and Computer Science
Replies
30
Views
2K
  • New Member Introductions
Replies
1
Views
97
  • Feedback and Announcements
Replies
2
Views
1K
Replies
1
Views
59
  • Feedback and Announcements
Replies
22
Views
1K
Replies
1
Views
228
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • Programming and Computer Science
Replies
4
Views
5K
Replies
2
Views
56
  • Feedback and Announcements
Replies
10
Views
1K
Back
Top