在CSMAR上下载的高频数据都是DBF格式,要怎样才能用SAS调用呢?我用的是SAS8.1,是不是没有PC File Formats就不行啊?请高手指教一下,万分感谢!!!
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
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.