Question
· Oct 10, 2016
PDFs from COS

We have a very old green screen application which is currently producing PCL "documents". I want to update this to produce PDFs - are there any shortcuts / tips? I'm aware Zen Reports can allegedly do it, but I want to avoid that route if I can.

0 1
0 348

Can Cache Monitor (^MONMGR) and System Monitor be configured to also send 'OK' messages? With the first bad email, you still wonder if things are still broken, when in-fact normalcy has been restored, some even within some seconds.

typical examples : -

------ - - - -- - - - -- - -- --- - -- -- -- - - - -- -- -- - --- - - - -- - - -- - - -- --- - - -- -- -- - - --- - - - - --- -- --- - - -- -- --- - - --- - --- -- - - -- -

Sent: Monday, 14 November 2016 11:51 AM

To: Email

1 1
1 1.6K

I use DataGrip (JDBC client) to query Caché server via JDBC.

The problem I encountered, is that if I wait 10 or more minutes between queries I get an error:

[08S01][461] Communication link failure: Socket closed

To fix that I need to disconnect and connect to server again. Is there a JDBC timeout setting somewhere I can change?

0 1
0 1.5K

The class %Compiler.UDL.TextServices arrived in 2015.1, bringing us methods for exporting a class in UDL format (i.e. looking just like we're used to seeing it in Studio), and importing a UDL format definition back into a namespace. Some source control tools including our Deltanji are now able to use UDL format, resulting in diffs that are easier to understand.

1 1
0 306
Article
· Feb 14, 2017 1m read
Portal tip: The inconspicuous Menu button

Amongst the large fonts and chunky icons of Portal's pages, the Menu button in the top left corner is easily overlooked:

When clicked, it often produces the following menu:

When I remember it's there, I find the "View Console Log" option particularly handy.

I wrote "often" above because I've also noticed that the Menu contents change when I'm on a page within the Ensemble section of Portal:

4 1
0 520
Question
· Jun 22, 2017
Hash values of columns

I try to find a function, which generates hash values of columns. In MS SQL Server I can use

select hashbytes('sha2_256', my_column) ...

to create hash values of my_column. Is it possible to use such things in Caché?

Thank you
André

0 1
0 1.1K
Question
· Jul 16, 2017
How to index a class

Hi

I have two persistent classes defined. Lets call it Parent and Child.

Child class is one of the property of Parent Class.

I would like to define a index on Child class.

So what is the default behaviour I defined a index on a non simple data type member?

Any possibility that I could customized the behaviour ? For example. Child class has three properties.

Could I configure the index to index any combinations of these three properties?

Thanks for your help.

0 1
0 566
Question
· Mar 21, 2018
Problems encountered with Java Gateway

Problems encountered with Java Gateway

I am writing a framework for use on the Java Gateway. The role of the framework is:

1. Import the framework jar file into ensemble studio (test completed);
2. In the framework jar, handle the related functions of the remaining jar files (the rest of the jar files are written by colleagues).

The general idea is as follows:

Send: Ensemble Java Gateway -> Framework Jar -> Plugin Jar (colleagues write, processing data).
Returns: Plugin Jar (processed return data) ->Framework Jar->Ensemble Java Gateway.

0 1
0 693

Is Cache the preferred database source for extracting data elements for use in Health Share Patient Index or is there a significant benefit in sourcing data from a warehouse, data mart, or MV? I realize that could be a loaded question with 100 other questions that may follow, however, if there is a known advantage to extracting data from a particular data storage type, the answer may highlight that point.

0 1
0 536

This code snippet provides a ZEN page that downloads a stream from its database directly:


/// We assume that you have stored your data within this schema:
/// MyApp.Model.Storage: Filename,FileSize,Content,ContentType
Class zen.downloadStream Extends (%ZEN.Component.page,%CSP.StreamServer)
{
 
    /// Wrapper to get the id of the download, we assume that the id is passed to this zen page
    /// as a URI parameter, i.e.: MyApp.Downloads.cls?OID=1234
    ClassMethod GetId()
    {
        Quit $Get(%request.Data("OID",1))
    }
     
    /// Set the appropriate header for the file.
    ClassMethod OnPreHTTP() As %Boolean
    {
        Set tId = ..GetId()
     
        If ##Class(MyApp.Model.Storage).%ExistsId(tId) {
            Set tStream = ##Class(MyApp.Model.Storage).%OpenId(tId)
            // You could "guess" the content type by its file extension
            // or you can store it (before) in the database separately (like in this example).
            // Set Extension = $Piece(tStream.Filename,".",$Length(tStream.Filename,"."))
            // Set ContentType = ..FileClassify(Extension)
     
            Set %response.ContentType = tStream.ContentType
            Do %response.SetHeader("content-disposition","attachment; filename="_tStream.Filename)
            Do %response.SetHeader("Content-Length",tStream.FileSize)
        }
        Else {
            Set %response.Status="404 File Not Found"
            Quit 0
        }
        Quit $$$OK
    }
     
    ClassMethod OnPage() As %Status
    {
        Set Download = ##Class(MyApp.Model.Storage).%OpenId(..GetId())
        Do Download.Content.OutputToDevice()
        Quit $$$OK
    }
 
}

Link to code on GitHub

2 1
2 567
404 Not Found

{
"error": {
 "errors": [
  {
   "domain": "global",
   "reason": "notFound",
   "message": "Not Found"
  }
 ],
 "code": 404,
 "message": "Not Found"
 }
}

I want to do something like the above sample from a Google Storage JSON API. I have a call to Write obj.%ToJSON() followed by return ..ReportHttpStatusCode(..#HTTP404NOTFOUND) however the HTTP Status code is always 200. If I remove the Write obj.%ToJSON() statement it returns a 404 status with no body. How do I return both?

0 1
0 2.5K

I was searching for the most simple way to connect from visual studio code to my local instance via terminal without having to change any window.

I know this can also be achieved via telnet but seems a bit overhead if you're in your local machine.

For me the simplest sollution is to open a terminal window in VS Code, navigate to the /bin folder of your instance installation and run .\csession.exe INSTANCENAME

For simplicity you can just include your /bin folder in your path so you don't even need to navigate there

1 1
1 1.1K

Hello, everyone,

InterSystems Certification has designed another certification exam and we need input from our community to help to validate its topics. Here's your chance to have your say in what makes an expert in system administration with InterSystems Caché or IRIS. And, yes, we'd like to hear from you Caché admins!

Here's the exam title and the definition:

3 1
0 311

I have a SQL query that I want to run against MS SQL from cache ensemble using the SQL outbound adapter. If I run this query direct from MS SQL Studio it take about 7 seconds MAX and returns about half a million rows. The row only contains one column it is a number all same size and if I run this query in the production in ensemble it takes for ever the production finishes without getting the response back. The same query run in cache outside the ensemble environment writing results to a file it returns results taking about 3minutes to complete.

0 1
0 242

Can the built-in $System.Encryption.TOTP() function be used in conjunction with Authenticator Apps (e.g. Google, Microsoft, and so on)?

Providing the same secret/key to a variety of authentication apps, they all return the same synchronized value. However, passing the same secret/key to $System.Encryption.TOTP() is generating a different value (with all instances executing at the same time for comparison).

0 1
0 198