Identifying a FOCUS Data Source

How to:

You can identify a FOCUS data source with the USE command (see Identify a Data Source With the USE Command).

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.

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).

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).

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

Feedback