In this section: How to: Reference: |
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 Allocation Wizard. The Allocation Wizard 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.
The Procedure (FOCEXEC) window opens.
The Allocation Wizard opens, as shown in the following image.
The following image shows that a name can be from one to eight characters. If you are identifying a data source, the name must be the same as the name of the Master File.
Note: The options vary depending on which device is selected. The steps below detail how the Allocation Wizard continues with the selected device.
Tip: At any time, you may click Back to go back and change the device, or any of the device settings.
Note: The application folders from the Reporting Server are shown by default and depend on the area from which the Allocation Wizard is invoked. For example, Local Projects, Data Servers, or Managed Reporting. You may specify a file in a directory that is not in the Reporting Server Application Path by using the Advanced option from the completed Allocation. For more information, see Advanced Allocation Dialog Box. The Application folders are shown in the following image.
or
Click the Browse button to display the Open dialog box and select from the list of existing files, as shown in the following image.
Note: Data files (*.dat) is the default value for the files of type drop-down list. You may also select Temporary Files (*.ftm), and All Files (*.*), as the type of file.
Note: The application folders from the Reporting Server are shown by default and depend on the area from which the Allocation Wizard is invoked. For example, Local Projects, Data Servers, or Managed Reporting. You may specify a file in a directory that is not in the Reporting Server Application Path by using the Advanced option from the completed Allocation. For more information, see Advanced Allocation Dialog Box, The application folders are shown in the following image.
or
Click the Browse button to display the Open dialog box and select from the list of existing files, as shown in the following image.
Note: Data Files (*.dat) is the default value for the Files of type drop-down list. You may also select Temporary Files (*.ftm), and All Files (*.*), as the type of file.
Note: The following syntax is applied to the FILEDEF statement when using a Printer device:
FILEDEF OFFLINE PRINTER BASEAPP/TEMPOFFLINE.FTM (PRINTER \\ibiprint\28C1
The completed file name appears for the Allocation, as shown in the image below.
A dialog box opens, displaying the component code and confirmation that no error exists.
The Advanced Allocation dialog box enables you to enter the FILEDEF command without using the Allocation Wizard. For details, see Advanced Allocation Dialog Box.
The Allocation component is added to the procedure. You may double-click the component to view the completed Allocation Wizard options again.
When you click Finish from the Allocation Wizard, the Allocation Wizard dialog box displays the completed logical allocation name that you created. Click Advanced to open the Advanced Allocation dialog box to enter the FILEDEF command without using the Allocation Wizard.
Note: When you create a FILEDEF command with the Advanced option, the Allocation is added to the procedure as a component. You may double-click the component to view or edit the command in the Advanced Allocation dialog box, as shown in the following image.
Shows the logical (defined) name of a file or device (one to eight characters).
Identifies the type of device to associate with the logical name.
Disk associates the specified logical name with a file.
Printer associates the specified logical name with a printer.
Http associates the Hypertext Transfer Protocol link, by allocating the Master File to the result of running the URL.
Terminal indicates that the keyboard and monitor are the input source and output destination for the file.
Clear clears the FILEDEF command assigned to a file name. (Select the logical name in the list below the Name box.)
Shows the full file name. It may include a drive and directory specification.
Enter a file name in the box, or click the Browse button to open a dialog box and select the file.
Note: You may use the File name field to specify a directory that is not in the Reporting Server Application Path.
Indicates that you are assigning a logical name to a file with a fixed-record length.
Enter the length of the record in the Record Size box.
Specifies the record length of the file.
Appends records to the end of the file. Without this option, the file is overwritten.
Retains the case (lowercase or mixed-case) of keyboard input in the Command Console.
Closes the Advanced Allocation dialog box and adds the FILEDEF command to the completed Allocation Wizard dialog box.
Closes the Advanced Allocation dialog box without saving the allocation settings.
Opens the online documentation for this topic.
Displays the FILEDEF command in code, and specifies any errors.
Moves the cursor into the Name box for a new FILEDEF command entry.
Deletes the logical name you select from the list below the Name box.
How to: |
You can clear Allocations by using the Allocation Wizard and with the Advanced Allocation dialog box.
Note: The Allocation opens with the tool you used to create the FILEDEF command, in this case, the Allocation Wizard.
Note: The Allocation opens with the tool you used to create the FILEDEF command, in this case, the Advanced Allocation dialog box.
WebFOCUS |