using non-Cobol programs

Slides:



Advertisements
Similar presentations
Programming MySQL, Perl COEN 351. Reading List Paul DuBois: MySQL and Perl for the Web, New Riders, 2002 Jacqueline D. Hamilton: CGI Programming 101,
Advertisements

NEVUG - August 2004 To Boldly Go: Using Perl and the Perl DBI as an Adjunct to MS Access for Custom Reports Maggie Rioux MBLWHOI Library Woods Hole, Mass.
CIS 240 Introduction to UNIX Instructor: Sue Sampson.
AN INTRODUCTION TO PL/SQL Mehdi Azarmi 1. Introduction PL/SQL is Oracle's procedural language extension to SQL, the non-procedural relational database.
CS34311 CS3431 – Database Systems I Project Overview Murali Mani.
7/2/2015Murali Mani -- CS5421 Database Management Systems DB Application Development Project Statement + Introduction to Oracle.
General Systems Information ALEPH v20.01 Library Staff Training © South Dakota Library Network, 2013 ©Ex Libris (USA), 2011 Modified for SDLN Version
Cataloging 12.3 to 14.2 Seminar. Cataloging 2 -New check routines -Cataloging authorizations -Other innovations -Fix and expand routines -Floating keyboard.
CS 6560 Operating System Design Lecture 3:Tour of GNU/Linux.
Writing C-shell scripts #!/bin/csh # Author: Ken Berman # Date: # Purpose: display command and parameters echo $0 echo $argv[*]
Writing macros and programs for Voyager cataloging Kathryn Lybarger ELUNA 2013 May 3, #ELUNA2013.
Shell Script Programming. 2 Using UNIX Shell Scripts Unlike high-level language programs, shell scripts do not have to be converted into machine language.
RMS Importer Status MACS Week March 2011 PP b-ABR_RMSImporterStatus Angela Brett RMS Importer Status 1.
1 System Administration Introduction to Scripting, Perl Session 3 – Sat 10 Nov 2007 References:  chapter 1, The Unix Programming Environment, Kernighan.
Copyright © 2010 Certification Partners, LLC -- All Rights Reserved Perl Specialist.
6/1/20161 Acquisitions Automation: Import without data going bump in the night.
Copyright © 2003 ProsoftTraining. All rights reserved. Perl Fundamentals.
Chapter Six Introduction to Shell Script Programming.
INSERT BOOK COVER 1Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Getting Started with VBA for Microsoft Office 2010 by.
How to publish to PRIMO with a URL to the ADAM digital object Yoel Kortick.
Loading Bibliographic Records Online and in Batch Pat Riva Romance Languages Cataloguer/ Bibliographic Database Specialist McGill University
V. 21. new fix_doc_notes fix routine (downgraded to version 20 RC 3513) Yoel Kortick Aleph Support Manager.
How to Open a New Language in Web OPAC for Testing Web Screens Presenter: Yoel Kortick.
V. 21. Automatic LKR field creation from item. Rep_ver and Yoel Kortick Aleph Support Manager.
V.16 Upgrade Express Serials Doron Greenshpan. v.16 Serials 2 Session Agenda Serials workflow demo Publication Schedule goes Prediction modes New and.
Perl Ed Finegan. Overview of Pearl Perl is a high-level programming language written by Larry Wall. It derives from the C programming language and to.
 Prepared by: Eng. Maryam Adel Abdel-Hady
Performing ISO ILL borrowing and lending requests on the same server Yoel Kortick 2008.
© 2015 Ex Libris | Confidential & Proprietary Yoel Kortick Senior Librarian Cataloging introductory flow.
Yoel Kortick Circulation Request Refusal Version 21 rep_ver #
Setting up and using Acquisitions-related indexes and logical bases. Version 18 and up Yoel Kortick.
Aleph Publishing services with a special focus on PRIMO-FULL and PRIMO-AVAIL version 18 Presenter: Yoel Kortick.
Validation Check Version 21 rep_ver # Yoel Kortick.
Dept. of Information Systems St. Francis Xavier University
Update Item Records (manage-63)
Ori Miller, Aleph Support Manager
New service, p-ret-adm-03 (Advanced General Retrieval Form) Version 21 rep_ver # Yoel Kortick Alma Global Support Manager
Understanding Indexes: Headings
Log for Patron Record Changes
How to print barcodes in batch mode via item-03
Presenter: Yoel Kortick
C-Shell with Functions
How to make a bibliographic base of records with attached ADAM digital objects Yoel Kortick October, 2007.
How to “expand” holding library fields to bibliographic record
Version 20 Feature Developments
How to add a fix procedure for copy cataloging from a Z39.50 base
PERL.
How to make job list activate an Aleph service twice a month or once a month Yoel Kortick.
Digital Assets Module Services adam-01 and adam-02 versions 17 and up
System Administration Management
The Z00T “View record history” (rep_ver version 20) EPUG-UKI Conference 2010 British Library, Nov. 1-2 Yoel Kortick.
Aleph Restful APIs Yoel Kortick January 2010.
Publishing Course Readings to PRIMO Version 20
Building bases according to sub library
Yoel Kortick Aleph Support Manager
Addition of new filters to cash-06
Interoperability Between Aleph and Primo: Aleph Restful APIs
Metadata Editor Introduction
The Linux Operating System
How to Add Pinyin Text to a Record with CJK Version 18 RC 1807 Version 19 RC 409 Yoel Kortick.
beas script Basic knowledge for consultants Ana Bracho
Cataloging introductory flow
Upload and Download files via GUI
Presenter: Yoel Kortick
Presenter: Yoel Kortick
Perl Modules.
Perl Database – Just Enough
Introduction to NetDB2 IST210.
Cataloging 14.2 Seminar.
New “replace string” parameter for fix_doc_do_file_08
Presentation transcript:

