Allocating TIBCO WebFOCUS Files

In this section:

How to:

Reference:

WebFOCUS files fall into three categories: application files, extract files, and work files. This topic contains information about files and ways to define them in the Windows and UNIX environments, and all portable platforms.

Some files are automatically allocated by WebFOCUS, but there are times when you must explicitly define a file and its location. A FILEDEF command generates platform independent file paths for all portable platforms by creating FILEDEF syntax with application names.

Note: In order to use spaces in a field or directory name within a FILEDEF command, you must surround the entire path with double quotation marks ("). For example:
FILEDEF TEMPFLE DISK "C:\dir1\dir2\directory space\tempfle.ftm"

Syntax: How to Reference a File Under Windows

filename.filetype

where:

filename

Is the name of the file.

filetype

Is the type of file. This is a three-letter extension for an installation of Windows based on the File Allocation Table (FAT) file system.

Reference: TIBCO WebFOCUS Files Under Windows and UNIX

The following tables describe the WebFOCUS files that you will use under Windows and UNIX. WebFOCUS uses file extensions to distinguish different file types.

Application Files

Extension

Description

.mas

Master File.

.acx

Access File.

.fex

Procedure (FOCEXEC).

.foc

FOCUS data source and external index.

.dat

Sequential data source.

.sty

WebFOCUS StyleSheet file.

.err

Error messages file or help text.

.exe or .dll

Library of functions in the Windows environment.

.prf

Profile.

.htm
.html
.jpeg
.gif
.css
.js
.class
.jar

Files displayed in a web browser.

Extract Files

File

Description

HOLD

Contains data saved using the HOLD command.

SAVB

Contains data saved using the SAVB command.

SAVE

Contains data saved using the SAVE command.

HOLDMAST

Temporary Master File for HOLD files.

.FTM

Contains data saved using the HOLD, SAVB, or SAVE command.

Note: Dialogue Manager output files must be allocated using the FILEDEF command in system or user profiles.

Work Files

File

Description

FOCSTACK

Contains resolved Dialogue Manager procedures.

FOCSORT

Used during sorting.

FOCPOST

Sequential output file saved using the POST command. The PICKUP command reads it back in.

FOCSML

Used by Financial Modeling Language (FML).

OFFLINE

Used when the SET PRINT parameter is OFFLINE.

SYSIN

Directs input.

SYSPRINT

Directs output to the screen.

Dynamically Defining a File Under Windows and UNIX

You do not have to explicitly define most of your application files prior to referring to them. WebFOCUS dynamically allocates certain application files. Additionally, WebFOCUS dynamically defines all extract files and temporary work files to the operating system during a session.

WebFOCUS defines the following extract, output, and work files:

Assigning a Logical Name With the FILEDEF Command

How to:

For a file managed by the operating system, such as an ISAM or comma-delimited data file, the physical file name is the actual name of a file as it appears to the operating system. A logical name (or ddname) is a shorthand name that points to the physical file name. Logical names simplify code by allowing short names to be used in place of the longer physical file name.

The FILEDEF command assigns a logical name to a physical file name and specifies file attributes. You can explicitly define a file and its location to WebFOCUS using the FILEDEF command. This generates platform independent file paths for all portable platforms by creating FILEDEF syntax with application names. An Allocation can be issued in a procedure and lasts for a single request.

It is recommended that instead of including an Allocation in each procedure, you include all FILEDEF commands in a single file that you call with the -INCLUDE command at the beginning of each procedure. This enables you to make changes to your FILEDEF commands globally instead of changing the Allocation information in each procedure.

The FILEDEF command is typically used in the following ways in operating systems that support this command:

You can also use the Universal Naming Convention (UNC) to assign logical names to files that are located on a server. In order to take advantage of the UNC you must first attach to the server you want to use. For information on attaching to a server or mapping network drives, consult your Network Administrator.

Syntax: How to Assign a Logical Name With a FILEDEF Command

FILEDEF ddname DISK appname[/appnamea...]/filename [(APPEND] [LRECL n] [RECFM F]

or

FILEDEF SYSIN TERM [LOWER]

or

FILEDEF ddname PRINTER

where:

ddname

Is the logical name for the file, input, or output. The ddname can be from one to eight characters. When used to associate a data source with a Master File, the ddname must match the name of the Master File.

DISK

Associates the specified ddname with a file.

appname[/appnamea...]

Is the name of the application under APPROOT, or a nested application name, that contains the physical file.

filename

Is the physical name of the file under the appname.

APPEND

Appends records to the end of the file. Without this option, the file is overwritten.

LRECL n

Specifies the record length. n is an integer.

You must specify an LRECL value if the file is a SAVB file or fixed-format transaction file used in data maintenance (FIXFORM files) that contains binary values.

RECFM F

Specifies fixed length records.

You must specify an RECFM value if the file is a SAVB file or fixed-format transaction file used in data maintenance (FIXFORM files) that contains binary values.

TERM

Specifies the keyboard and monitor as the input source and output destination.

LOWER

Sends keyboard input to WebFOCUS as entered.

PRINTER

Specifies the printer as the output destination.

FOCUS data sources (files with the .foc extension) that do not conform to the default naming convention are identified with the USE command, not FILEDEF. For information on the USE command, see Accessing a FOCUS Data Source.

Example: Assigning a Logical Name to a File Located on a Server

Assign a logical name to a file located on a server using the Universal Naming Convention:

FILEDEF DATFILE DISK \\SERVER2\DISK1\MAYSPLES.DAT

Example: Redirecting Output

To send output to the LPT1 port (provided that the machine is configured properly):

FILEDEF OFFLINE DISK LPT1

Example: Setting a Search Path

To search all directories on the search path for the NEW_EMPS.DAT file:

FILEDEF SYSIN DISK *:NEW_EMPS.DAT

Example: Appending a Report Extract to Other Content

To append a report extract from the LIBRARY data source to the current content of the file LIB03.FTM:

FILEDEF SAVE DISK C:\LIBRARY\LIB03.FTM (APPEND

Example: Reading Standard Text Editor Files With LRECL

You can specify an LRECL equal to or greater than the implied LRECL for the request. For example, if the length of the longest line in the text file is seven characters, issue this command:

FILEDEF BIGLINE DISK BIGLINE.FTM (LRECL 7

Displaying Current ddnames Assigned With FILEDEF

How to:

The ? FILEDEF command displays the ddnames assigned for various files, input and output.

Syntax: How to Display Current ddnames

? FILEDEF

Example: Displaying Current DDNAMEs

Issuing the command

? FILEDEF

produces information similar to the following:

Lname  Device  Lrecl  Recfm  Append  Expl  Filename
===============================================================
HOLD2  DISK      0    V      N       Y     C:\VM\SMALL\HOLD2.FTM

Clearing Allocations

How to:

You can clear Allocations by using WebFOCUS syntax.

Syntax: How to Clear a Logical Name With Syntax

FILEDEF ddname CLEAR

where:

ddname

Is the logical name. It may contain one to eight alphanumeric characters.

CLEAR

Clears the specified ddname.