Monographs—Macro Documentation (submacros)
Macros are listed alphabetically, with the name of the macro in bold type. This group consists of secondary or "submacros." These are called upon by our primary macros and do not function independently. They are included here primarily for our macro development team.
bib_handler
description:
This is a submacro of catsearch but could be incorporated into other cataloging macros. It maximizes the current record. User can then print, cascade or close record.
calls:
- cascade
- close_bib
- maximize
- printmarc
assumptions:
- verify_bib is working correctly
comments:
- the bib record is not recognizable as a window, therefore the check for LDR; other solutions possible
cascade
description:
A short routine and general tool to cascade open bib records.
calls:
- none
assumptions:
- none
comments:
- could be called by many
cat_clr_windows
description:
Closes all child windows in catalog module.
calls:
- none
assumptions:
- none
comments:
- similar to cascade, maximize
- ESC keys likely a redundant precaution
catfind
description:
directs the various subroutines that allow keyword searching within catsearch; saves user several keystrokes and also retains previous search terms.
calls:
- bib_handler
- find
- list_handler
- verify_bib
assumptions:
- user addresses the dialog boxes
comments:
- bringing cataloging module to front a precaution but likely unnecessary
- previous versions tried to open most likely sought record but users requested more freedom, fewer instructions
catscan
description:
This module handles scan/browse searches. User is prompted for input and that is retained for modification. User is free to view sets, lists and full-views until bib record is selected.
calls:
- bib_handler
- scan
- verify_bib
assumptions:
- none
comments:
- bringing cat module to front probably redundant but safe
- similar to catfind users wish to select bib manually
clean_tag
description:
Trims tag name and delimiters from bib screen fields in preparation for output.
calls:
- none
assumptions:
- dollar signs are delimiter glyphs
comments:
- subfield list will grow with experience
- prevents higher level duplication of submacros
close_bib
description:
Closes topmost bib window.
calls:
- none
assumptions:
- bib window on top
comments:
- a very general reusable routine
find
description:
This routine handles the mechanics of a keyword search and appends an asterisk to ISBN search terms.
calls:
- none
assumptions:
- none
comments:
- tabs to correct search type
find_tag
description:
This is an extraction routine which returns the contents of a given MARC field to the calling macro via a variable.
calls:
- maximize
assumptions:
- desired bib screen is open in catalog module
comments:
- useful general submacro
- for situations where text mode problematic
- text variables 49 and 50 used as pseudo parameters
- explicitly scans entire bib screen
- caller can add logic by calling repeatedly, examining contents (e. g. multiple TKRs)
get_tag
description:
This routine retrieves the content of a MARC field from the bib screen and outputs at the current cursor position (an e-mail, Word document, web form et cetera). If no such field is found a message to that effect is returned.
calls:
- clean_tag
- find_tag
assumptions:
- bib screen is second topmost window
comments:
- tag sought is set programmatically by caller
- see also steal_tag
kill_field
description:
Deletes current MARC field in bib window.
calls:
- none
assumptions:
- bib window on top
comments:
- currently no activation
kill_subfield
description:
Deletes current MARC subfield in bib window.
calls:
- none
assumptions:
- bib window on top
comments:
- currently no activation
list_handler
description:
This routine handles the brief list window brought about by keyword searches. The user can scroll the list, use the view button, close the list or proceed to a bibliographic record.
calls:
- bib_handler
- verify_bib
assumptions:
- brief list on top (caller assures this)
comments:
- a pseudo-event-listener was necessary
maximize
description:
This short routine maximizes the current bib screen.
calls:
- none
assumptions:
- bib screen on top
comments:
- makes use of standard windows convention
minimize
description:
This short routine minimizes the current bib screen.
calls:
- none
assumptions:
- bib screen on top
comments:
- makes use of standard windows convention
postage_lac
description:
Creates one line item of postage fee in an LAC approval invoice. User is only prompted for amount. Budget, object code, note are entered automatically.
calls:
- none
assumptions:
- standing order line item type
- don't check subscription overlap
comments:
- could be adapted for standing order invoices
printmarc
description:
This routine prints the topmost bib window in "MARC tags" format.
calls:
- none
assumptions:
- bib screen on top
comments:
- handles both "normal" and "preview" print configuration
save2server
description:
Within the catalog module (bib screen) this routine saves the record to the server.
calls:
- none
assumptions:
- bib screen on top
comments:
- this version does not override the record check
save2server-2
description:
Within the catalog module (bib screen) this routine saves the record to the server.
calls:
- none
assumptions:
- bib screen on top
comments:
- this version overrides the record check window
scan
description:
This routine transfers the user's choice of scanning field and string to the browse search window. It returns control once the list of headings has been populated.
calls:
- none
assumptions:
- catalog module on top
comments:
- macro interface more ergonomic than Aleph's
verify_bib
description:
This submacro samples the home position of the topmost window, expecting to find the string "LDR". This identifies window as bib screen as there is no independent title.
calls:
- none
assumptions:
- LDR appears at top of bib screen consistently
comments:
- bib screen is a child window in multi-document interface
- child windows are not recognized as windows in Macro Express
- submacro avoids endless loop of offering to print same bib record

