Create routing slip

About this macro

Macro Last Updated

2014-02-05 (for details see Revision History in Technical Information)

Activation

<Ctrl><Shift> ' (apostrophe/quotation mark key) Menu Option "1"

Application

Aleph (Cataloging module)

Launch from

Open Aleph holdings record

What this macro does

This macro fills out the routing slip PDF form with information from an Aleph holdings record.

How to use this macro
  1. Open an Aleph holdings record.
  2. Press <Ctrl><Shift>' (apostrophe/quotation mark key) and select option 1.
  3. Edit the PDF as needed. (All text can be edited/deleted and all boxes can be checked and unchecked.)
  4. Press <Ctrl><p> to print.

Important: This macro relies on the copy record command in Aleph (<Ctrl><d>). This key combination must be kept as the default in Aleph and cannot be assigned as a hotkey for any macros. Check your Aleph and Macro Express settings before running this macro for the first time.

What this macro does

This macro:

  1. Reproduces the Aleph bib. number in a barcode font so that it can be scanned with a barcode reader.
  2. Checks HD box if 852 |c is HD.
  3. Types "Harvard Theatre Collection" above the call number field if 852 |b is THE.
  4. Types the call number as it appears in the 852.
    1. Puts collection information (e.g., HTC-LC, RR, HYDE, etc.) on first line, if appropriate.
    2. Puts the call number with any prefix or suffix on either the first line (if there is no collection information) or the second line (if there is collection information).
    3. Types "Use Restricted" on last call number line if the record has a 506 with first indicator 1.
    4. If the routing slip is for an accession record (e.g., H09 |k A13^^^xx), leaves the call number blank for cataloger to fill in later.
  5. Types the accession number, if it is in the 541 |e.
    1. If there is no 541 |e, but there is a 541 |d, types the accession date and formats date so that it is in DD MM YYYY order.
    2. If there is neither a 541 |d nor a 541 |e, types "n.d."
    3. If the accession number is the same as the call number, types the accession date.
  6. Types the Aleph bib. number (without the barcode font).
  7. Checks the Ownership Label, Book (Ownership Label), Tab, Plate, and Book (Plate) boxes by default. Also checks Prefab/CMI box if 563 indicates a prefab or CMI case.
  8. Types fund or donor information in the following cases:
    1. If there is a 541 |h with a single fund listed, types the fund without the price.
    2. If there is a 541 |c with gift, bequest, or deposit and a 541 |a, types "Gift of", "Bequest of", or "Deposited by" followed by the name in the 541 |a.
    3. If the 541 |a has "Julio Santo Domingo", types “Santo Domingo Collection".
    4. If the 541 |a has "John Milton Ward", types “John Milton and Ruth Neils Ward”.
  9. Types the cataloger's initials (from the H09 |k).
  10. Types the current date as the cataloging date.
  11. Can print either on half of a full sheet of paper or on a half-sheet slip. (Print Left and Print Center buttons only work with JavaScript enabled in Adobe Acrobat/Reader; see printing instructions below.)
How to print

With JavaScript enabled in Adobe Reader:

  • Click the Print Left button at the bottom of the routing slip to print on one half of a regular sheet of paper.
  • Click the Print Center button at the bottom of the routing slip to print half sheets using your printer's envelope feeder or to print a slip in the center of a regular sheet of paper.

Without JavaScript enabled in Adobe Reader:

1.  Press Ctrl + P

2.  Select one of the following printer settings:

    • To print on one half of a regular sheet of paper, make sure that you have the following settings:
      • Paper Sizing & Handling: Size
      • Paper Sizing & Handling: Actual Size
      • Orientation: Portrait
    • To print on half sheets, make sure that you have the following settings:
      • Paper Sizing & Handling: Size
      • Paper Sizing & Handling: Fit
      • Orientation: Portrait

3.  Click Print

Enabling JavaScript:

If there is a yellow box at the top of the form that reads: "JavaScript is currently disabled and this document uses it for some features. Enabling JavaScript can lead to potential security issues."

  1. Click on Options button.
  2. Choose "Enable JavaScript for this document always."

