Showing posts with label ILS. Show all posts
Showing posts with label ILS. Show all posts

Thursday, September 11, 2025

Troubleshooting Edifact Import Files on SirsiDynix Horizon ILS

Some libraries use edifact files for automating purchasing from different vendors.  In this case acquisition librarian uses an FTP client to download and load the edifact file into the ILS.  Errors can easily happen where you can then no longer access the invoice from the vendor and a new edifact file must be issued and imported into horizon.

What is an Edifact File?

The UN/EDIFACT Syntax Rules were approved as the ISO standard ISO 9735 by the International Standardization Organization.


The EDIFACT standard provides:

  • a set of syntax rules to structure data

  • an interactive exchange protocol (I-EDI)

  • standard messages which allow multi-country and multi-industry exchange


Read more about it here

Edifact File Sample

UNA:+.? '

UNB+UNOC:3+###:###+####:###+250903:1557+B000025704'

UNH+B000025707+INVOIC:D:###:UN:EAN008'

Header

BGM+380+#####+43'

DTM+137:20250903:102'

NAD+BY+####::###'

NAD+SU+#####::###'

NAD+SU+++Name.+Address .+City+Province+PostalCode+Country'

CUX+2:CAD:4'

Vendor Info

LIN+000001'

IMD+L+050+:::Library MARC - CUSTOM'

ALC+C++++ABK::28'

QTY+$$$$'

MOA+####'

RTE+Quantity:1.07'

RFF+LI:'

PO/Item Info

UNS+S'

CNT+2:8'

MOA+####'

TAX+7+GST'

MOA+#####'


Summary

UNT+69+B000025707'

UNZ+1+B000025704'

Footer


The UNB number the B number MUST match the B number in UNZ, also the UNH B number MUST match the UNZ B number.  These are unique identifiers for the invoice generated by the vendor.  If there is an issue with the import of an invoice such as cancelled items on the PO, or any other error you will need to get a new Edifact file from the vendor.


How to check the error on edifact files in Horizon


To check for errors on edifact imports (uploads) you need to view them in table Editor



Double click table editor to open up the search and type in edifact



Then select double click on “edifact exceptions” and scroll to the bottom for the most recent errors.  You will want to look for the errors highlighted in Green, not errors stating the edifact file has already been uploaded.





If you try import a file and it fails do the following:


  1. Ask the vendor for a new Edifact File with new header numbers.  (Once you try import it once it can not be imported again with the same header numbers)

  2. Check the PO in horizon, verify everything is ok and there is nothing cancelled, etc.

  3. Check for error codes in table editor using the edifact exceptions view

  4. Either fix the PO or remove the troublesome line in the edifact file using Notepad.

  5. Once the PO or the edifact file is fixed, reimport (upload) the file into horizon.


Additional Error info:


If you get an error like Process Invoice Error PO/Line, means there is a mismatch with the PO and the invoice, and the PO in Horizon needs to be fixed or an item in the edifact file needs to be removed shown in the example in orange.  Verify the PO in horizon before trying to re-import the edifact file in Horizon.   The PO either needs to be corrected or remove anything that is not in the PO in the edifact file.


Unfortunately you have to go back to the vendor and ask for a new edifact file because there was an error on import and a new header needs to be generated so the Unique identifier matches what the vendor gives for the import and once a file has been imported it can not be easily deleted in Horizon.


Monday, October 25, 2021

PC Reliance receipt printing issue on Windows 10

 

PC Reliance is a piece of software produced by SirsiDynix and is used for off-line circulation when performing an ILS upgrade or if the ILS is going to be down for a prolonged period of time.  Horizon based libraries have been using this for at least 10 years and the last update for the software was in October 2008.  Under Windows 7, it did not require any changing of the driver default settings.  However if you are running Windows 10 you will have to reconfigure the driver software in this case an Epson TM-T88V.

Going with the default install setting on the Epson TM-T88V, the receipt printer works fine for all applications.  Vend, Horizon ILS Client, notepad, etc.  as shown below.


When you open PC Reliance you don't have many options to configure below is a look at the GUI; and a item put in for checkout so we can do a test print.


However when you try and use PC Reliance you get this when you print the reciept.


The fix is to change the setting on your receipt printer.  Go to your printer right click and select printer properties

Then select Preferences.


Then Select Advanced


By Default, the settings are as follows



You need to change them to the following:

TrueType Font: Substitute with Device Font (Not required to change)

Print Optimizations: Disable


Once that is saved and enabled, your receipt will now print properly.





Monday, September 27, 2021

"LbShrMem.FindName: invalid 'shared memory' pointer" Error when Launching Reports in Horizon on Windows 10

