Use this tab to choose how to name and store the file. You can access this tab when you configure a printer for writing to disk.
Click an option you want to learn more about.
Folder
Selects the path where the Barr File port will route documents. You can route to a folder that has not been created by entering the desired path. The new folder will be created the first time a document is sent to it. The default folder is \\Barr Files.
For files in the FILE80 format, you can embed the path in the file. If the path is not embedded or if the path is invalid, the file is stored in the selected folder.
Use field to select a subfolder
Specifies the value of the Barr header field that contains the name of the subfolder where you want to store each document. You can store documents in subfolders of the root path. If a subfolder is selected, all documents routed by this port must use the same field to specify their subfolders, but the field value can be different for each document. Use the ellipsis (...) button to choose which header field to use as the name of the subfolder.
Clear – Removes the subfolder from the output path.
If you do not specify a subfolder field, the output file will be saved in the folder specified in the Folder box.
Field components
Specifies the file name the document will have when it is routed from the spool to its disk destination. Select which Barr header field contains the file name. All documents routed by this port must use the same field to specify their names. Default file extensions will be assigned to output files (depending on the chosen output conversion); however, you can use the following options to override the file names and assign file extensions.
Long file names and spaces are supported.
Default button – Returns to the default field, NJHGJNAM (Job Name) from the Job Header General section. The resulting file name depends on the option chosen under Numeric counter. Depending on the option selected, the resulting file name can include a numeric counter either in the base file name or as the extension.
Append Field button – Enables multiple field file names. Click Append Field multiple times to select multiple fields. Field names are separated by an underscore.
Validate button – Verifies the file name syntax. Clicking this button could result in changes to file name. It is recommended that you validate the file name syntax to correct potential errors.
Duplicate file name
Specifies how to handle duplicate file names.
New File – Default. If a new file does not have an extension in its name or another file has the same name, BARR/SPOOL generates a unique file name for the new file. See the Common questions for printers topic for more information.
Append – Adds the new file to the end of the existing file with the same name.
Replace – The new file overwrites the existing file. This choice might be useful if you receive a file with the same name every day and you do not want a large number of files to accumulate on the disk. This choice saves you the work of manually deleting old files.
Reschedule – If a file exists with the same name as the file being written, BARR/SPOOL will reschedule the job to write the file when it no longer detects the duplicate file name. This is useful for third-party software such as Elixir.
Write to single file
Specifies whether the job will be written as a single file or as separate files, based on the job copy count (NJHGJCPY). When selected, each copy of the job will be written to a single file. When this is not selected, each copy will be written to a separate file.
For example, you are writing a job with the following properties: Job copy count =2, DS1 copy count = 1, DS2 copy count = 2, and DS3 copy count = 1. If Write to single file is selected, you will receive a single file containing all of the data sets. If Write to single file is not selected, you will receive two files containing the data sets. See the following table.
Selected |
|
Not Selected |
|
Single file |
1st file |
2nd file | |
DS1 |
DS1 |
DS1 | |
DS2 |
DS2 |
DS2 | |
DS2 |
DS2 |
DS2 | |
DS3 |
DS3 |
DS3 | |
DS1 |
|
| |
DS2 |
|
| |
DS2 |
|
| |
DS3 |
|
|
If the Barr file transfer format is selected on the File Format tab, this option does not apply. Each data set is always written to a separate file.
Allow spaces in file name
Specifies how file names that contain spaces will be written, either with the spaces or replacing the spaces with exclamation points (!). When selected and the file name contains spaces, the spaces will be preserved. When this is not selected and the file name contains spaces, the spaces will be replaced with exclamation points. This option is selected by default.
Windows format
Specifies that the file is in Windows format. By default, this will limit the file name base to 19 characters and the extension to 3 characters.
DOS format
Specifies that the file is in DOS format. This will limit the file name base to 8 characters and the extension to 3 characters. The number of characters in the file name cannot be changed.
Maximum characters in file name __, extension __
Specifies the number of characters to limit file names and extensions. Some computer operating systems do not support file names longer than 8 characters and extensions longer than 3 characters. The maximum length of the file name and extension is limited to the Microsoft Windows operating system. For files in Windows format, the default length of the file name base is 19 characters and the extension is 3 characters. For files in the DOS format, you cannot change the number of file name characters. The base length is 8 characters and the extension is 3 characters.
Specifies how to handle duplicate file names. These options are available only when New File is selected for the Duplicate file name option.
Base
Selecting this option results in a numeric counter being added to the end of the file name. The default length is 10. This option only available for files in the Windows format.
Extension
Selecting this option results in a numeric counter being used as the file name extension. The default length is 3. This option only available for files in the Windows format. If you are using the DOS format, a numeric counter of 3 digits will be automatically applied as the extension.
Number of digits
Specifies the length of the file name counter in the base or extension. The default length of the base is 10 and the extension is 3. This option only available for files in the Windows format. If you are using the DOS format, a numeric counter of 3 digits will be automatically applied as the extension.
Separator
Specifies the character that separates the file name from the counter. The default character is #. The following are invalid characters: \ / : * ? “ < > |.
Apply counter to first file
Applies the counter to the first file. This option is selected by default. If the numeric counter is specified as the Base, the counter will be used in the base of the file name. If the numeric counter is specified as the Extension, the counter will be used in the file name extension.
The following table displays the results of selecting or not selecting this option. It also shows the difference in placing the counter in the base or in the extension.
|
|
|
Counter in base |
Counter in extension |
||
|
File name field |
Job name |
1st file |
2nd file |
1st file |
2nd file |
Selected |
<NDHDJNAM> |
abcd.txt |
abcd#0000000001.txt |
abcd#0000000002.txt |
abcd.001 |
abcd.002 |
Not selected |
<NDHDJNAM> |
abcd.txt |
abcd.txt |
abcd#0000000001.txt |
abcd.txt |
abcd.001 |
Preserve extension
Selecting this option causes the counter to not replace any extension in the specified file name. The counter will be added after the extension. This option is only available when the numeric counter is the extension.
Script
Scripting allows you to run an external program after the Barr File Port writes a file to disk. The Script field must be populated with two strings, the path of the application you want to run and the folder where the script file is located. For example, c:\perl\bin\perl.exe "c:\barr files\script.pl". The application that will be run must be previously installed and the folder of the script file must be entered in quotes. The script line also allows you to use pass header fields to the external application. The syntax for the header fields is dependent on the external application. For example, c:\perl\bin\perl.exe “c:\barr files\script.pl” –h <NDHGRMT>. In this example, <NDHGRMT> would be replaced with the value of the header field.
Example:
Suppose a record of files written to disk needs to be saved into a text file. You could enter the following command in the Script box.
c:\perl\bin\perl.exe "c:\barr files\script.pl"
This would run the application Perl (which must be installed) and the script file located in the c:\barr files folder. In this example, the script file contains the following data:
use Cwd;
my($FileName) = @ARGV;
open (LOG_FILE , ">>c:\\Barr Files\\log.txt");
print LOG_FILE "$FileName\n";
close( LOG_FILE);
exit;
After the script is executed, the path to the file name is appended to the script string. In this example, the Script field would be updated to show, c:\perl\bin\perl.exe “c:\barr files\script.pl” “c:\Barr Files\880K#0000000001.txt”. Each time a file is written, the log.txt file is updated.