There should now be a purple box at the top that reads: "Please fill out the following form."

Technical information

This section provides detailed information about the macro, including lists of helper files, variables, submacros, and known problems/limitations and a record of the macro's development and revision history.

 Click to read Technical information
Name:

Create Routing Slip (PDF)

Purpose:

This macro fills in the Books Routing Slip PDF form with data from an Aleph holdings record.

Starting point:

Start this macro from a holdings record in the Aleph Cataloging module.

Development history:

Created 2013-12-09 by Vernica Downey

Created in and for Macro Express version 4.3.0.1

Created for Aleph 20.01 and Adobe Acrobat XI

Last revised: 2014-02-05

Revision history:

2014-02-05 -- Vernica Downey -- XFDF and PDF redesigned to remove radio buttons in end-processing options section and allow for all boxes to be checked/unchecked (see line 537)

2014-01-31 – Vernica Downey -- Split array variable increased for 3 to 10; line 286 edited and lines 290-291 and 293 added to stop "Undefined variable" error for nonstandard 541 |d

Submacros:

This macro does not run any macros as subroutines. However, future developers should consider adding subroutines to simplify MARC record and call number processing.

Helper files:

This macro uses the following files from the shared drive (H:\HOUGHTON\Technical Services\Shared\Macros\Helper_Files\):

  • Books_Routing_Slip.pdf
  • RoutingSlip_CollectionCodes.csv

This macro creates the following files on the C: drive (C:\Users\[USERNAME]\Documents\Insight Software\Macro Express\Houghton\):

  • Temp_Record.txt
  • Books_Routing_Slip.pdf
  • Books_Routing_Slip_data.xfdf
Shortcuts or key commands:

This macro relies on the following shortcuts or key commands:

  • <Ctrl>+<d> (the default copy record command in Aleph)
Known problems:

If file associations are not correct, an XML document or text file will open instead of a PDF. Users will need to adjust their file association by right clicking in Explorer and selecting Adobe Reader.

Variables:

This macro uses the following variables:

Filename variables:

  • Temp_Location = Macro Express/Houghton folder on C: drive
  • Temp_Record = Temp_Record.txt
  • Routing_Slip = Books_Routing_Slip.pdf
  • Collection_Codes_CSV = RoutingSlip_CollectionCodes.csv
  • RoutingSlipXFDF = Books_Routing_Slip_data.xfdf

Text variables:

  • 506
  • 541
  • 563
  • 852
  • 852_b
  • 852_c
  • 852_h
  • 852_Indicator1
  • Accession
  • Accession_Date
  • Accession_No
  • Accession_Status
  • Aleph_No
  • Call_No1
  • Call_No2
  • Call_No3
  • Call_No4
  • Cat_Date
  • Cat_Initials
  • Cat_Status
  • Collection
  • Collection_Codes_CSV
  • Field
  • Fund_Donor
  • HD
  • H09
  • LKR
  • PrefabCMI
  • Prefix
  • Punctuation
  • RoutingSlipXFDF
  • Routing_Slip
  • Source
  • Split [Array 1-10]
  • Suffix
  • Temp
  • Temp_Array [Array 1-5]
  • Temp_Line
  • Temp_Location
  • Temp_Record

Integer variables:

  • Counter
  • Length
  • Position
Actions:

1.  Clears variables and clipboard

2.  Sets file locations for Temp_Record.txt, Books_Routing_Slip.pdf, and RoutingSlip_CollectionCodes.csv

3.  Copies Aleph holdings record and saves record to a text file for processing

4.  Retrieves the following fields from the text file containing the saved MARC record:

    • DB (database)
    • LKR (Aleph linking)
    • 506 (Restrictions on access note)
    • 541 (Source of acquisition note)
    • 563 (Binding information note)
    • 852 (Location)
    • H09 (Local reporting)

5.  Gets Aleph bib. number from LKR |b

6.  Processes the 852 field

