Rapple "Scholarly Communications and the Sustainable Development Goals"
Bischof custom-circ-ov
1. Aleph Custom Services
for Circulation
Services for Patrons and Bills
ENUG 2011
10/28/2011
Steve Bischof Five Colleges Inc.
2. The Basics
• Exlibris provides a frame work to create
custom services
• Modify existing services
• Create new services
ENUG 2011
10/28/2011
Steve Bischof Five Colleges Inc.
3. 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%20S
upport%20by%20subject/Miscellaneous/How_to_make_custom-
services.ppt
ENUG 2011
10/28/2011
Steve Bischof Five Colleges Inc.
4. 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)
ENUG 2011
10/28/2011
Steve Bischof Five Colleges Inc.
5. 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)
ENUG 2011
10/28/2011
Steve Bischof Five Colleges Inc.
7. Output
• Two files– A list of Patron IDs and a
spreadsheet of Patrons selected ***
ENUG 2011
10/28/2011
Steve Bischof Five Colleges Inc.
8. 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)
ENUG 2011
10/28/2011
Steve Bischof Five Colleges Inc.
9. 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
ENUG 2011
10/28/2011
Steve Bischof Five Colleges Inc.
10. Global change!
ENUG 2011
10/28/2011
Steve Bischof Five Colleges Inc.
11. 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);
ENUG 2011
10/28/2011
Steve Bischof Five Colleges Inc.
12. 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
ENUG 2011
10/28/2011
Steve Bischof Five Colleges Inc.
13. 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
ENUG 2011
10/28/2011
Steve Bischof Five Colleges Inc.
15. 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
ENUG 2011
10/28/2011
Steve Bischof Five Colleges Inc.
16. 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'
ENUG 2011
10/28/2011
Steve Bischof Five Colleges Inc.
17. 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
ENUG 2011
10/28/2011
Steve Bischof Five Colleges Inc.
18. 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
ENUG 2011
10/28/2011
Steve Bischof Five Colleges Inc.