楼主: guo.bailing
18388 7

[技术讨论与投票] 可以在%SYSFUNC中使用的SAS函数一览表 [推广有奖]

区版主

大师

29%

还不是VIP/贵宾

-

TA的文库  其他...

文库1

文库2

文库3

威望
6
论坛币
1336375 个
通用积分
20283.0375
学术水平
558 点
热心指数
776 点
信用等级
515 点
经验
147046 点
帖子
4116
精华
24
在线时间
10749 小时
注册时间
2009-7-9
最后登录
2024-4-26

初级热心勋章 中级热心勋章 初级信用勋章 初级学术勋章

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
本文来源于西铁房临床试验爱好者中心(本帖最后发表人:西铁房版主Stanley)
转载请保留此链接:
http://www.clinicaltrialfans.com/posts/list/470.page


ATTRC returns the value of a character attribute for a SAS data set. %SYSFUNC(ATTRC(data-set-id,attr-name))
ATTRN returns the value of a numeric attribute for specified SAS data set. %SYSFUNC(ATTRN(data-set_id,attr-name))
CEXIST verifies the existence of a SAS catalog or SAS catalog entry. %SYSFUNC(CEXIST(entry <, 'U'>))
CLOSE closes a SAS data set. %SYSFUNC(CLOSE(data-set-id))
CUROBS returns the number of the current observation. %SYSFUNC(CUROBS(data-set-id))
DCLOSE closes a directory. %SYSFUNC(DCLOSE(directory-id))
DINFO returns a specified information item for a directory. %SYSFUNC(DINFO(directory-id,info-items))
DNUM returns the number of members in a directory. %SYSFUNC(DNUM(directory-id))
DOPEN opens a directory. %SYSFUNC(DOPEN(fileref))
DOPTNAME returns a specified directory attribute. %SYSFUNC(DOPTNAME(directory-id,nval))
DOPTNUM returns the number of information items available for a directory. %SYSFUNC(DOPTNUM(directory-id))
DREAD  returns the name of a directory member. %SYSFUNC(DREAD(directory-id,nval))
DROPNOTE  deletes a note marker from a SAS data set or an external file. %SYSFUNC(DROPNOTE(data-set-id|file-id,note-id))
DSNAME  returns the data set name associated with a data set identifier. %SYSFUNC(DSNAME(<dsid>))
EXIST  verifies the existence of a SAS data library member. %SYSFUNC(EXIST(member-name<,member-type>))
FAPPEND  appends a record to the end of an external file. %SYSFUNC(FAPPEND(file-id<,cc>))
FCLOSE  closes an external file, directory, or directory member. %SYSFUNC(FCLOSE(file-id))
FCOL  returns the current column position in the File Data Buffer (FDB) %SYSFUNC(FCOL(file-id))
FDELETE  deletes an external file. %SYSFUNC(FDELETE(fileref))
FETCH  reads the next nondeleted observation from a SAS data set into Data Set Data Vector (DDV). %SYSFUNC(FETCH(data-set-id<,'NOSET'>))
FETCHOBS  reads a specified observation from a SAS data set into the DDV. %SYSFUNC(FETCHOBS(data-set-id,obs-number<,options>))
FEXIST  verifies the existence of an external file associated with a fileref. %SYSFUNC(FEXIST(fileref))
FGET  copies data from the FDB. %SYSFUNC(FGET(file-id,cval<,length>))
FILEEXIST  verifies the existence of an external file by its physical name. %SYSFUNC(FILEEXIST(file-name))
FILENAME  assigns or deassigns a fileref for an external file, directory, or output device. %SYSFUNC(FILENAME(fileref,filename<,device<,hostoptions<,dir-ref>>>))
FILEREF  verifies that a fileref has been assigned for the current SAS session. %SYSFUNC(FILEREF(fileref))
FINFO  returns a specified information item for a file. %SYSFUNC(FINFO(file-id,info-item))
FNOTE  identifies the last record that was read. %SYSFUNC(FNOTE(file-id))
FOPEN  opens an external file. %SYSFUNC(FOPEN(fileref<,open-mode<,record-length<,record-format>>>))
FOPTNAME  returns the name of an information item for an external file. %SYSFUNC(FOPTNAME(file-id,nval))
FOPTNUM  returns the number of information items available for an external file. %SYSFUNC(FOPTNUM(file-id))
FPOINT  positions the read pointer on the next record to be read. %SYSFUNC(FPOINT(file-id,note-id))
FPOS  sets the position of the column pointer in the FDB. %SYSFUNC(FPOS(file-id,nval))
FPUT  moves data to the FDB of an external file starting at the current column position. %SYSFUNC(FPUT(file-id,cval))
FREAD  reads a record from an external file into the FDB. %SYSFUNC(FREAD(file-id))
FREWIND  positions the file pointer at the first record. %SYSFUNC(FREWIND(file-id))
FRLEN  returns the size of the last record read, or the current record size for a file opened for output. %SYSFUNC(FRLEN(file-id))
FSEP  sets the token delimiters for the FGET function. %SYSFUNC(FSEP(file-id,cval))
FWRITE  writes a record to an external file. %SYSFUNC(FWRITE(file-id<,cc>))
GETOPTION  returns the value of a SAS system or graphics option. %SYSFUNC(GETOPTION(option-name<,reporting-options<,...>>))
GETVARC  assigns the value of a SAS data set variable to a character DATA step or macro variable. %SYSFUNC(GETVARC(data-set-id,var-num))
GETVARN  assigns the value of a SAS data set variable to a numeric DATA step or macro variable. %SYSFUNC(GETVARN(data-set-id,var-num))
LIBNAME  assigns or deassigns a libref for a SAS data library. %SYSFUNC(LIBNAME(libref<,SAS-data-library<,engine<,options>>>))
LIBREF  verifies that a libref has been assigned. %SYSFUNC(LIBREF(libref))
MOPEN  opens a directory member file. %SYSFUNC(MOPEN(directory-id,member-name<open-mode<,record-length<,record-format>>>))
NOTE  returns an observation ID for current observation of a SAS data set. %SYSFUNC(NOTE(data-set-id))
OPEN  opens a SAS data file. %SYSFUNC(OPEN(<data-file-name<,mode>>))
PATHNAME  returns the physical name of a SAS data library or an external file. %SYSFUNC(PATHNAME(fileref))
POINT  locates an observation identified by the NOTE function. %SYSFUNC(POINT(data-set-id,note-id))
REWIND  positions the data set pointer to beginning of a SAS data set. %SYSFUNC(REWIND(data-set-id))
SPEDIS  returns a number for the operation required to change an incorrect keyword in a WHERE clause to a correct keyword. %SYSFUNC(SPEDIS(query,keyword))
SYSGET  returns the value of the specified host environment variable. %SYSFUNC(sysget(host-variable))
SYSMSG  returns the error or warning message produced by the last function that attempted to access a data set or external file. %SYSFUNC(SYSMSG())
SYSRC  returns the system error number or exit status of the entry most recently called. %SYSFUNC(SYSRC())
VARFMT  returns the format assigned to a data set variable. %SYSFUNC(VARFMT(data-set-id,var-num))
VARINFMT  returns the informat assigned to a data set variable. %SYSFUNC(VARINFMT(data-set-id,var-num))
VARLABEL  returns the label assigned to a data set variable. %SYSFUNC(VARLABEL(data-set-id,var-num))
VARLEN  returns the length of a data set variable. %SYSFUNC(VARLEN(datasetid,var-num))
VARNAME  returns the name of a data set variable. %SYSFUNC(VARNAME(data-set-id,var-num))
VARNUM  returns the number of a data set variable. %SYSFUNC(VARNUM(data-set-id,var-name))
VARTYPE  returns the data type of a data set variable. %SYSFUNC(VARTYPE(data-set-id,var-num))


