I have a simple app which tries to establish a connection with a Cache database instance via Global API for Java:

import com.intersys.globals.Connection;
import com.intersys.globals.ConnectionContext;

public class Assignment {

    public static void main(String[] args) {
        Connection connection = ConnectionContext.getConnection();
        connection.connect("SAMPLES", "_SYSTEM", "SYS");
    }

}

The expection I am getting:

0 36
0 777

We are retiring a hosted application for an electronic health care records (EHR) system which stored the data on Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2017.2.2 (Build 867_4_20245) Thu Oct 8 2020 16:58:40 EDT. The hosting company is providing me with a single CBK file. I need to install a database system to restore the database and provide occasional SQL access for reports when necessary. I'll need to maintain access to the data for an approximately 10 year retention period. Not sure how to approach restoring this old of a database and eventually upgrading it to a newer re

0 36
1 697

Hello Everyone,

I'm want to know, what is more common for your company to use, the abbreviation syntax or the complety name of commands, and why?

Ex.

S VAR=10 / D FUNC^ROUTINE F 1:1:1000

Set VAR=10 / Do Func^Routine / For 1:1:1000

set var=10 / do func^routine / for 1:1:1000

Here in my company, we are familiar with the abbreviation syntax, because to spell is more faster.

2 35
0 916
Question
· Aug 25, 2017
Runtime type detection

SOLVED

tl;dr how can you tell if a number is really a string

The original question has been updated/improved.

Equality comparisons on floating point numbers will produce different results...

"1.1"=1.1 //is true!

"0.1"=0.1 //is not true :(

This second comparison can be fixed with...

+"0.1"=+0.1 // is true!

0 31
0 1.1K

I am trying to fetch the data from cache database. But i got the error like "CSP application closed the connection before sending a responce".

Below is the query.

SELECT
CallbackComment
FROM SQ.CBPhoneResult_View Where PhoneDateODBC = '2018-04-09'

I have investigated and found that "CallbackComment" contains the special character single quotes " ' " for one result and due to this i got this error.

In this field data is enter by customer. so we cannot restrict them like Do Not use single quotes.

0 30
0 1.4K

I would like to start a discussion regarding Caché Objects and Caché SQL.

It is my understanding that the creators of Caché Objects see Caché SQL as the reporting arm of Objects and as such SQL is essential to Caché Objects.

I once met a Caché Objects programmer who was writing code to $Order through the Globals because that person thought that Caché SQL was too slow and inefficient. I attempted to convince the person otherwise.

So, what say you? Is SQL essential to Caché Objects?

Or

0 29
0 796

I have a query string that I am creating programmatically, based on some user inputs. The user might search on 5 fields, or 8 fields, or no fields.

In my sql statment, some of these fields require parameters in the %Execute statement.

For example:

if user picks lastname, sql = "select * from person where lastname = ?"

if user also picks age, sql = "select * from person where lastname=? and age > ?"

I then have these lines of code to create my result set:

set statement = %SQL.Statement

statement.%Prepare

0 28
0 22K