a. Gets sublibrary from 852 |b

b. Gets collection code from 852 |c

c. Gets call number from remaining 852 subfields

i.   Retains 852 |h (Classification part), |i (Item part), and |m (Call number suffix)

ii.  Removes |z (Public note) and |x (Nonpublic note)

iii. Replaces blank spaces and subfield tags with carets

iv.  Replaces lowercase l with HTML (hex) identity code for lowercase script l (&#x2113), excluding the following text:

  • Aldrich
  • Balt
  • Bible
  • Catalogs, Catalogue, etc.
  • Celt
  • Class
  • Collection
  • Dealer
  • Film
  • Horblit
  • Ital
  • Kipling
  • Lowell
  • Mol
  • Philol
  • Phil
  • Roosevelt
  • Slav
  • Volume designators (e.g., ‘vol.’ or ‘volume’)

Note: This section is needed because Macro Express does not recognize the lowercase script l character. There are probably many other collections that include lowercase l and will not display properly on the routing slip. These should be added to the macro as needed.

d.  Sets call number as blank if record is an accession record awaiting cataloging (i.e., the H09 |k has accession information but no cataloging information)

e.  Matches sublibrary and collection code to display/formatting data in the HOU/POE/THE collection code list (RoutingSlip_CollectionCodes.csv)

f.  Adds prefix and/or suffix to call number based on CSV file data (e.g., b, f, pf, (horz))

g. Reverses 852 |m and 852 |h/|i for call numbers that contain a Lobby location

7. Processes 541 field

a. Gets accession date from 541 |d (Date of acquisition)

i.    Removes end-of-subfield punctuation

ii.   Changes date from YYYY MM DD to DD MM YYYY order

b. Gets accession number from 541 |e (Accession number)

i.    Removes all but the first accession number if there is more than one

ii.    Removes end-of-subfield punctuation

c. Selects accession number for “ACCESSION # (OR DATE)” routing slip field

i.    If accession number is not present, selects accession date instead

ii.    If neither accession number nor date is present, selects “n.d.”

d. Gets fund information from 541 |h (Purchase price)

i.    If there are multiple funds (i.e., multiple purchase prices listed), sets fund to blank

ii.    If only one fund (i.e., one purchase price), removes purchase price and sets remaining text as fund

e. Gets source information from 541 |c (Method of acquisition)

f. If 541 |c is gift, bequest, or deposit, gets 541 |a (Source of acquisition) and combines with 541 |c to create a complete donor statement for the routing slip

8.  Modifies fund/donor information for special cataloging projects

a. Santo Domingo (if 541 |a Julio Santo Domingo, routing slip will have “Santo Domingo Collection”)

b. Ward Collection (if 541 |a  John Milton Ward, routing slip will have “John Milton and Ruth Neils Ward”)

Note: This section is for projects that need routing slip text that differs from what is in the 541 field. While this section can be expanded, additions should be carefully considered. Users can always set up separate text string macros to add info to the routing slip; it is not necessary for everything to be addressed by the routing slip macro.

9.  Gets cataloger’s initials from H09 |k

10. Saves the current date as the cataloging date for the routing slip

11. Formats variables for routing slip

a. Sets “On” status for routing slip HD box if 852 |c is HD

b. Puts “Harvard Theatre Collection” on first line of call number field if 852 |b is THE

c. Puts collection on second line of the call number field if there is collection data in the CSV file

d. Puts call number on the third line of the call number field if there is also collection information; puts it on the second line if there is no collection information

e. Puts “Use Restricted” on last line of call number field (either third or fourth line) if there is a 506 with 1 as the first indicator

f. Sets “On” status for Prefab/CMI box if prefab or CMI is noted in 563 field

12. Saves the appropriate variable data as a new XFDF file

13. Closes routing slip PDF if the PDF is already open

14. Copies Books_Routing_Slip.pdf from H: drive to C: drive

Note: To open the XFDF, a copy of PDF must be in the same folder on the C: drive

15. Opens XFDF with Books_Routing_Slip.pdf as the template