Question John Hotalen · Sep 22, 2025

Hello to all my fellow Cache Developers/Experts out there :)

The purpose of this post is to get input/feedback regarding an issue we are having with our Cache LIS web-based application not being able to remove locks that were taken under a separate process.

Here is the background of how the LIS does the locking and details about the issue:

-> our LIS web-based application sets records into a queue for doing locks and unlocks (the LIS runs under one process - guessing its the CSP server processes that process the broweser-to-backend requests) NOTE:  Our LIS is a web application, so in order for

4
0 99
Question John Hotalen · Jul 25, 2025

Hello to all the Cache Experts out there and Happy Friday!

The company I work for uses Cache 2017.1.3 and we have been seeing intermittent errors in the Cache Error Trap when an SQL query runs.   The error message looks like the error is occurring within the cached query routine that Cache auto-generates.  Unfortunately, when I pulled up the routine in the SMP System Explorer, I only found an obj version, so was unable to look at any code.

Here is the error:    Note:  the .cls375 part will be different based on the different SQL queries that run, since that part of the cached query routine name

3
0 86
Question John Hotalen · Feb 27, 2025

Dear Fellow Cache Gurus:   I would like to know if there is either any built-in Cache Date/Time function or an easy way to include a timezone abbreviation such as EST, PST, MST, etc... within the Cache Date/Time formats.

I read through the Cache Documentation but could not find anything to achieve this.

So if I do the following command:   $ZDateTime($H,1,4,,,4,,,,,"InvalidDate"), then I get an output like this:   02/27/2025 11:10AM

But I am looking for the output to be formatted like this:    02/27/2025 11:10AM EST

Any feedback, suggestions, etc....

0
0 92
Question John Hotalen · Sep 17, 2024

Hello to my fellow Cache Gurus:

I ran into two issues with Cache to XML Export and Cache to JSON Export in regard to array sequences.   So before I waste time opening a WRC ticket, I figured I would poll the Development Community, since there is always so much wonderful feedback and suggestions via this Developer Community!   So much thanks in advance for everyone's input!   Go Team!

I have multiple classes that extend from %RegisteredObject and %XML.Adaptor.

6
0 309
Question John Hotalen · Jan 23, 2024

Dear Fellow Cache Developers and Cache Experts,

The company I work for has a Cache Web Application that is built on the Cache ZEN framework.  The application has run very well for almost 2 decades across many versions of MS Internet Explorer ranging from IE5 all the way through IE11.   

However, when Microsoft finally phased out support for IE11, our company was forced to upgrade to MS Edge.

0
0 173
Question John Hotalen · Jun 7, 2019

Hello Cache Developers!  The purpose for this post is to outline a coding challenge that I have encountered when trying to use shortcuts (i.e. CTRL+G) within a ZEN application.   Allow me to provide a summarized background:

Our application has a ZEN page (call it the PPL page) with a tablepane that displays a list of records.   This page also has an iFrame (#1)

  • The tablepane allows the user to select one or more rows from the table and will click one of the appropriate buttons on that page to invoke a looping process that allows the user to work each of the selected records one-by-one.  
  • Based
1
0 322
Question John Hotalen · Jan 25, 2018

Hello to all my fellow Cache Developers/Experts: 

My question has to do with how I would go about changing the image file size when loading (saving) an image file (i.e. JPG, BMP, GIF, PNG, etc...) to a Cache Database Table. 

Here is my business scenario: 

  • The user will save various image files (could be different types, such as JPG, PNG, BMP, GIF) to an operating system directory. 
  • Then our application has a background job that monitors the image directory and will load (save) the image into a Cache Database Table into a property of data type %Stream.GlobalBinary. 
  • Then when a client report is
7
0 872
Question John Hotalen · Nov 30, 2016

Hello Fellow Caché Developers,

The purpose of this post is to ask for everyone's thoughts and input around the use of transient, SQLCalculated/Computed properties within persistent classes.

This approach allows for extra data values needed in SQL queries to be available without having to join to other tables.

Very simple/basic example to illustrate the topic:

Let's say I have a persistent class named ICDAutoCodeDefn to hold ICD Auto-Coding definitions, such as:

Class ApplicationName.DB.MedicalCoding.ICDAutoCodeDefn Extends %Persistent

That has a few properties:

SpecimenPart As %String

BiopsyLocation

4
0 956
Article John Hotalen · Oct 4, 2016 1m read

How to parse a URL in Caché:

Let's pretend you are working on a project where you may be retrieving a URL for some purpose and you have the need to be easily able to parse apart that URL to get the various components that make up the URL.

Here's how to do that:

Note:  This example assumes you have a variable named sURL that contains some url (i.e. http://www.intersys.com/main.csp?QUERY=abc#anchor) and you will be creating an array of the URL component pieces, where the array will be named aComponents.

In your class/routine, add the following code:

Do ##class(%Net.URLParser).Parse(sURL,.aComponents)

8
0 2005
Article John Hotalen · Sep 29, 2016 1m read

Checking if Directory or File Exists:

Outlined below is an example of how to check if a directory exists:

Set directoryName="c:\temp\nosuchdir"

/* Check for existence of a directory - Return Value:  0 - directory does not exist;  1 - directory does exist  */

Set directoryExists=##class(%File).DirectoryExists(directoryName)

If ('directoryExists)  // do the processing for when a directory does not exist


Outlined below is an example of how to check if a file exists:

Set fileName="a_test_filename.txt"

/* Check for existence of a file- Return Value:  0 - filename does not exist;  1 -
1
0 3363
Article John Hotalen · Sep 29, 2016 1m read

The one question that some of you might have is:  

How do I change my login information for Cache Studio if I clicked the checkbox to automatically save my login info so I do not have to enter my username/password every time I open Studio?
 

Well.....excellent question!!!!!!

Here's the answer:  

Bring up Studio and press F4 (or go to File menu -> Change Namespace) - when the Change Namespace box appears - click on the [Connect] button and you can select the server you want to connect to and it will re-prompt you for your login credentials -- at that point change the Cache Account to whatever

1
1 1507
Question John Hotalen · Aug 31, 2016

Hello Fellow Cache Developers:  

Has anyone ever created an index on values of a list property?   If so, would you be willing to share an example?

Also, feel free to offer input and suggestions regarding use of indexes on List values.

Here is my database scenario:

Parent Class:

PropertyA - %String  

PropertyB - %Integer 

Child Class:

PropertyC - %Integer

PropertyD - list of %Integer

Data illustration:

PropertyA + PropertyB   maps to one or more occurrences of [PropertyC + list of values for PropertyD]

ABC + 90001000    maps to  6600012113 + list (86001000, 86982277, 86982271)

ABC + 90001000    maps to

2
0 677