There is a bug in the ILS system for Horizon by SirsiDynix where for what ever reason, reports are not accessible and you get the following errors.





You will need a SirsiDynix account to view the KB https://support.sirsidynix.com/kb/164380 but essentially when you go to run reports the ILS system errors out with a LBShrMem pointer error. In the past, by that I mean going back to Windows Vista putting in a global system variable for the ILS application resolves the error.

Variable name: HzShrMemBase
Variable value: 1912602624

However under windows 10 this prevents access to the ILS application but adding and removing the variable fixes it as does running the app in legacy mode for Windows XP SP2 but this is temporary. After a reboot the issue remains persistent. Doing file system scans (SFC) and check disk also occasionally resolves the issue, but the issue remains persistent and comes back after a couple shutdown and restarts.

After doing some intense investigation into this matter it appears to be related to security and application permissions.  Unfortunately thus far the only resolution I could find had to do with running the ILS application as an administrator and for staff convivence disabling UAC.

Step 1.  - Make the user using the application a local admin as shown below.

Make use a local admin



Step 2. - Set the app to run as administrator



Step 3. - Change UAC (Reason for this is to prevent the popup prompt)



After running the ILS application like this for 3 weeks I am confident that the issue has been mitigated.  Do I recommend running an application like this?  No.  However it was consuming IT resources having to go back and disk scanning, adding/removing system variables to get the report to run.  There is extra security precautions put on to the system for monitoring and firewall blocking.  For now that is all that can be done until an application update.

Wednesday, August 25, 2021

SQL for recovering a pull list on Horizon ILS

The Horizon ILS has a list of holds where the report is run but if the list is not kept it is lost and you have to run a sql script to recover the list.  You will require sql studio, and a login to the database.  Once logged in.

Select your ILS DATABASE using SQL Studio or change "$ILSDatabase" in the script below to be the name of your ILS Database and it will automatically select the database for you.


        

 USE [$ILSDATABASE]

 GO

update request set fill_date = NULL, fill_location = NULL,
fill_item# = NULL where
fill_date = datediff(dd,'01 jan 1970',getdate())

and fill_location = '$location' and request_status = 0

 

Below is a sample of what the script looks like in SQL Studio.


In the script change $location with your location code that is setup in Horizon to recover the branch pull list.



Wednesday, January 06, 2021

iTiva import error from Horizon ILS generated notices file

illion i-tiva automated phone software is pretty good but it is quirky.  After disabling the Phone Holds in the iTiva software we started getting import errors; but it wasn't a consistent failure.  As shown in the activity log shown below there was a successful import then 2 failures.


After further investigation by looking at the past notices located in the i-Tiva archive folder, I determined that i-Tiva requires a 1:1 mapping for the notices export from the ILS (in this case Horizon) to the notice.csv file.  When is imported into itivia.   With the covid-19 shutdown it was decided that we would disable the software from making calls when holds were available.  This was not disabled in the ILS and was being included in the generated notices.csv file. With the holds block "$HOLDSBLOCK" being included in the file, the import fails.


"V","","$HOLDSBLOCK","$HOLDSBLOCK","2222200*******","","Frist Name","Last Name","780-***-****","","**","Library Location","3222200*****","13/1/2021","Book Title.","*****-******"

After testing if the the file only had the block "$OVERDUEBLOCK" the import was successful.

"V","","$OVERDUEBLOCK","$NOTICEBLOCK1","2222200*******","","First Name","Last Name","780-***-****","","**","Library Location","3222200*******","19/12/2020","Book Title /","*****-*****"

To fix the export you have to make an edit in the Horizon Table Editor on the Telephone Messaging Control Block.


To apply the fix disable the For: hold notice.  It should appear unchecked as shown below.  That will fix your issue.



A special thanks to Mary Schmidt at SirsiDynix who worked with me as we determined the cause of the issue.

Tuesday, December 03, 2019

Installing Apache Tomcat for use with Bibliocommons

How to setup Apache Tomcat for use with Bibliocommons.

I will be pulling form a number of resources if you want to see the referenced Bibliocommons document to can click here.  

However you will in a login to view the document.  We will need a few items before we start.  The apache-tomcat server provided by bibliocommons which is located as an attachment to the end of their documentation https://partnerportal.bibliocommons.com/hc/en-us/articles/202340244-Installing-Tomcat-UNIX-Systems- .

We are going to use Microsoft Hyper-V for running this server.  So before we begin, you will want to open 3 types of ports and restrict them to come from the Bibliocommons IP range.  So for the purposes of this documentation we are going to say 53093, 53094, 53097 

