由买买提看人间百态

topics

全部话题 - 话题: endsas
(共0页)
t****t
发帖数: 820
1
我有很长的一大篇程序想要分段执行. 如果一段一段的用鼠标高选再执行太累了.
想问问大家有没有好的方法可以在任意两个proc之间插入一个命令,让SAS执行到那里的
时候就自动停止执行.
我知道在SAS batch mode下可以用ENDSAS来停止执行下面的程序. 但是在Enterprise
Guide下用ENDSAS会断开sas服务器连接, 所以不能用ENDSAS.
Proc XXX;
xxxxxx;
xxxxx;
run;
ENDSAS;
Proc YYY;
yyyyy;
yyyyy;
run;
n******e
发帖数: 476
2
来自主题: Statistics版 - VIM syntax highlight
遇到牛人我要接着问。。。
sas.vim 里面能不能自己设置 endsas; 是 bold red text 啊?以前工作地方 nedit
里面是这样设置的。结果现在这个地方,nedit 里没有 bold red endsas; vim 就更是
每个人自己乱搞了。我每次都在 vim 里 search for 'endsas;'
D******n
发帖数: 2836
3
来自主题: Statistics版 - 【为啥搞SAS的都是生物背景的?】
/*
for SAS i also want to use a sas command to comment it.
*/
endsas;
D******n
发帖数: 2836
4
来自主题: Statistics版 - 有没有人能贡献点UNIX SAS的经验?
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
b*****e
发帖数: 223
5
来自主题: Statistics版 - 有没有人能贡献点UNIX SAS的经验?
endsas?
b*****e
发帖数: 223
6
来自主题: Statistics版 - 有没有人能贡献点UNIX SAS的经验?
我们以前是写一个 script,可以用 command 把 log 里的 warning, error 列出来,
在没有 vi 之类下。
用 endsas 分段测试
我觉得最讨厌的是看 sas 数据,我到现在还经常会用 proc print 来检查数据,然后
才想起来现在是 Windows 啊,可以直接点开看。 -_-

TIP
c********s
发帖数: 483
7
来自主题: Statistics版 - 有没有人能贡献点UNIX SAS的经验?
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='types... 阅读全帖
c********s
发帖数: 483
8
来自主题: Statistics版 - 有没有人能贡献点UNIX SAS的经验?
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='types... 阅读全帖
c********s
发帖数: 483
9
来自主题: Statistics版 - 有没有人能贡献点UNIX SAS的经验?
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='types... 阅读全帖
c********s
发帖数: 483
10
来自主题: Statistics版 - 有没有人能贡献点UNIX SAS的经验?
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='types... 阅读全帖
D******n
发帖数: 2836
11
来自主题: Statistics版 - 新手问个问题 (转载)
create a .vim directory under you home directory(there is a dot before
vim)
and then create a syntax directory under it
and then create a sas.vim file under the syntax directory
==============sas.vim======================
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syn case ignore
syn region sasString start=+"+ skip=+\\|\"+ end=+"+
syn region sasString start=+'+ skip=+\\|\"+ end=+'+
" Want region from 'cards;' to ';' to be captured (Bob Heckel)
sy... 阅读全帖
D******n
发帖数: 2836
12
来自主题: Statistics版 - VIM syntax highlight
我们组其他人很不喜欢呢,说黑白最好。
有人用vi(vedit),我怂恿他们用vim,他们也是死活不依。
至于你的问题。
在你的sas.vim的最后那里,在“let b:current_syntax = "sas" 之前,加以下两行
syn keyword sasRedwords ENDSAS ABORT
hi sasRedwords term=NONE cterm=bold ctermfg=red ctermbg=Black gui=bold
guifg=red guibg=black
1) 如果你想更多关键字是红色,就在第一行后面加。
2) 这是假设你的color scheme是黑底白字风格,如果不是,把ctermbg和guibg改一改
就可以。
3) 包子好吃。

显眼
R*********i
发帖数: 7643
13
来自主题: Statistics版 - sas question, please help!
Is there a "endsas" statement in your code?
D******n
发帖数: 2836
14
Let me share with you some tricks or techniques i use to debug or facilitate
debugging SAS codes in Linux environment.
> proc print with obs= option. (ya very simple very naive)
> endsas statement.
> /* */ to comment out codes.
> sas -obs ### xxxx.sas (SAS options need not to be hard written in the
script, you can call it when batch running it)
> use put in data step to monitor SAS variable.
> use mprint, mlogic, symbolgen, source, source2 to debug macros.
> use %put to monitor macro variable.
>... 阅读全帖
k*****u
发帖数: 1688
15
dont forget to check ERROR WARNING in the log file.
send out output to email.
merge/inner join/ left join/ right join, don't forget to check if they are
correct. check if the key variable should be unique or not.
Join a small table with a large table, index them .
join a large table with a large table(I once did a 3M table left join
1billion table), proc sql left join takes more than 3 days and not finished.
Then I tried split the 2M table to a small table with 5k obs each, then use
macro and lo... 阅读全帖
(共0页)