西铁房国际临床试验爱好者中心
http://www.clinicaltrialfans.com
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:sysfunc SAS函数 UNC SFU Fun 函数 SAS sysfunc

回帖推荐

soporaeternus 发表于3楼  查看完整内容

2# baoaibaobao OPEN opens a SAS data set (a SAS data set or a SAS SQL view) and returns a unique numeric data set identifier, which is used in most other data set access functions. OPEN returns 0 if the data set could not be opened.

本帖被以下文库推荐

自助者,天助之!
沙发
baoaibaobao 发表于 2011-1-4 14:09:06 |只看作者 |坛友微信交流群
data-file-name这个是数据集的名称,那data-set-id表示什么呢?还有file-id、directory-id?

使用道具

藤椅
soporaeternus 发表于 2011-1-4 14:26:26 |只看作者 |坛友微信交流群
2# baoaibaobao
OPEN opens a SAS data set (a SAS data set or a SAS SQL view) and returns a unique numeric data set identifier, which is used in most other data set access functions. OPEN returns 0 if the data set could not be opened.
已有 1 人评分学术水平 热心指数 收起 理由
guo.bailing + 1 + 1 说的很好!

总评分: 学术水平 + 1  热心指数 + 1   查看全部评分

Let them be hard, but never unjust

使用道具

板凳
baoaibaobao 发表于 2011-1-4 14:33:35 |只看作者 |坛友微信交流群
3# soporaeternus 也就是说在使用标有id的函数时,首先要
datasetid=%sysfunc(open(data));
然后让
data-set-id=&datasetid

使用道具

报纸
leedx 发表于 2011-1-5 00:08:32 |只看作者 |坛友微信交流群
不错的资料,学习中~

使用道具

地板
bullstag 发表于 2011-1-6 03:56:39 |只看作者 |坛友微信交流群
good, very good.

使用道具

7
gongxun1234 发表于 2013-4-24 21:36:42 |只看作者 |坛友微信交流群
%sysfunc(mean())也可以吧

使用道具

8
Jerrylxx 发表于 2015-11-4 16:59:04 |只看作者 |坛友微信交流群
谢谢分享!!!

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-27 17:51