楼主: yulifan
5629 2

求助:如何用SAS打开DBF文件 [推广有奖]

  • 0关注
  • 0粉丝

高中生

77%

还不是VIP/贵宾

-

威望
0
论坛币
173 个
通用积分
0.4500
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
138 点
帖子
9
精华
0
在线时间
65 小时
注册时间
2005-5-16
最后登录
2024-9-9

楼主
yulifan 发表于 2007-9-1 18:35:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币

在CSMAR上下载的高频数据都是DBF格式,要怎样才能用SAS调用呢?我用的是SAS8.1,是不是没有PC File Formats就不行啊?请高手指教一下,万分感谢!!!

二维码

扫码加我 拉你入群

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

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

关键词:dbf文件 dbf 如何用 formats format 文件 SAS dbf

回帖推荐

qiqibaobao 发表于2楼  查看完整内容

How SAS/ACCESS Works With DBF FilesFor DBF files, the SAS/ACCESS interface is a read-write interface. When you use the ACCESS procedure to create an access descriptor, SAS retrieves descriptive information about the database fields directly from the DBF file. When you create a view descriptor, SAS retrieves information from the access descriptor without reading the DBF file again. If the structu ...

本帖被以下文库推荐

沙发
qiqibaobao 发表于 2007-12-6 05:54:00

How SAS/ACCESS Works With DBF Files

For DBF files, the SAS/ACCESS interface is a read-write interface. When you use the ACCESS procedure to create an access descriptor, SAS retrieves descriptive information about the database fields directly from the DBF file. When you create a view descriptor, SAS retrieves information from the access descriptor without reading the DBF file again.

If the structure of a DBF file changes -- for example, database fields are deleted -- these changes do not appear in the access descriptor that you created with the ACCESS procedure. The changes also are not reflected in any view descriptors that were created previously on that access descriptor and, therefore, invalidate the view descriptors.

However, if the data in the DBF file changes, the updated data does appear when it is retrieved by a view descriptor. Suppose, for example, you have a view descriptor defined on a DBF file, and you add 30 records to that file. When you perform a SAS PRINT procedure using that view descriptor, both the old and new records are displayed.

To perform data manipulation tasks, the interface uses SAS commands and statements. For example, in the ACCESS procedure, you use the SAS WHERE statement to retrieve a subset of records from a DBF file. To sort DBF data, you must first extract the data into a SAS data file, unless you are using the SQL procedure. (The SQL procedure enables you to present output data in a sorted order with the ORDER BY clause in the SELECT statement without extracting the data.) You can extract and sort the DBF file data in one step using the OUT= option in the SORT procedure.

SAS does not use dBASE indexes or indexes created by other software products that are defined on fields in a DBF file. However, once you have extracted DBF file data with a view descriptor, you can use the SQL or DATASETS procedures to define SAS indexes on variables in the new SAS data file. Using SAS indexes often enhances the performance of data manipulation and retrieval tasks.

When you use the DBLOAD procedure to create and load a DBF file from a SAS data set, the procedure translates the SAS variable formats into field types that can be used in dBASE or other software products. It stores the file in the path specified by the PATH= statement so that dBASE and other software products can then read data from the newly created DBF file.

When you use a view descriptor in a DATA step to display or edit DBF file data, the SAS DBF file interface view engine reads from or writes to the DBF file that is stored in the path you specified.

[Previous]
Previous
[Next]
Next
[Top of Page]
Top of Page

已有 1 人评分经验 论坛币 收起 理由
bakoll + 3 + 10 精彩帖子

总评分: 经验 + 3  论坛币 + 10   查看全部评分

藤椅
qinfangjob 发表于 2012-3-6 10:59:45

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-29 12:03