19
Aleph Custom Services for Circulation Services for Patrons and Bills ENUG 2011 Steve Bischof Five Colleges Inc. 10/28/2011

Bischof custom-circ-ov

  • Upload
    enug

  • View
    574

  • Download
    1

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Bischof custom-circ-ov

Aleph Custom Services for Circulation

Services for Patrons and Bills

ENUG 2011 Steve Bischof Five Colleges Inc.

10/28/2011

Page 2: Bischof custom-circ-ov

The Basics

• Exlibris provides a frame work to create custom services

• Modify existing services

• Create new services

10/28/2011 ENUG 2011

Steve Bischof Five Colleges Inc.

Page 3: Bischof custom-circ-ov

A how-to primer

• A great presentation on custom services with simple examples on Support Web

• How to make custom services by Yoel Kortick

• http://www.customercenter.exlibrisgroup.com/DocumentationCenter/Ex

%20Libris%20Documentation/Aleph/Support/How%20To%20from%20Support%20by%20subject/Miscellaneous/How_to_make_custom-services.ppt

10/28/2011 ENUG 2011

Steve Bischof Five Colleges Inc.

Page 4: Bischof custom-circ-ov

Straight from Yoel

• Custom programs for custom services must be placed in the $aleph_proc directory (alias ap).

• Typically the service file name in $aleph_proc will be called p_custom_nn (such as p_custom_01), It may however be called anything you want, such as p_custom_jimmy_01

• The screens for custom services must be placed in $aleph_root/pc_b_eng (or $alephe_root/pc_b_eng depending on setup)

10/28/2011

ENUG 2011 Steve Bischof Five Colleges Inc.

Page 5: Bischof custom-circ-ov

Service #1:Patron Editing

• Select a group of Patron (i.e ret_01)

• Be able to view those patron records

• Edit patron via a global change (i.e. manage-21)

10/28/2011 ENUG 2011

Steve Bischof Five Colleges Inc.

Page 6: Bischof custom-circ-ov

Retrieve Patron Records

10/28/2011 ENUG 2011

Steve Bischof Five Colleges Inc.

Page 7: Bischof custom-circ-ov

Output

• Two files– A list of Patron IDs and a spreadsheet of Patrons selected ***

10/28/2011 ENUG 2011

Steve Bischof Five Colleges Inc.

Page 8: Bischof custom-circ-ov

Sql Select select * from FCL00.Z303, $p_active_library.Z305

where

CONCAT(Z303_REC_KEY,'$p_active_library')=Z305_REC_KEY

andZ305_EXPIRY_DATE between '$p6' and '$p7'

andZ305_BOR_STATUS like '$p4%'

andZ303_HOME_LIBRARY like '$p3%'

andZ303_REC_KEY between '$p8' and '$p9'

$cp5;

***(SET MARKUP HTML ON)

10/28/2011 ENUG 2011

Steve Bischof Five Colleges Inc.

Page 9: Bischof custom-circ-ov

Adding conditionals

if ($p8 == "") then

set p8="0%“

ndif

if ($p9 == "") then

set p9="z%“

endif

if ("$p5" != "") then

set cp5="and Z303_PROFILE_ID like '""$p4""'“

else

set cp5="“

endif 10/28/2011

ENUG 2011 Steve Bischof Five Colleges Inc.

Page 10: Bischof custom-circ-ov

Global change!

10/28/2011 ENUG 2011

Steve Bischof Five Colleges Inc.

Page 11: Bischof custom-circ-ov

Create Temp Table & Update

cp $data_print/$p1 /exlibris/aleph/u20_1/fcl00/scratch/z305tempload.dat

sqlldr userid=$ALEPH_ADMIN control=$aleph_proc/z305temp.ctl log=$data_print/$p1.oracload.log

______________________________________________

update FCL00.Z303

set Z303_UPDATE_DATE=$udate$uc3$uc4$uc5$uc6

where Z303_REC_KEY IN

(select SBZ305_REC_KEY from FCL00.SBTEMP_Z305ID);

10/28/2011 ENUG 2011

Steve Bischof Five Colleges Inc.

Page 12: Bischof custom-circ-ov

Conditionals to Update

if ($p3 != "") then set uc3=", Z303_HOME_LIBRARY='"$p3"'“

else set uc3="“

endif

if ("$p4" != "") then set uc4=", Z303_PROFILE_ID='""$p4""'“

else set uc4="“

endif

if ($p5 != "") then set uc5=", Z303_TITLE_REQ_LIMIT="$p5

else set uc5="“

endif

if ("$p6" != "") then set uc6=", Z303_FIELD_2='""$p6""'“

else set uc6="“

endif

10/28/2011 ENUG 2011

Steve Bischof Five Colleges Inc.

Page 13: Bischof custom-circ-ov

Service #2 Cash-05 plus

• Currently Cash-05 only allows the ability to select by Sublibrary and date range

• Modify Cash-05 to include selection by Transaction Type and Patron Status

• Instead of writing a service from scratch, just replace the transaction selection process

10/28/2011 ENUG 2011

Steve Bischof Five Colleges Inc.

Page 14: Bischof custom-circ-ov

10/28/2011 ENUG 2011

Steve Bischof Five Colleges Inc.

Page 15: Bischof custom-circ-ov

Deconstruct the Service

cobrun b_cash_05_a

$aleph_sort -o ${dd_TP1}_sorted ${dd_TP1} mv ${dd_TP1}_sorted ${dd_TP1}

cobrun b_cash_05_b

cobrun b_cash_05_c

10/28/2011 ENUG 2011

Steve Bischof Five Colleges Inc.

Page 16: Bischof custom-circ-ov

Replace b_cash_05_a

select concat(substr(Z31_REC_KEY,1,12),' '), Z31_REC_KEY

from $p_active_library.Z31, FCL00.Z303

where Z31_DATE_X between '$p2' and '$p3'

and substr(Z31_REC_KEY,1,12)=Z303_REC_KEY

and $q6 $q9 $q8

Z31_STATUS like 'O'

10/28/2011 ENUG 2011

Steve Bischof Five Colleges Inc.

Page 17: Bischof custom-circ-ov

Conditionals to Query

if ("$sp6" != "") then set q6="Z31_SUB_LIBRARY in ('""$sp6""') and “

else set q6="“

endif

if ("$sp9" != "") then set q9="Z31_TYPE IN ('""$sp9""') and “

else set q9="“

endif

if ("$sp8" != "") then set q8="((concat(Z303_REC_KEY, '"$p_active_library"')

IN ( select Z305_REC_KEY from "$p_active_library".Z305

where Z305_BOR_STATUS IN ("$sp8"))) or (concat(Z303_REC_KEY, 'ALEPH') IN ( select Z305_REC_KEY from FCL00.Z305 where Z305_BOR_STATUS IN ("$sp8") and Z305_REC_KEY NOT LIKE '"$libname"%'))) and “

else set q8="“

endif

10/28/2011 ENUG 2011

Steve Bischof Five Colleges Inc.

Page 18: Bischof custom-circ-ov

Runs the same as Cash-05

• Just part a, selected the records to report is using the custom service.

• Part b & c of cash-05 still using the unmodified Cobol scripts

10/28/2011 ENUG 2011

Steve Bischof Five Colleges Inc.

Page 19: Bischof custom-circ-ov

Questions

Contact Information:

Steve Bischof

ILS coordinator, Five Colleges Inc.

Amherst, MA

[email protected]

10/28/2011

ENUG 2011 Steve Bischof Five Colleges Inc.