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 .

3
0 89
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 104
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 313
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.  While many of the old Cache ZEN features still work well, there are several, four specific scenarios listed below, that do not work as expected with MS Edge.

0
0 174
Question John Hotalen · May 25, 2022

Hello to all my fellow Cache Experts.   Quick question about the MONLBL output that identifies performance issues.  There is a metric value output by MONLBL called "Obtain [NEW] connection to Cache".   Supposedly that metric captures the time taken between the request reaching the CSP Gateway and a connection to Cache being reserved for the purpose of servicing the request.   All of that being said, if that metric value is high for many requests, such as 19.x seconds, then can anyone tell me what that metric really means and how to improve (lower) the new connection to Cache time.

3
0 362
Question John Hotalen · Jan 26, 2022

Hello To all my fellow Cache Developers,

How the new year is finding everyone well.  The purpose of this post is to ask everyone a question about Cache tablepane dblclick functionality that does not appear to be working like I thought it would.   Here is my dilemma:   I have a fairly simple tablepane that displays several columns of data (just strings and dates).  I setup the tablepane property dblclick to call a client method, so I can take an action based on the row that the user double-clicked on.  So that table property is set to this     dblclick="zenPage.

2
0 189
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.
1
0 323
Question John Hotalen · Jan 25, 2019

Hello Cache Developers:  I was curious if anyone has ever created a TWAIN interface to their Cache Application?   I am new to TWAIN and hence the reason for this question.  From what I understand, TWAIN is software used by various digital imaging software and TWAIN provides an API for applications to call to be able to import images into their application.   I work with a healthcare application and was wondering what types of things are required for a Cache Web Application to call the TWAIN API to be able to load images into a Cache table.

4
0 779
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.
7
0 874
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.

4
0 958
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,.

8
0 2011
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.
1
0 3368