Tip, February 2004

Using DB/TextWorks (or CS/TextWorks) and your barcode reader for stocktaking

If you are using DB/TextWorks or CS/TextWorks in conjunction with barcodes in a library or information centre, and you need to carry out a stocktake of your collection, you can make your stocktake faster and more accurate by following the steps below.

Collect the barcode numbers

Read in all barcode numbers of the items to be checked and save them in a file. The procedure will be slightly different according to whether you have a portable or a fixed barcode reader:

Fixed Reader:

    • Open a new file in Notepad, Word or Wordpad.
    • Make sure that the reader is set to add a "carriage return" after each number read in.
    • Read in the barcode numbers, saving the file to disk frequently. (Use Save As>Text only if in Word.)

Portable Reader:

    • Set your reader into a mode which will store a sequence of barcodes with no extra characters. If using the Z4 DataTraq supplied by Maxus with a program loaded, use Function 31 to exit the program before beginning to read in the barcodes.
    • As above, ensure that a "carriage return" is added after each barcode number read in.
    • When you have finished reading in the barcodes then use the Download option (Function 11 for the Z4 DataTraq) to save the numbers to a file on your computer. According to your reader's settings, you may be able to give this file a unique name, or you may need to overwrite an existing file if your reader always saves to the same filename.

Prepare your textbase

Use the following instructions to add a field to your TextWorks textbase to indicate which items have been recorded during the stocktake. This will be an Automatic Date field and it can be removed once the stocktake is completed, if you wish.

Use the textbase that contains individual records for every copy of each item. This will normally be the Loans textbase, unless you have made duplicate records in your catalogue for multiple copies of items.

  • Open the textbase in TextWorks.
  • Choose Maintain>Edit Textbase Structure>Edit Fields.
  • Create a new field, eg Stocktake, choosing Automatic Date as the field type, and using the Automatic Date Definition tab to select Update Entry: When record is Created or Modified and the date format you require.
  • Click Save and close the Edit Textbase Structure window.

Import the barcode numbers

Import the file of recorded barcode numbers, which will automatically update the Stocktake field, as follows:

  • Choose File>Import and select the name of the file of stored barcodes.
  • In File Format, select Delimited ASCII Format, choose the option Specify order in which to import fields and select the Barcode field.
  • Under Add/Replace Options, choose Check for Matching Records, Replace Fields if match is found and Reject New Record if match is not found.
  • Select Barcode as the field that Incoming Records Must Match.
  • Click OK then Yes to proceed with the import.

When the process is complete, all those items which were found during the stocktake will have the current date entered in the Stocktake field. In records for missing items this field will be empty.

The import operation will also create an exception file containing a complete list of all the barcode numbers that were rejected. This exception file will be useful to you as it contains the barcode numbers for all of the barcodes in your collection that do not actually have a corresponding record in the textbase. (The exception file will carry the file extension .xnn where nn is a running number. If you create only one exception file, its extension is .x01. If you have to import the barcode file twice, the second exception file will have the extension will be .x02, and so on.)

Using the Stocktake field

You may not wish to retain the field added for this procedure once your stocktake is complete, or you may choose to retain the field but change the field type from Automatic Date, so that the date does not get changed when other updates are made on the records. Here are some suggestions:

Transfer the information to another field:

  • Search for all records with an entry in the Stocktake field (use =* in the query box).
  • Choose Records>Batch Modify and add a note, eg "Found in Stocktake December 2003" to a Notes field. (Click here for more information on the Batch Modify feature.)
  • Then use Maintain>Edit Textbase Structure>Edit Fields to delete the Stocktake field.

Retain the Stockbase field, but change the field type:

  • Use Maintain>Edit Textbase Structure>Edit Fields to change the field type either to just a normal Date field, or to a Text field.
  • Then use Records>Batch Modify if you wish, as above, to change the field entry. (Click here for more information on the Batch Modify feature.)

More information on barcodes and TextWorks

For more detailed information on how barcodes work in TextWorks, click here to read our popular tip page on barcodes.


Maxus Australia Pty Ltd - Contact us for any further information or other hints.