using non-Cobol programs Expand routines using non-Cobol programs Version 21 rep_ver #017641 IGeLU A21.0.10.4 Ori Miller, Aleph Support Manager

Agenda Introduction Example Example with SQL Unlike our competitors, we did not release a new revolutionized system every few years but rather took the evolutionary approach

Introduction Purpose of Enhancement In tab_expand and tab_fix we have a variety of programs to modify our records. fix_doc_do_file_08 is very flexible, but not everything can be done with it. Into tab_fix we can define a program that the library programers can write, in any language. Now it is also possible to do it in tab_expand Unlike our competitors, we did not release a new revolutionized system every few years but rather took the evolutionary approach

Introduction Here is the formal description of the development: Expand mechanism allows adding bibliographic information to a record in certain places in the system. This development enhance expand mechanism to allow using external program not supplied by ALEPH (as exists in fix_doc mechanism). Unlike our competitors, we did not release a new revolutionized system every few years but rather took the evolutionary approach

Agenda Introduction Example Example with SQL Unlike our competitors, we did not release a new revolutionized system every few years but rather took the evolutionary approach

Configuration Add a line such as the following to tab_expand : ! ! COL 1. 10; ALPHA_NUM, UPPER; -; ! Expand Menu; ! COL 2. 30; ALPHA_NUM, LOWER; _; ! Expand procedure; ! COL 3. 100; ALPHA_NUM; ; ! Program arguments; ! 1 2 3 !!!!!!!!!!-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!> TEST external_prog.pl Unlike our competitors, we did not release a new revolutionized system every few years but rather took the evolutionary approach

The program Create the file $aleph_exe/external_prog.pl (this example is in the perl programming language) Pay attention to the path to perl and run: chmod a+x $aleph_exe/external_prog.pl #!/exlibris/aleph/a21_1/product/bin/perl use strict; use warnings; while (<>) { # read lines from BIB record, one by one my $in = $_ ; if ($in =~ /^245/) { # for field 245 $in =~ s/\$\$a/\$\$p/; # change $$a to $$p } print "$in"; # the output of the program is the modified record Unlike our competitors, we did not release a new revolutionized system every few years but rather took the evolutionary approach

Example If the program is not in $aleph_exe, or if we forgot to “chmod” it, we will get the following error: Error: function TEST missing program <external_prog.pl > It is always a good idea to test it with util-f-4/doc_expand The $$a in 245 is now displayed as $$p enter file name (or q to exit) doc_expand Enter expand_menu [No Expand]: TEST ENTER DOC NUMBER : 1234 Reading doc : 000001234 Load: /tmp/utf_files/exlibris/aleph/a21_1/usm01/tab/tab_expand FMT L SE ... 24500 L $$pHistory and theory. Unlike our competitors, we did not release a new revolutionized system every few years but rather took the evolutionary approach

UNIX script Similar example, this time with a UNIX script: tab_expand: TEST external_prog.csh Create: $aleph_exe/external_prog.csh Run: chmod a+x $aleph_exe/external_prog.csh #!/bin/csh set skip_first_line = "$<" while (1) set in = "$<" if ("$in" == "") exit set field = `echo "$in" | cut -c1-3` if ($field == "245") then echo "$in" | sed 's/a/p/' > /tmp/field.$$ set in = "`cat /tmp/field.$$`" endif echo "$in" end Unlike our competitors, we did not release a new revolutionized system every few years but rather took the evolutionary approach

Agenda Introduction Example Example with SQL Unlike our competitors, we did not release a new revolutionized system every few years but rather took the evolutionary approach

SQL from within the expand program #!/exlibris/aleph/a21_1/product/bin/perl use strict; use warnings; use DBI; # Change according to: echo $ORACLE_HOME $ENV{'ORACLE_HOME'} = '/exlibris/app/oracle/product/11r2'; # Change according to: echo $aleph_db my $Database = 'il-aleph20.aleph21'; # Change to Oracle user needed: my $orauser = 'usm01'; my $orapass = 'usm01'; my $dsn = "DBI:Oracle:$Database"; my $dbh = DBI->connect($dsn, $orauser, $orapass); my $doc_num = "000000000"; my @lines; while (<>) { # read lines from BIB record, one by one my $in = $_ ; if ($in =~/^USM01(.*)/) { $doc_num = $1; } else { push @lines,$in; } #print "DEBUG: THE DOC NUMBER: $doc_num\n"; my $sql = "select count(*) COUNT from z13 where Z13_AUTHOR=" . "(select Z13_AUTHOR from z13 where Z13_REC_KEY=$doc_num)"; #print "DEBUG: THE SQL: $sql\n"; my $sth = $dbh->prepare($sql); $sth->execute; my $sql_output = 'NA'; while( my $ref = $sth->fetchrow_hashref() ) { $sql_output = $ref->{'COUNT'}; #print "DEBUG: THE sql_output:$sql_output\n"; $dbh->disconnect; foreach my $in (@lines) { if ($in =~ /^100/) { # add a sub-field $$0 for field 100 $in =~s/$/\$\$0number of other records with this author:$sql_output/; print "$in"; # the output of the program is the modified record Perl program which includes an SQL. It finds other books (in Z13) which have the same author as the book we are viewing. Unlike our competitors, we did not release a new revolutionized system every few years but rather took the evolutionary approach

Ori.Miller@exlibrisgroup.com