Using Alternative File Specifications

How to:

Issue the USE command to specify an alternate file specification for a FOCUS data source if:

Note: A data source named by the LOCATION attribute in a Master File assumes default values unless you issue a USE command. If the physical file has a specification or location other than the default, it must be in the USE directory.

Syntax: How to Use an Alternative File Specification

USE 
fileid AS mastername END

where:

fileid

Is any valid file name for the specific operating system.

mastername

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

Example: Specifying a Different File Name

To read the EMP026 data source described by the Master File EMPLOYEE, issue the USE command, then you can read EMP026 with the command TABLE FILE EMPLOYEE.

Operating System

Use Command Example

Windows:

USE
EMP026.FOC AS EMPLOYEE
END

z/OS:

USE
EMP026 AS EMPLOYEE
END

UNIX:

USE
emp026.foc AS EMPLOYEE
END

Example: Specifying a Different File Type or Extension

Windows:

To read the EMP026 data source with an extension of .DAT, described by the Master File EMPLOYEE, issue the command:

USE
EMP026.DAT AS EMPLOYEE
END

z/OS:

To read the emp026 data source with an extension of .dat, described by the Master File EMPLOYEE, issue the command:

USE
EMP026 AS EMPLOYEE
END

UNIX:

To read the emp026 data source with an extension of .dat, described by the Master File EMPLOYEE, issue the command:

USE
emp026.dat AS EMPLOYEE
END

After issuing the USE command, you can read EMP026 with the command TABLE FILE EMPLOYEE.

Example: Specifying a Different File Location

Windows:

To read the EMP026 data source located in the C:\ACCOUNTING\ directory, described by the Master File EMPLOYEE, issue the command:

USE
C:\ACCOUNTING\EMP026.FOC AS EMPLOYEE
END

UNIX:

To read the emp026 data source located in the /accounting/ directory, described by the Master File EMPLOYEE, issue the command:

USE
/accounting/emp026.foc AS EMPLOYEE
END

WebFOCUS

Feedback