Currently, when we want to write data to a file that will be viewed in Excel, we parse the data in tab deliminated format to the file and name it with .xls at the end. That is sent to end users via email. They get a warning that the data is not formatted properly (it's not really an Excel file after all) but it does display somewhat correctly as the tabs are understood (this does not work if we deliminated with commas however).

3 28
3 3.6K

The dataCombo property columnHeaders is a comma-delimited list of column headers displayed in the dropdown list.

Comma is a delimiter.

But, if I want add comma to columh header, for instance "House number, apartment" - this is value for header of one column.

How can I escape comma in this case?

"House number\, apartment" - is not working.

0 26
0 499

Hi, folks!

Suppose you have a Caché class with %String property which contains relatively large text (from 10 to 2000 symbols).

The class:

Class Test.Duplicates Extends %Persistent 

{

Property Text As %String (MAXLEN = 2000);

}

And you have thousands of entries.

What are the best options to find entries which are duplicates on this property?

0 26
1 1.3K

I am working with a client to try and export a set of tasks defined in the Task Manager from one system to another. I am not seeing any API for this. I can query this information in SQL. So I tried to use the Data Export Wizard from the System Management portal in the SQL window. Export was fine. Importing failed with a "can't insert into read only field" error. Looking at the class definition does not help since the implementation details are not visible.

So how would one accomplish this? Export scheduled tasks from one system to another?

0 25
0 1.4K

I'm aware of two ways to get list of files in a dir:

set dir = "C:\temp\"
set rs = ##class(%File).FileSetFunc(dir, , , 1)
do rs.%Display()

and:

set dir = "C:\temp\"
set file=$ZSEARCH(dir_"*")
while file'="" {
   write !,file
   set file=$ZSEARCH("")
}

Yet they bot return only files and directories in a current directory, but not files in subdirectories.

I suppose I call one of these recursively, but maybe there's a better solution?

1 25
1 3.6K

I am experimenting with Relationships, both Parent to Child and One to Many.

I have done some SQL look-ups and have searched through the documentation, however not in a lot detail, but wonder if there are more and better ways to access both sides of Relationships through SQL?

Thank you in advance for any help provided.

1 25
0 1.9K
Question
· Jul 17, 2018
Cache Dynamic SQL Pagination

Would like to know if there is an alternative or better way to paginate through a dataset using dynamic SQL than what I am using below. The problem is that as the potential pool of data gets larger, this code slows down to the point of not being useable. In analyzing each line of code below, it appears the slow down is related to the initial rset.%Next() iteration. Is there anything available which does not require a subquery/%VID such as a simple LIMIT/OFFSET?

My code is similar to :

s sql=##class(%SQL.Statement).%New()

1 25
3 2.7K
Question
· Jul 18, 2017
how to release memory for process?

hi

I query large mount of rows from one table with JDBC, and will prompt <store> error. I found that it was out of process memory (default 16M, max 49M in version 2010.2) .

so my question is : how to release memory for large mount of rows query? or how to resolve this error?

0 24
0 772

I have multiple projects that I utilize when debugging in Cache Studio. One of my projects suddenly lost the ability to step through commands with the yellow box and the cursor moving though code lines. The cursor just sits at the entry line while variables apparently do change. Interestingly enough, if I change the project and the debug target, the "yellow box" ability is still there. Apparently losing this functionality is by project/debug target/whatever. The goal is, of course to return it back but how?

0 24
0 532

I have a situation where I have a handful of classes which I need to copy to another Namespace (which uses a different RoutineDB) on the same instance, load it and compile it.

Can anyone help me come up with a command that will do this quickly and easily? Perhaps something with extended reference?

This is somewhat time sensitive so thank you in advance for your ideas!

0 23
0 600

Hi,

I exported selected globals from a Cache 2017 database into a single 4 Gb gof file. Now I tried to import from this file via Management Portal on a different machine . Only about half of the globals was imported and my attempts to select additional globals led to nothing, no new globals have been imported. Well, obviously I am mildly curious what's going on and how can I see the corresponding error which did not appear in the Import window but I can also shrug it off and consider what should I do next.

0 23
0 836

Hi,

I have a program that displays the current running processes to the screen. I need to have a program execute that display program and capture the results to a file. The display program does pause at the bottom of each page waiting for an 'enter' to go to the next page.

Note( the display program will not successfully compile on the current system but it does work)

Also - very, very new to Mumps.

Thanks,

Bob

0 23
0 438
Question
· Jan 27, 2020
IRIS supports of Python and C++

I cannot find those folders under my IRIS install dev folder. Those were in my cache install dev folder.

Will InterSystems drop those support? If yes, why are there some discussion about Python/Iris in this forum?

Of course, I wish IS continue to support those.

0 23
0 1.3K