p********a 发帖数: 5352 | 1 我最近被这个折腾得洋相百出。COPY & PASTE到手软,TEST很麻烦。有谁有较好的TIP
吗? |
s*********e 发帖数: 1051 | 2 once into unix, i will open emacs first and do everything within. |
D******n 发帖数: 2836 | 3 yep, just as statcompute said, u must first switch to the command line /term
inal world and get familiar with shell scripts first.
For editing u better use vi(recommended) or emacs. You don't select and summ
it any more, Unix user will do commenting and/or put endsas in the code to d
o program testing. Or you break down your code into multiple steps(scripts).
TIP
【在 p********a 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 我最近被这个折腾得洋相百出。COPY & PASTE到手软,TEST很麻烦。有谁有较好的TIP : 吗?
|
l*********s 发帖数: 5409 | |
D******n 发帖数: 2836 | 5 I like vi better. Vi rocks....lol.
【在 l*********s 的大作中提到】![](/moin_static193/solenoid/img/up.png) : learn emacs with ess
|
b*****o 发帖数: 817 | 6 同问同问,马上也要开始在unix上run sas了。
unix好用么? |
s*********e 发帖数: 1051 | 7 when you have time to argue here, why don't you learn both.
however, you need to be careful that vi is very addictive. right now, i even
start using vi on windows http://www.winvi.de/en/. ^_^
running sas on unix is fun and effective with good editors. i've not run
interactive sas for years. even on windows, i still run sas within cygwin in
batch mode.
【在 D******n 的大作中提到】![](/moin_static193/solenoid/img/up.png) : I like vi better. Vi rocks....lol.
|
d*******o 发帖数: 493 | 8 batch模式下的确没有什么办法调,SAS里面又不能设断点,几千行的程序只能靠直觉写
。版主既然多年PC SAS经验,可以学我,先PC里写,用测试数据跑通了以后,再移植。 |
A*******s 发帖数: 3942 | 9 if banzhu really hates unix,vi/emacs as my colleague does, u can try rsubmit
statement using windows PC as he does.
TIP
【在 p********a 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 我最近被这个折腾得洋相百出。COPY & PASTE到手软,TEST很麻烦。有谁有较好的TIP : 吗?
|
D******n 发帖数: 2836 | 10 i tried emacs couple of times, first time was when i decided wheter to use e
macs or vi. Second time is when i heard there was ESS. But the the crtl this
ctrl that in emacs is just driving me crazy.
I do use a bit of emacs in my everyday work. My shell mode is in emacs mode.
..
btw, i do install vim on my window boxen.....=)
and i also have cygwin on my windows machines too.
even
in
【在 s*********e 的大作中提到】![](/moin_static193/solenoid/img/up.png) : when you have time to argue here, why don't you learn both. : however, you need to be careful that vi is very addictive. right now, i even : start using vi on windows http://www.winvi.de/en/. ^_^ : running sas on unix is fun and effective with good editors. i've not run : interactive sas for years. even on windows, i still run sas within cygwin in : batch mode.
|
|
|
s*********e 发帖数: 1051 | 11 even in the current market, it is hard to find tech-savy statisticians like
you, sigh.
dude, you are on the right track.
e
this
mode.
【在 D******n 的大作中提到】![](/moin_static193/solenoid/img/up.png) : i tried emacs couple of times, first time was when i decided wheter to use e : macs or vi. Second time is when i heard there was ESS. But the the crtl this : ctrl that in emacs is just driving me crazy. : I do use a bit of emacs in my everyday work. My shell mode is in emacs mode. : .. : btw, i do install vim on my window boxen.....=) : and i also have cygwin on my windows machines too. : : even : in
|
D******n 发帖数: 2836 | 12 hehe, are you actually also praising yourself too?
I did bring all my unix/linux concepts to my team. At least i am trying. But
ppl are adamanent. Just like i will never learn emacs again. When I see my
colleagues painfully swicthing between unix and windows everyday and I am
kinda sorry about how much hours could have been saved if they all know unix
/linux. But there is kinda steep learning curve to convert ppl from windows
to unix. But looking back i was very grateful i was forced to (my lab only
had linux boxen)
like
【在 s*********e 的大作中提到】![](/moin_static193/solenoid/img/up.png) : even in the current market, it is hard to find tech-savy statisticians like : you, sigh. : dude, you are on the right track. : : e : this : mode.
|
s*********e 发帖数: 1051 | 13 well, just like what forest gump's mother said, the stupid is as the stupid
does.
unix
【在 D******n 的大作中提到】![](/moin_static193/solenoid/img/up.png) : hehe, are you actually also praising yourself too? : I did bring all my unix/linux concepts to my team. At least i am trying. But : ppl are adamanent. Just like i will never learn emacs again. When I see my : colleagues painfully swicthing between unix and windows everyday and I am : kinda sorry about how much hours could have been saved if they all know unix : /linux. But there is kinda steep learning curve to convert ppl from windows : to unix. But looking back i was very grateful i was forced to (my lab only : had linux boxen) : : like
|
b*****e 发帖数: 223 | 14 endsas?
【在 d*******o 的大作中提到】![](/moin_static193/solenoid/img/up.png) : batch模式下的确没有什么办法调,SAS里面又不能设断点,几千行的程序只能靠直觉写 : 。版主既然多年PC SAS经验,可以学我,先PC里写,用测试数据跑通了以后,再移植。
|
b*****e 发帖数: 223 | 15 我们以前是写一个 script,可以用 command 把 log 里的 warning, error 列出来,
在没有 vi 之类下。
用 endsas 分段测试
我觉得最讨厌的是看 sas 数据,我到现在还经常会用 proc print 来检查数据,然后
才想起来现在是 Windows 啊,可以直接点开看。 -_-
TIP
【在 p********a 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 我最近被这个折腾得洋相百出。COPY & PASTE到手软,TEST很麻烦。有谁有较好的TIP : 吗?
|
o****o 发帖数: 8077 | 16 diehard old school:
/user/oloolo/sas -nodms
TIP
【在 p********a 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 我最近被这个折腾得洋相百出。COPY & PASTE到手软,TEST很麻烦。有谁有较好的TIP : 吗?
|
s*r 发帖数: 2757 | 17 我以前都用ultraedit直接编辑unix上的文件 |
D******n 发帖数: 2836 | 18 我们公司的人用notepad++
【在 s*r 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 我以前都用ultraedit直接编辑unix上的文件
|
p********a 发帖数: 5352 | 19 I don't even have ultraedit, let alone Emacs/vi. Most of the time I am using
notepad to edit SAS pgms.
【在 s*r 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 我以前都用ultraedit直接编辑unix上的文件
|
p********a 发帖数: 5352 | 20 where is it?
【在 o****o 的大作中提到】![](/moin_static193/solenoid/img/up.png) : diehard old school: : /user/oloolo/sas -nodms : : TIP
|
|
|
p********a 发帖数: 5352 | 21 This is something I plan to do
【在 d*******o 的大作中提到】![](/moin_static193/solenoid/img/up.png) : batch模式下的确没有什么办法调,SAS里面又不能设断点,几千行的程序只能靠直觉写 : 。版主既然多年PC SAS经验,可以学我,先PC里写,用测试数据跑通了以后,再移植。
|
p********a 发帖数: 5352 | 22 why isn't there anything like SAS system viewer in Unix? I really hate to make the
100 obs subset every time.
【在 b*****e 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 我们以前是写一个 script,可以用 command 把 log 里的 warning, error 列出来, : 在没有 vi 之类下。 : 用 endsas 分段测试 : 我觉得最讨厌的是看 sas 数据,我到现在还经常会用 proc print 来检查数据,然后 : 才想起来现在是 Windows 啊,可以直接点开看。 -_- : : TIP
|
s*r 发帖数: 2757 | 23 we use SDD http://www.sas.com/industry/life-sciences/develop/sdd.html).it has java UI for backend sas work. everyone hates it as well.
make the
【在 p********a 的大作中提到】![](/moin_static193/solenoid/img/up.png) : why isn't there anything like SAS system viewer in Unix? I really hate to make the : 100 obs subset every time.
|
D******n 发帖数: 2836 | 24 I wrote my own script to view SAS data set in UNIX. Very convinient.
【在 s*r 的大作中提到】![](/moin_static193/solenoid/img/up.png) : we use SDD http://www.sas.com/industry/life-sciences/develop/sdd.html).it has java UI for backend sas work. everyone hates it as well. : : make the
|
p********a 发帖数: 5352 | 25 what interface? you create your own interface?
【在 D******n 的大作中提到】![](/moin_static193/solenoid/img/up.png) : I wrote my own script to view SAS data set in UNIX. Very convinient.
|
D******n 发帖数: 2836 | 26 just the in the terminal(the window you type your unix command).
The idea is simple, u run a script that writes and submits the SAS script(
proc print in this example) and then your script fetches the result and then
prints it to the terminal.
【在 p********a 的大作中提到】![](/moin_static193/solenoid/img/up.png) : what interface? you create your own interface?
|
S******y 发帖数: 1123 | 27 I have written some (Shell + SAS sysparm ) batch scripts to view my
SAS data set on Unix.
For example --
If I have a SAS data set called - mytestdat.sas7bdat
I will type the following command on Unix -
> see mytestdat
then I will automatically get a file called _see.lst, which contains
PROC CONTENTS and PROC PRINT (top ten records) output.
Following the same logic, I have developed a number of scripts -
> freq 'mytestdat|loss_year'
to see freq by loss_year variable
> summary 'mytestdat|loss_year|net_loss'
to see PROC SUMMARY results of net_loss dollars by loss_year.
> slice 'mytestdat|10pct|mysample'
to spit out a random 10 percent data into a new SAS file called
mysample.
> compare 'dat1|dat2'
to compare two SAS data sets via PROC COMPARE
etc etc..
These scripts have saved me hours (then will be days over years) from
typing lines of statements in an editor just to view many SAS data
files, and get an idea of what the data are like...
============================================================== |
D******n 发帖数: 2836 | 28 nice, i have done the similar thing.
hehe, but my way is more unix like. my script has options.
viewsas -firstobs 10 -numberofobs 100 -variable "year age" xxx.sasbdat
【在 S******y 的大作中提到】![](/moin_static193/solenoid/img/up.png) : I have written some (Shell + SAS sysparm ) batch scripts to view my : SAS data set on Unix. : For example -- : If I have a SAS data set called - mytestdat.sas7bdat : I will type the following command on Unix - : > see mytestdat : then I will automatically get a file called _see.lst, which contains : PROC CONTENTS and PROC PRINT (top ten records) output. : Following the same logic, I have developed a number of scripts - : > freq 'mytestdat|loss_year'
|
r***k 发帖数: 13586 | 29 难道只能进unix系统?偶这里都是在windows里编辑然后在unix里run一下。调试也是输
出dataset然后在windows里看。 |
d*******o 发帖数: 493 | 30 Health care-related data may be not allowed to be out of blackbox
【在 r***k 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 难道只能进unix系统?偶这里都是在windows里编辑然后在unix里run一下。调试也是输 : 出dataset然后在windows里看。
|
|
|
b*****e 发帖数: 223 | 31 good idea!
【在 S******y 的大作中提到】![](/moin_static193/solenoid/img/up.png) : I have written some (Shell + SAS sysparm ) batch scripts to view my : SAS data set on Unix. : For example -- : If I have a SAS data set called - mytestdat.sas7bdat : I will type the following command on Unix - : > see mytestdat : then I will automatically get a file called _see.lst, which contains : PROC CONTENTS and PROC PRINT (top ten records) output. : Following the same logic, I have developed a number of scripts - : > freq 'mytestdat|loss_year'
|
S******y 发帖数: 1123 | 32 Thanks.
I am writing a similar tool in Python to do same sort of things for csv
files.
【在 b*****e 的大作中提到】![](/moin_static193/solenoid/img/up.png) : good idea!
|
b*****e 发帖数: 223 | 33 我想起来了,我以前有怕用这些 command 用多了会不会反而记不住 sas syntax 了啊
。我每次都老老实实的写 proc freq; table x*y / list missing nocol norow nocum
nopct,也有想过把后面那些 option 定义成 macro variable 可以少打点字,可是又
怕时间久了记不住 syntax。我们本来用 sas 的机会就少得可怜了,所以我都一直老
老实实的自己敲,可怜啊。。。。
【在 S******y 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Thanks. : I am writing a similar tool in Python to do same sort of things for csv : files.
|
c********s 发帖数: 483 | 34 Use ultraedit or texpad or eg as your unix sas editor(need set up, some code
you may download from internet).
You can run Unit SAS directly from your editor or run under unix.
cut point is easy, you may use endsas and output dataset. log is also there.
be careful when you use interactive sas, the language is different from Unix
sometimes, such like "/" and "" on path.
alias is very helpful. ex: as below:
__A=
__B=
autoload='typeset -fu'
command='command '
study1=' '
study2='cd/'
functions='typeset -f'
history='fc -l'
integer='typeset -i'
local=typeset
nohup='nohup '
r='fc -e -'
sas=/usr/local/SAS/SAS_9.1/sas
sas9=/usr/local/SAS/SAS_9.1/sas
setemacs='set -o emacs'
stop='kill -STOP'
suspend='kill -STOP $$'
【在 p********a 的大作中提到】![](/moin_static193/solenoid/img/up.png) : This is something I plan to do
|
c********s 发帖数: 483 | 35 Use ultraedit or texpad or eg as your unix sas editor(need set up, some code
you may download from internet).
You can run Unit SAS directly from your editor or run under unix.
cut point is easy, you may use endsas and output dataset. log is also there.
be careful when you use interactive sas, the language is different from Unix
sometimes, such like "/" and "" on path.
alias is very helpful. ex: as below:
__A=
__B=
autoload='typeset -fu'
command='command '
study1=' '
study2='cd/'
functions='typeset -f'
history='fc -l'
integer='typeset -i'
local=typeset
nohup='nohup '
r='fc -e -'
sas=/usr/local/SAS/SAS_9.1/sas
sas9=/usr/local/SAS/SAS_9.1/sas
setemacs='set -o emacs'
stop='kill -STOP'
suspend='kill -STOP $$'
【在 p********a 的大作中提到】![](/moin_static193/solenoid/img/up.png) : This is something I plan to do
|
c********s 发帖数: 483 | 36 Use ultraedit or texpad or eg as your unix sas editor(need set up, some code
you may download from internet).
You can run Unit SAS directly from your editor or run under unix.
cut point is easy, you may use endsas and output dataset. log is also there.
be careful when you use interactive sas, the language is different from Unix
sometimes, such like "/" and "" on path.
alias is very helpful. ex: as below:
__A=
__B=
autoload='typeset -fu'
command='command '
study1=' '
study2='cd/'
functions='typeset -f'
history='fc -l'
integer='typeset -i'
local=typeset
nohup='nohup '
r='fc -e -'
sas=/usr/local/SAS/SAS_9.1/sas
sas9=/usr/local/SAS/SAS_9.1/sas
setemacs='set -o emacs'
stop='kill -STOP'
suspend='kill -STOP $$'
【在 p********a 的大作中提到】![](/moin_static193/solenoid/img/up.png) : This is something I plan to do
|
c********s 发帖数: 483 | 37 Use ultraedit or texpad or eg as your unix sas editor(need set up, some code
you may download from internet).
You can run Unit SAS directly from your editor or run under unix.
cut point is easy, you may use endsas and output dataset. log is also there.
be careful when you use interactive sas, the language is different from Unix
sometimes, such like "/" and "" on path.
alias is very helpful. ex: as below:
__A=
__B=
autoload='typeset -fu'
command='command '
study1=' '
study2='cd/'
functions='typeset -f'
history='fc -l'
integer='typeset -i'
local=typeset
nohup='nohup '
r='fc -e -'
sas=/usr/local/SAS/SAS_9.1/sas
sas9=/usr/local/SAS/SAS_9.1/sas
setemacs='set -o emacs'
stop='kill -STOP'
suspend='kill -STOP $$'
【在 p********a 的大作中提到】![](/moin_static193/solenoid/img/up.png) : This is something I plan to do
|
p********a 发帖数: 5352 | 38 Thanks. Just got EG and feel much better now |
b*****e 发帖数: 223 | 39 嗯,我怎么感觉 textpad 只能 windows 下用?
code
there.
Unix
【在 c********s 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Use ultraedit or texpad or eg as your unix sas editor(need set up, some code : you may download from internet). : You can run Unit SAS directly from your editor or run under unix. : cut point is easy, you may use endsas and output dataset. log is also there. : be careful when you use interactive sas, the language is different from Unix : sometimes, such like "/" and "" on path. : alias is very helpful. ex: as below: : __A= : __B= : autoload='typeset -fu'
|
p**5 发帖数: 2544 | 40 Me, too, vi
remember some frequently used tips in editing
【在 D******n 的大作中提到】![](/moin_static193/solenoid/img/up.png) : I like vi better. Vi rocks....lol.
|