Prior to tailoring any reports, please note the following:
Do not amend any source code or parameter files shipped by Capita; make copies instead.
Do not keep local copies under /usr/opt/blcmp/talis as they will be lost when the next release of Altois installed.
This means that any changes to the shipped parameter file, including changes to a parameter (for example, pagelength) will demand a local version.
The best practice is to mimic the MIS directory structure below a directory of your choice. Local versions of MIS would have a natural home under users/report in a new directory called mis. Using this example, below /users/report/mis would be a directory called param and a further sub-directory for each script which requires local tailoring.
The following instructions describe how to set-up a local MIS area for a local format.pl for Overdue Letters (i.e. the script loa_odue_letter).
Log on as the user report.
Change directory:
cd /users/report
Create a directory called mis.
This is a once-only operation when first setting up your permanent local
MIS area:
mkdir mis
Change directory to /users/report/mis
cd mis
Create a directory called param.
This is a once-only operation the first time the local area is created.
mkdir param
In the directory /users/report/mis
create a directory for the script in question, for example:
mkdir loa_odue_letter
Change directory to /users/report/mis/param:
cd param
Copy the master parameter file to your local area.
For example:
cp $TALIS_HOME/mis/param/loa_odue_letter .
Note that the final full stop is part of the command. It stipulates
that the target files should be copied to the current directory with the
same names.
Change directory to the loa_odue_letter directory:
cd /users/report/mis/loa_odue_letter
Copy the source code files that require local
amendment. For example:
cp $TALIS_HOME/mis/loa_odue_letter/*.pl .
Amend the parameter file so that it picks up the
local version(s) of the source code. For example:
vi /users/report/mis/param/loa_odue_letter
In particular, set the new location of your local files. For example:
format = /users/report/mis/loa_odue_letter/format.pl
Repeat this for all files (i.e. preselect.pl, main.pl, retrieve.pl
and select.pl).
Set the environment variable $LOCAL_MIS_HOME to
point at the local area. For example:
LOCAL_MIS_HOME=/users/report/mis; export LOCAL_MIS_HOME
If this is a permanent area designated for local MIS then the above
two commands are best added to the .profiles
for the talis and report
users.
Amend your format.pl to cater for local requirements.
For example:
cd /users/report/mis/loa_odue_letter
vi format.pl
Before making any amendments it is important to consider how you will document and maintain your local versions. When Capita ships amended software for existing reports (for example fixes to known problems) any local amendments will, in most instances, have to be re-introduced to new copies of the shipped.pls.
The best method of documentation is to add lines of comments in the top of the file after the existing comments:
# Local changes are as follows:
--------------------------------------------------------------------------------
# Local changes are as follows:
#
# Amended
text in the footer and removed the fourth line of
# borrower's
address
# Pete
Smith 12/09/03
#
# Commented
out borrower's address and replaced with Dept.
# Jane
Smith 12/05/04
For changes to retrieve.pl (and similar files containing source code) you are advised to comment in the header as described and to comment in the body of the file too. For example:
# Get the borrower's department. Local
change added
10/10/03
# KDG.
($Department) = &sql($d,"
select DEPARTMENT_ID
from BORROWER
where BORROWER_ID = $borrowerID
");