Differences
This shows you the differences between two versions of the page.
— |
phelp:helpconcatenatefiles [2021/12/29 16:21] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | CONCATENATE FILES | ||
+ | |||
+ | This utility allows you to take two or more MARC files and join them together, or ' | ||
+ | |||
+ | |||
+ | BASIC CONCATENATION STEPS | ||
+ | |||
+ | There are three basic steps to concatenating files. First, choose the files that you want to concatenate, | ||
+ | |||
+ | The buttons on the left side of the form make it easy for you to select the files you want to work with. Click the ' | ||
+ | |||
+ | Note that every file that is added to the Source Files list has a checkbox next to it. If you uncheck a file, it will not be added to the results when you start the concatenation job. Click the 'Clear List' button to empty the Source Files list and start from scratch. | ||
+ | |||
+ | When you have your filenames set up, click ' | ||
+ | |||
+ | |||
+ | USING A PATTERN TO SELECT SOURCE FILES | ||
+ | |||
+ | There is an option called ' | ||
+ | |||
+ | Once the patterns have been entered, click the 'Check Patterns' | ||
+ | |||
+ | If you want to select files from multiple folders, add each folder as a new pattern, one pattern per line. Remember, the patterns have to begin with a path--do not simply enter ' | ||
+ | |||
+ | |||
+ | MARC RECORD COUNTS | ||
+ | |||
+ | This utility performs a raw copy of each file without any MARC verification or error checking. As a result, this raw copy is many times faster than it otherwise would be; however it may not always produce an accurate record count. | ||
+ | |||
+ | When the program is done, it is recommended that you run the Count utility to verify the final record count of the file created by concatenation. | ||
+ | |||
+ | |||
+ | APPENDING FILES | ||
+ | |||
+ | If you want to append one file to another, select the file you want to Append using the Source File button, then select the file that you want to append it to using the Results button. In the Confirmation dialog that follows, select ' | ||
+ | |||
+ | |||
+ | COPYING FILES | ||
+ | |||
+ | We recommend that you use Windows to Copy files. However, if you want to copy one file to another using this utility, select the file you want to Copy using the Source File button, then select the file that you want to copy it to using the Results button. In the Confirmation dialog that follows, select ' | ||
+ | |||
+ | |||
+ | DUPLICATE FILES | ||
+ | |||
+ | Duplicate files are not included by default. For example, if you select a Source File more than once, it will be added to the Source Files list, but its checkbox will not be selected. If you want these files to be added more than once, you will have to manually check them. | ||
+ | |||
+ | Although it is not an error, the program will alert you if the Results file is present in the Source File list. The purpose of the alert is to prompt you to double-check your options, since the Results file will be destroyed (and be replaced by the sum of the Source Files) when the concatenation is complete. | ||
+ | |||
+ | |||
+ | XML DATA | ||
+ | |||
+ | If ' | ||
+ | |||
+ | 1) The XML declaration (typically '<? | ||
+ | |||
+ | 2) The XML declaration will then be added to the beginning of the concatenation results, followed by a new root element that is guaranteed to be unique: | ||
+ | |||
+ | <?xml version=" | ||
+ | < | ||
+ | [contents of xml file 1 ... | ||
+ | [contents of xml file 2 ... | ||
+ | [contents of xml file 3 ... | ||
+ | </ | ||
+ | |||
+ | The purpose of adding this root element is ensure that the resulting file is ' | ||
+ | |||
+ | Apart from the check for the XML declaration implied above, Concatenate Files does not validate the XML structure in any way. If using this utility to concatenate XML files from different sources, the results may not be ' | ||
+ | |||
+ | You may either accept or decline this special processing. If declined, the files will be concatenated exactly as they are. | ||
+ | |||
+ | |||
+ | NON-MARC DATA | ||
+ | |||
+ | Although it was not designed for this purpose, and the instructions above do not mention it, this utility can also be used to concatenate non-MARC files. For example, you could use this utility to concatenate a list of text files. | ||
+ | |||
+ | In this mode, the program counts each byte as a ' | ||
+ | |||
+ | Please be aware that some types of files just are not meant to be concatenated. | ||
+ | |||
+ | |||
+ | INTERLEAVE | ||
+ | |||
+ | This option allows you to concatenate the MARC records from different files together in an interleaved order. | ||
+ | |||
+ | For example, if you have three source files named A, B, and C, and each file contains three records, the resulting MARC file in an ' | ||
+ | |||
+ | A-B-C-A-B-C-A-B-C | ||
+ | |||
+ | whereas, in a normal concatenation, | ||
+ | |||
+ | A-A-A-B-B-B-C-C-C | ||
+ | |||
+ | If there are an unequal number of records in the source files, the program maintains the interleaving order until all records from a file are exhausted. For example, given the three files A, B, C, where file A contains 3 records, file B contains 2 records, and file C contains 4 records, the resulting MARC file in an ' | ||
+ | |||
+ | A-B-C-A-B-C-A-C-C | ||
+ | |||
+ | whereas, in a normal concatenation, | ||
+ | |||
+ | A-A-A-B-B-C-C-C-C | ||
+ | |||
+ | The ordering of the source files in an interleave operation might be important, depending on what you are going to do with the results. Use drag and drop to put the files in the order that you want. | ||
+ | |||
+ | Interleave requires at least two source files. Interleave is only available if all of the sourcefiles contain MARC records. | ||
+ | |||
+ | As this option creates an unusual results file, you will always receive an 'Are you sure' pop-up when the Interleave option is checked. | ||
+ | |||
+ | |||
+ | EXAMPLE | ||
+ | |||
+ | Here is a sample scenario for using the Concatenate Files utility. Say that you have a large file and are looking for a specific problem (like CIP records). You could run a Quick Review to identify all records where 300 $a = 'p. cm.'. To make editing easier, you use the MARC output option and select ' | ||
+ | |||
+ | This is where Concatenate Files comes in. | ||
+ | |||
+ | |||
+ | REPEAT | ||
+ | |||
+ | The purpose of this option is to make it easy to create a MARC file that contains the same record ' | ||
+ | |||
+ | To do this, find the record you want to " | ||
+ | |||
+ | Next, open the Concatenate Files utility, press Select, and select the file containing the record you want to multiply. | ||
+ | |||
+ | Next, select " | ||
+ | |||
+ | Finally, press " | ||
+ | |||
+ | WARNING: if you select an existing filename for the results, the contents will be overwritten with the selected file (' | ||
+ | |||
+ | Press " | ||
+ | |||
+ | When using " | ||
+ | |||
+ | NB: the selected source file is copied to the results file, ' | ||
+ | |||
+ | |||
+ | UNIX CAT | ||
+ | |||
+ | This program tries to behave in the same manner as the unix ' | ||
+ | |||
+ | NOTE: There are a great many varieties of unix, and some of the description above may not apply in each case. | ||