Protecting a Data Source

How to:

You can protect a data source from changes by including the READ parameter when issuing a USE command. A protected data source can be read by various tools and commands, but cannot be changed.


Top of page

x
Procedure: How to Protect a Data Source With the Use Tool in Developer Studio
  1. In the Use tool, do one of the following:
    • Type the name of a FOCUS data source in the Database Filename field.
    • Click Browse to search the network drives and directories for the desired file.
    • Type the UNC name of the file in the Database Filename field.
    • Enter the Master File name to be associated with the data source in the Master File field.
  2. If the data source is not located locally, enter the name of the server on which the file resides in the Database Server field.
  3. Click Add.
  4. Repeat steps 3 through 6 for any additional data sources you want to identify.
  5. Select a USE action:
    • Clear/Replace current list of USE databases clears all entries or replaces the current list of USE data sources with those in the list box.
    • Append to the present database list adds data sources to the current Use directory.
    • Replace only specified files in list changes one or more data source assignments in the current USE directory.
  6. Select Read Only.
  7. Click Run.
  8. Click Close. You are prompted to save your changes.

Top of page

x
Syntax: How to Protect a Data Source
USE 
fileid READ
END

where:

fileid

Is any valid file specification for the operating system.

READ

Restricts the data source to read-only access.



Example: Protecting a Data Source

The following command protects the EMPLOYEE data source from modification.

Windows:

USE
EMPLOYEE.FOC READ
END

z/OS:

USE
EMPLOYEE READ
END

UNIX:

USE
/usr/mydata/employee.foc READ
END

WebFOCUS