Setup and install your Linux server on Hyper-V.  I am using Ubuntu 18.0.4 LTS.  For the purpose of this documentation, we are making the VM dual processor with all Integration services enabled, we have changed our secure boot to be a Microsoft UEFI Certificate Authority, TPM enabled and processor compatibility is checked.  We will also be using a static IP for this install.
Create Virtual Machine



Specify Gen2

Assign Memory

Configure the network


VHDX Summary


Select a boot media

Finish the creation


Connect


Select your language

Install Ubuntu

Specifiy Networking

Edit IP

Add your manual IP
For the purposes of this documentation, the IP address doesn't really matter but it will need internet access to get updates and add the ZIP and Java Package.

Use the entire disk, (use LVM if you want)

Select the disk
  
Create your server name and credentials


add powershell

I prefer the latest stable version

Install

Reboot

There are a few additional items you will want to install for your linux server.  In addition to powershell I installed UNZIP, and Java 8 default repository and from Oracle.  After installing your linux server download and install the Bibliocommons Tomcat installer.  I downloaded it to my Desktop and SCP it to my linux system.  To get the Oracle versions of Java you will need an oracle account. https://www.oracle.com/ca-en/java/


I SCP the files for Java and the Tomcat server from my workstation to the server
Install open JDK first then extract the Oracle Java to the same jdk directory.
sudo apt install default-jdk
 


Install Open JDK

Extract the Oracle JDK to the Open JDK Directory
sudo tar xvzf jdk -8u221-linux-x64.tar.gz -C /usr/lib/jvm
Multiple Java's in the JVM Directory
Once extracted set the Default JVM


export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_221

export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_221, we can verify the java variable by typing echo $JAVA_HOME



When we see that our JDK Path is /usr/lib/jvm/jdk $Version (in this case 1.8.0221) we are good to go ahead and set our JAVA_HOME Variable

update-alternatives --config java
/etc/environment
Add the path JAVA_HOME=/usr/lib/jvm/jdk1.8.0_221"





Install Bibliocommons Tomcat
Make a directory in /opt called BiblioCommons
Sudo mkdir /opt/BiblioCommons/
Extract the files in the Java8 folder tar xvf apache-tomcat-7.0.82-bibliocommons.tar
You should now see a folder called apache-tomcat-7.0.82-bibliocommons.tar
Move that folder to /opt/BiblioCommons/


Securing Tomcat

First, create a new tomcat group:
sudo groupadd tomcat

Next, create a new tomcat user. We'll make this user a member of the tomcat group, with a home directory of /opt/tomcat (where we will install Tomcat), and with a shell of /bin/false (so nobody can log into the account):

sudo useradd -s /bin/false -g tomcat -d /opt/tomcat tomcat

Add out user to the tomcat group

Sudo usermod -a -G tomcat administrator

Give tomcat ownership of BiblioCommons

sudo chown -R tomcat:tomcat /opt/BiblioCommons

the user owning the folder bibliocommons will be tomcat.

Then you can execute

sudo chmod u+w bibliocommons folder to add the write permission to the username for the user you want (such as administrator).

But if you want to add this user to the group associated with "bibliocommons", you can run

sudo usermod -a -G tomcat administrator

and then execute sudo chmod g+w bibliocommons

to add the write permission to the group.

Change the permissions so owner and the group have rwx permissions

Sudo chmod -R 775 <$Bibliocommons directory> (owner is the user tomcat but the administrator account needs x permissions as well that is why group is 7)

Now that our tomcat user is set up and any users we created to manage the tomcat service have proper permissions, let's download and install Tomcat.


Now setup Tomcat

The default ports Tomcat uses are 9003, 9004 and 9007. If you know the default ports are already in use by other programs on your system and need to change them to ones that are not, open the following file with a text editor to find and replace the default ports: /conf/server.xml. 


Note that you must pick a distinct port for each of the port options and let your BiblioCommons Project Manager know of any change in the SSH Connector Port which is 9007 by default.

Please note, while the BiblioCommons Tomcat installer opens port 9007 labelled as the "SSH Connector Port", its actually the HTTPS port our application servers use to communicate with your on premises Tomcat instance. The labeling of that port is incorrect.


Open the following file with a text editor: /bin/setenv.sh. Inside the file, uncomment the appropriate line for CATALINA_OPTS by following the instructions within based on the amount of population served. Also, update to be the absolute path the the JDK installed as described in the Software Requirements section of Allocating a Server in Your Network, such as /opt/Java/jdk1.7.0_55.

If you have not already done so, create a directory called BiblioCommons on your system and then create another one called Connector_Support inside it. For example, create the directories for the path /opt/BiblioCommons/Connector_Support. Please make sure the user who starts Tomcat has read, write and execute permissions for these directories.
Sudo chmod +rwx “Directory”

