Identifying a FOCUS Data Source

How to:

You can identify a FOCUS data source with the Use tool (see How to Identify a Data Source With the Use Tool in Developer Studio) in Developer Studio, or with the USE command (see Identify a Data Source With the USE Command) in Developer Studio or WebFOCUS.

You can use a single USE command to specify one or several data sources. For examples, see Identifying a Single Data Source and Identifying Multiple Data Sources.

Procedure: How to Identify 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 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 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. Click Close. You are prompted to save your changes.

Syntax: How to Identify a Data Source With the USE Command

USE {ADD|CLEAR|REPLACE}   
fileid [READ|NEW] [AS mastername] [ON resource]
[fileid [READ|NEW] [AS mastername] [ON resource]]
.
.
.
END

where:

ADD

Appends one or more new file IDs to the present directory. If you issue the USE command without the ADD option, the list of data sources you specify replaces the existing USE directory.

CLEAR

Erases the USE directory. Any other specified options are ignored. The END command is not required with this option.

REPLACE

Replaces an existing file ID in the USE directory. This option enables you to change the specification for the file ID and the options following the ID.

fileid

Is any valid file name for the specific operating system.

The following table lists and describes file names for each operating system:

Operating System

Description

Windows:

Any valid file name in drive:\path\filename.ext format. The drive and path specifications are optional.

Note: When using Application Namespace technology, you do not have to specify the complete path. Use any valid file name in the app_name[/app_name_a]/filename.ext format (for example, ibisamp/ggsales.foc). For more information on using an Application Namespace to identify a data source, see Storing and Searching for Application Files.

z/OS:

A ddname allocated to the full z/OS specification of the file.

UNIX:

Any valid file name in /directory/filename.ext format. The directory specification is optional.

Note: When using Application Namespace technology, you do not have to specify the complete path. Use any valid file name in the app_name[/app_name_a]/filename.ext format (for example, ibisamp/ggsales.foc). For more information on using an Application Namespace to identify a data source, see Storing and Searching for Application Files.

READ

Restricts the data source to read-only access.

NEW

Indicates that the data source is new.

AS mastername

Specifies the name of the Master File associated with the file ID.

Both the READ and NEW option can be used with the AS option. Any other combination of options after the file ID is not valid.

Note: When using the AS phrase for files on the FOCUS Database Server with ON, the READ parameter is required. Write access to these files is prevented, as they are being accessed with Master Files other than those with which they were created. Only READ access is allowed in this case

ON resource

Specifies a specially configured WebFOCUS Reporting Server that synchronizes FOCUS data sources for use by multiple end users.

Note: When using the AS phrase for files on the FOCUS Database Server with ON, the READ parameter is required. Write access to these files is prevented, as they are being accessed with Master Files other than those with which they were created. Only READ access is allowed in this case

Example: Identifying a Single Data Source

The following table shows sample USE commands you can use to specify a data source.

Operating System

Use Command Example

Windows:

USE
EMP026.FOC AS PRODUCTS
END

z/OS:

USE
EMP026 AS PRODUCTS
END

UNIX:

USE
emp026.foc AS PRODUCTS
END

Example: Identifying Multiple Data Sources

You can specify several data sources in one USE command, each with different parameters. The following table includes sample USE commands.

Operating System

Use Command Example

Windows:

USE
EMP024.FOC ON MULTID
EMP025.FOC AS PRODUCTS
EMP026.FOC READ AS ACCOUNTS
END

z/OS:

USE
EMP024 ON MULTID
EMP025 AS PRODUCTS
EMP026 READ AS ACCOUNTS
END

UNIX:

USE
emp024.foc ON MULTID
emp025.foc AS PRODUCTS
emp026.foc READ AS ACCOUNTS
END

WebFOCUS