Identifying a New Data Source

How to:

You can identify a data source that does not exist yet. When you identify a new data source, you can accept the default file specification conventions or specify different ones.

Note: For z/OS, you must allocate the file before issuing the USE command. You can do this using the z/OS command ALLOCATE or the WebFOCUS command DYNAM. You must also issue the z/OS command CREATE to physically create the file. This is not a requirement for platforms that dynamically allocate files.


Top of page

x
Procedure: How to Identify a New Data Source With the Use Tool in Developer Studio
  1. In the User 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 file you want to add.
    • Type the Universal Naming Convention (UNC) name of the file in the Database Filename field. For example:
      \\Server1\Disk1\employee.foc

      The Universal Naming Convention (UNC) allows you to enter the server name without entering the explicit path to the server. However, in order to take advantage of the UNC you must first attach to the server. For information on attaching to a server or mapping network drives, consult your Network Administrator.

      Enter a 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 New File.
  4. Click Add.
  5. Repeat steps 3 through 6 for any additional data sources you want to identify.
  6. 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.
  7. Click Run.
  8. Click Close. You are prompted to save your changes.

Top of page

x
Syntax: How to Identify a New Data Source
USE 
fileid NEW
END

where:

fileid

Is any valid file specification for the operating system. The file ID will be assigned to the data source when it is created.

NEW

Specifies that the data source does not yet exist. If you omit the NEW parameter, a message is returned stating that the data source cannot be found. The USE command is not executed.



Example: Identifying a New Data Source

The following command creates the data source WAGES using the WAGES Master File.

Windows:

USE
C:\DATA\WAGES.FOC NEW
END
CREATE FILE WAGES

z/OS:

USE
WAGES NEW
END
CREATE FILE WAGES

UNIX:

USE
wages.foc NEW
END
CREATE FILE WAGES

WebFOCUS