Open the following file with a text editor: /lib/connector.properties. Inside the file, update so that config.path is equal to the path to the Connector_Support directory you have created.

Finally, start Tomcat by running /bin/startup.sh and verify there is no error.

Verifying the Tomcat Installation


Verify the Tomcat installation by accessing https://localhost:9007 or https://localhost: with a tool such as cURL or Wget. It should show one of the following messages depending on which tool is used. Please do not be alarmed at the bad certificate error, the mere presence of the following messages is an indicator that Tomcat is running.


With Wget, you should see the following:

$ wget https://localhost:9007
--2014-04-17 16:58:31-- https://localhost:9007/
Resolving localhost (localhost)... 127.0.0.1, ::1
Connecting to localhost (localhost)|127.0.0.1|:9007... connected.
GnuTLS: A TLS fatal alert has been received.
GnuTLS: received alert [42]: Certificate is bad
Unable to establish SSL connection.
With cURL, you should see the following:
$ curl https://localhost:9007
curl: (60) SSL certificate problem: self signed certificate
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a"bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.

Please let your BiblioCommons Project Manager know if these messages do not appear.

If you want to verify tomcat is running you can edit the server.xml file and un comment out


Once that is done, stop and restart the tomcat server. This will allow you to verify that tomcat is working



Creating Tomcat Startup Scripts


Once you have installed Tomcat successfully, you will need to set up Tomcat to start automatically on server startup. This is critical to ensuring service recovery in the event of server issues or regular server maintenance.

The process for setting up Tomcat to start automatically varies by operating system and distribution. Some common distribution instructions are outlined in the article below. Please consult the documentation for your OS for exact steps for your case. In this case we are using Ubuntu Server 1804LTS so we going to call this bibcat.sh and place it in the /etc/init.d folder

The Bash Startup Script

The following is a startup script that can be used on Linux based systems:
#! /bin/sh

# set this to wherever the Tomcat binaries/configuration exist
TOMCAT=

case "$1" in
  start)
    ${TOMCAT}/bin/startup.sh
    ;;
  stop)
    ${TOMCAT}/bin/shutdown.sh
    ;;
  *)
    echo "Usage: /etc/init.d/tomcat-bibliocommons {start|stop}"
    exit 1
    ;;
esac
exit 0

Ensure to chmod the script so that the root user can execute it (most likely 755). You can test the script directly by running it with the start and stop parameters (as sudo).

Steps to create a permanent Bash alias:

  1. Edit ~/.bash_aliases or ~/.bashrc file using: vi ~/.bash_aliases 
  2. Append your bash alias For example append: alias update='sudo yum update' 
  3. Save and close the file. 
  4. Activate alias by typing: source ~/.bash_aliases 
Please note that ~/.bash_aliases file only works if the following line presents in the ~/.bashrc file:

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi


Are above lines are missing in your ~/.bashrc file? Just append at the end of the ~/.bashrc, using a text editor such as vi/vim or joe.
vi ~./bash_aliases

Alias bibcat=’/etc/init.d/bibcat.sh’ (this is the path to your script)

Source ~./bash_aliases

to activate the aliases




You can now start and stop the tomcat service using bibcat stop or bibcat start

Startup script

Type the command crontab -e
Then add the line below
@reboot /etc/init.d/bibcat.sh start
Save the file and exit
Then add the rules to your firewall to allow bibliocommons to access the server.

Setup your timezone

Be sure to make sure your timezone is setup correctly, if you don’t it will interfere with your bibliocommons records sync.  Since we have no GUI we need to change the files in the terminal.

Sudo vi /etc/timezone -> change it to US/Mountain
Sudo cp /usr/share/zoneinfo/America/Edmonton /etc/localtime

To verify type date in command prompt



Reference:


Install Java on Linux
https://linuxize.com/post/install-java-on-ubuntu-18-04/
https://docs.oracle.com/cd/E19182-01/821-0917/inst_set_jdk_korn_bash_t/index.html
https://thishosting.rocks/install-java-ubuntu/
Install Tomcat
https://partnerportal.bibliocommons.com/hc/en-us/articles/202340244-Installing-Tomcat-UNIX-Systems-
https://www.vultr.com/docs/how-to-manually-install-java-8-on-ubuntu-16-04



Ubuntu Software Firewall
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-18-04


Path Alias for starting and stopping the service

Removing Show Recent History and Recently Open Documents from Windows Explorer

How to remove the Recent History and Recently Open Documents from Windows Explorer Using the Registry Editor Press the Windows Key + R, type...