Chapter Contents

Previous

Next
SAS/ACCESS Software for PC File Formats: Reference

Browsing and Updating Data with SAS/FSP Procedures

If your site has SAS/FSP software as well as SAS/ACCESS software, you can use it to browse PC files data or to browse and update the data in DBF files. You have a choice of using three SAS/FSP procedures: FSBROWSE, FSEDIT, and FSVIEW.

Note:   Only DBF files can be edited. If you try to edit other PC file formats, SAS defaults to browse mode.  [cautionend]


Using the FSVIEW Procedure to Browse PC File Data

All of the SAS/FSP procedures work in a similar way and therefore only the FSVIEW procedure is shown. The FSVIEW procedure enables you to browse or edit data from a view descriptor or other SAS data set. The data are displayed in a tabular format similar to the format of the PRINT procedure output. You specify the PROC FSVIEW statement in the PROGRAM EDITOR window. Browsing Data in an FSVIEW Window creates a view descriptor, VLIB.ORDSHIPD, and specifies it in a PROC FSVIEW statement:

proc access dbms=dbf;
create adlib.orders.access;
path='c:\sasdemo\orders.dbf';
assign=yes;
drop delete_flg specinstr;
format shipped=date9.;
list all;
create vlib.ordshipd.view;
select ordernum stocknum fabcharges
  shipto shipped processby;
run;

proc fsview data=vlib.ordshipd;
run;

Browsing Data in an FSVIEW Window

[IMAGE]


Using the FSVIEW Procedure to Update PC File Data

If you are not a file's owner or creator, you must be granted update permissions on that file before you can edit it. Consult your site's DBA for more information about permissions.

There are two ways to use the FSVIEW procedure to open a window in editing mode. The most direct is to specify the edit command in the PROC FSVIEW statement:

proc fsview data=vlib.ordshipd edit;
run;

If you open an FSVIEW window in browse mode and then decide to edit the DBF data, you can follow these steps to change to edit mode:

  1. Select the SAS icon in the top, left corner and then select the Menu item. Doing so opens a list of menus.

  2. Select the Edit menu and then select the Update... item. An Update window opens and asks whether you want record-level or member-level locking on the DBF file.

You can now edit the DBF data. For information about using PROC FSVIEW, select the Using this Window item from the Help menu.


Using the SAS Viewer on PC File Data

While your DBF data is displayed in an FSVIEW window, you can save it to a data file and then re-open that file using the SAS Viewer (VIEWTABLE window). Take these steps to save your FSVIEW output to a data file:

  1. Select the SAS icon in the top, left corner and then select the Menu item. Doing so opens a listing of menus.

  2. Select the File menu and then the Save As item.

  3. A Save As window opens and asks you for the directory and filename information for the file that you want to save. In the Save as type: field, click on the down button to select Data Files.

  4. Press the [Save] button. In this example, the output is stored to a file named VLIB.ORDSHP.

When your file is saved, you can go to the SAS Explorer window and double-click on the libref.name of your new file, in this case, VLIB.ORDSHP. Doing so opens the VIEWTABLE window, as shown in Browsing or Editing Data through the VIEWTABLE Window:

You can browse or edit the PC file data from the VIEWTABLE window. For information about using this window, select the Using this Window item from the Help menu.

Browsing or Editing Data through the VIEWTABLE Window

[IMAGE]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.