Primo Procedures

Sierra Export/Primo Harvest

The Sierra database is exported every Thursday and harvested by Primo on Sunday at 2am with all new and updated records being available Monday. A second harvest runs on Tuesday at 2am if it is necessary to re-do the export. Additionally, the harvest schedule can be altered, as needed, under the Scheduler menu. (Note: when possible the export is conducted after business hours on Friday to get the full week's cataloging). The export is a manual task using Sierra's Create Lists and Data Exchange modes.

Overview of process: This transfer processes uses four programs: Sierra, MarcEdit, 7-zip, and CoreFTP.

(Please note: This is an explanatory overview. For step-by-step instructions, see below.)

1. Create list in Sierra using the NYARC: PRIMO saved query. This query is as follows:

(BIBLIOGRAPHIC MARC Tag 935 has "EBC" OR BIBLIOGRAPHIC Cat Date not equal to " - - ") AND (BIBLIOGRAPHIC Bib Status equal to "-" OR BIBLIOGRAPHIC Bib Status equal to "1")

2. Create output using Data Exchange mode and Create C option. Name output file: primo.out

3. Transfer primo.out to local primoExtracts dir

4. Run batch file: primoTransferTAR.bat* [primoTransferTAR.bat resides in the same directory]

5. Remove output file in Data Exchange

6. Delete local .mrc and .tar files after confirming the pipe ran successfully in Primo.

A script file automates the processing and transfer of the Sierra records.

1. primoTransferTAR.bat

This file executes the following:

"%MARCEDIT%"\cmarcedit.exe -s "c:\users\lily\desktop\primoExtracts\primo.out" -d "c:\users\lily\desktop\primoExtracts" -records 1000 -split

MarcEdit splits primo.out into files containing a max of 1000 records.

for %%X in (*.mrc) do "c:\Program Files\7-Zip\7z.exe" a "%%X.tar" "%%X"

7-zip individually compresses the .mrc files created by MarcEdit in .tar files.

"c:\program files\coreftp\coreftp.exe" -s -O -site nyarc_exlibris -u "c:\users\lily\desktop\primoExtracts\*.tar" -p /ongoing/

Runs coreftp to send the tar files to the NYARC server in the /ongoing directory for pickup by Primo

Cut and past the script below into a text editor and create a .bat file named primoTransferTAR.bat:

"%MARCEDIT%"\cmarcedit.exe -s "c:\users\lily\desktop\primoExtracts\primo.out" -d "c:\users\lily\desktop\primoExtracts" -records 1000 -split

for %%X in (*.mrc) do "c:\Program Files\7-Zip\7z.exe" a "%%X.tar" "%%X"

"c:\program files\coreftp\coreftp.exe" -s -O -site nyarc_exlibris -u "c:\users\lily\desktop\primoExtracts\*.tar" -p /ongoing/

Be sure to change the local directory structure to match your own environment.

Instructions: Setting up your computer to export Sierra for harvesting by Primo

1. Getting and installing utilities software

Download and install the following programs. All are free, or have free versions.

Marcedit:

http://marcedit.reeset.net/downloads

7-Zip:

http://www.7-zip.org/download.html

coreFTP:

(The free version is called coreFTP LE)

http://www.coreftp.com/download.html

2. Creating the primoExtracts folder

Right-click on your desktop, scroll to New > Folder

Name the folder primoExtracts

3. Creating the primoTransferTAR.bat file

Open Notepad (or other simple text editor) and paste the following script into a new document:

"%MARCEDIT%"\cmarcedit.exe -s "c:\users\lily\desktop\primoExtracts\primo.out" -d "c:\users\lily\desktop\primoExtracts" -records 1000 -split

for %%X in (*.mrc) do "c:\Program Files\7-Zip\7z.exe" a "%%X.tar" "%%X"

"c:\program files\coreftp\coreftp.exe" -s -O -site nyarc_exlibris -u "c:\users\lily\desktop\primoExtracts\*.tar" -p /ongoing/

Edit the filepaths in the script to match the filepath for the primoExtracts folder on your computer's desktop.

In Notepad (or other text editor) go to menu File > Save as, and:

    • Browse to the primoExtract folder on your computer's desktop.

  • Type primoTransferTAR.bat in the "File name" box.

    • Select "All files" from the "Save as type" pulldown menu.

    • Save.

4. Setting coreFTP to connect to the NYARC server

Open coreFTP and enter the following settings:

Click "connect"

(If settings are correct, you will see the directories on the NYARC server in the right pane of coreFTP.)

To exit, click the disconnect icon in the right-side pane before closing.

Instructions: Exporting Sierra in preparation for harvesting by Primo using the primoExtractsTAR.bat file

[Note: the primoExtractsTAR.bat works on some PCs but not others. For instructions on exporting Sierra for harvest by Primo without using the .bat file, see below.]

0. [Clearing out files from previous exports]

Open the primoExtracts folder on PC desktop.

If there are .mrc, .tar. or .out files in the folder, delete them.

Open the Sierra cataloging module

Click "Data Exchange" button in the cataloging module menu

Select "Output MARC records (out)" from pulldown menu

If there is a primo.out file in the list of files, delete it.

From the Windows Start menu, open the coreFTP program and connect to the NYARC server.

Open the "ongoing" folder, and make sure it is empty. If it is not, contact the person who regularly does the Sierra upload.

If the "ongoing" folder is empty, disconnect and close coreFTP

1. [Creating the review file in Sierra of all bibs to be exported to Primo]

Open the Sierra cataloging module

Click "Create Lists" button

Select "primo" (file 123, the last, biggest file in the list)

Click "search records"

Click "yes" on the warning that you are about to over-write the file

When Boolean search window appears, click "use existing search"

Select "primo" (last, biggest list), file 123

Click "use"

When query appears in Boolean Search window, click "search"

Wait until "primo" row, "status" column, says "complete"

(Compilation of review file takes approx. 5 min.)

2. [Converting Sierra review file to MARC output file]

Click "Data Exchange" button in the cataloging module menu

Select "Output MARC records (out)" from pulldown menu

Click "Create C" in toolbar

Type "primo" (without quotation marks) into text box (file extension .out appears to right of text box)

Select from pulldown menu: "Review"

Select from Review file pulldown: "primo" (last file on the list)

Click "start"

Wait for Output Messages window to show results summary

(Creation of "primo.out" file takes approx. 15 min.)

When results appear in "Output Messages" window, click "cClose" button on toolbar

3. [Transferring primo.out file from Sierra server to local PC desktop, primoExtracts folder]

In the Data Exchange window, select "primo.out" file

Click "Put PC" button on toolbar

Browse to and open "primoExtracts" folder on desktop

Click "Save" in dialog box

(Transfer of primo.out file to PC takes approx. 60-75 min.)

4. [Splitting the primo.out file into smaller .mrc files, converting them to .tar files, and uploading them to the NYARC server for harvest]

Double-click the primoTransferTAR file in in the primoExtracts folder on your desktop

(splitting, zipping, ftp'ing files takes approx. 20-30 min.)

Optional: using CoreFTP, connect to the ExLibris server, browse to the "ongoing" folder, and make sure all .tar files were copied from the primoExtracts folder to the server

Instructions: Exporting Sierra in preparation for harvesting by Primo WITHOUT using the primoExtractsTAR.bat file

0. [Clearing out files from previous exports]

Open the primoExtracts folder on PC desktop.

If there are .mrc, .tar. or .out files in the folder, delete them.

Open the Sierra cataloging module

Click "Data Exchange" button in the cataloging module menu

Select "Output MARC records (out)" from pulldown menu

If there is a primo.out file in the list of files, delete it.

From the Windows Start menu, open the coreFTP program and connect to the NYARC server.

Open the "ongoing" folder in the NYARC server window (right side of the coreFTP screen), and make sure it does not contain any files. (It should contain two subfolders.) If it does contain any files, contact the person who regularly does the Sierra upload.

If the "ongoing" folder is empty, disconnect and close coreFTP

1. [Creating the review file in Sierra of all bibs to be exported to Primo]

Open the Sierra cataloging module

Click "Create Lists" button

Select "primo" (file 123, the last, biggest file in the list)

Click "search records"

Click "yes" on the warning that you are about to over-write the file

When Boolean search window appears, click "use existing search"

Select "primo" (last, biggest list), file 123

Click "use"

When query appears in Boolean Search window, click "search"

Wait until "primo" row, "status" column, says "complete"

(Compilation of review file takes approx. 5 min.)

2. [Converting Sierra review file to MARC output file]

Click "Data Exchange" button in the cataloging module menu

Select "Output MARC records (out)" from pulldown menu

Click "Create C" in toolbar

Type "primo" (without quotation marks) into text box (file extension .out appears to right of text box)

Select from pulldown menu: "Review"

Select from Review file pulldown: "primo" (last file on the list)

Click "start"

Wait for Output Messages window to show results summary

(Creation of "primo.out" file takes approx. 15 min.)

When results appear in "Output Messages" window, click "Close" button on toolbar

3. [Transferring primo.out file from Sierra server to local PC desktop, primoExtracts folder]

In the Data Exchange window, select "primo.out" file

Click "Put PC" button on toolbar

Browse to and open "primoExtracts" folder on desktop

Click "Save" in dialog box

(Transfer of primo.out file to PC takes approx. 60-75 min.)

4. [Splitting the primo.out folder into smaller .mrc files using the MarcEdit program]

Open the MarcEdit program

From the Tools menu, select MARCSplit

Click on the file icon to the right of the Source File box

Browse to and open the primoExtracts folder

Select "All Files" from the pulldown menu to the right of the File Name box

Select the "primo.out" file

Click "Open"

Click on the folder icon to the right of the Destination Folder box

Browse to and open the primoExtracts folder

Click "Ok"

Click "Process"

(If you have the Primo Extracts folder open on your screen during the this process, you will see the .mrc files appear as they are created.)

5. [Converting the .mrc files to .tar files with the 7-Zip program]

Click on the Windows Start menu (lower left of your screen) and search "cmd" without the quotation marks

Click on cmd when it appears in the results window under Programs

At the command prompt, type "cd" without quotation marks, then the space bar

Copy the filepath for your primoExtracts folder from the Windows Explorer address bar (for example: C:\Users\lpregill\Desktop\primoExtracts)

(Note that in some versions of Windows you have to click on the address bar to see and copy the full filepath.)

In the command line window, right-click and paste at the flashing cursor. (Keyboard shortcuts don't work with the command line.)

Press return

The prompt will now show your primoExtracts filepath

Copy the following line and paste it at the command prompt and press return. (Right-click, paste at the flashing cursor. Keyboard shortcuts don't work with the command line.)

for %X in (*.mrc) do "C:\Program Files\7-Zip\7z.exe" a "%X.tar" "%X"

(If you have the Primo Extracts folder open on your screen during this process, you will see .mrc.tar files appear as the .mrc files are converted by the 7-zip program.)

6. [Uploading the .tar files to the NYARC server using the coreFTP program]

Open the coreFTP program

Click "connect"

In the left pane, click the "date" column. If the files are in reverse chronological order, click "date again."

In the right pane, double-click the "ongoing" folder to open it.

Highlight all of the .mrc.tar files (i.e. highlight the first (msplit00000000.mrc.tar), and shift+click the last)

Click the "upload" icon in the left pane (the arrow icon to the right of the filepath window)

(If you keep the "ongoing" folder in the right pane open, you will see the .mrc.tar files as they are transferred to the NYARC server)

When the last of the .mrc.tar files appears in the "ongoing" folder, click the "disconnect" icon in the right pane and close the program.

To close the command prompt window if it is still open, type "exit" (without quotation marks) and press return

Checking Primo Back Office for Status of Primo Harvest

Primo Back Office should be checked the first workday after a Primo harvest occurs. Because this job is regularly scheduled for 1:59am on Saturday mornings, Back Office should usuallly be checked on Monday morning.

--Log in to Primo Back Office

--Select the menu Publishing > Pipe List

--The weekly upload is the second pipe: 01NYARC_III_DELETE_RELOAD

--Click on the "History" button for this pipe, and then on on the job report (in the "Name" column) with the date of the most recent Saturday.

--If the delete and reload was successful, the report will show the following in its first section:

--If there is an error message, a ticket will need to be opened on the Ex Libris Support site.

--N.B.: A backup harvest is scheduled to run on Monday mornings at 1:59am. If you log in to Back Office on any other day than a Monday, an error message will show on the "Pipes List" page for the most recent harvest (i.e. 01NYARC_III_DELETE_RELOAD). This is not a cause for concern, as it will refer to the backup harvest.

Primo Central Index

Administration Portal (login required)

To maintain resources go to My Client Applications > PRIMO > Edit client resource collections

The ExLibris Knowledge contains updated lists of content available in the PCI: View the PCI Content list