#Caché

30 Followers · 4.5K Posts

  

InterSystems Caché is a multi-model DBMS and application server. See more details here.

Documentation.

Question Drew Holloway · Feb 28, 2020

Let's say I start with a date range of '1-5-2019' to '5-25-2019' that occurs on one row.  I'd like to ultimately have this show as 5 rows in Crystal Reports as shown below

Result

1-5-2019  1-31-2019

2-1-2019 2-28-2019

3-1-2019 3-31-2019

4-1-2019 4-30-2019

5-1-2019 5-25-2019

I found a result that worked in T-SQL, but I'm not sure how to translate it to Cache SQL.  The T-SQL code is

select dateadd(d,N.number,d.begindate) adate, data
  from data d
  join Numbers N ON number between 0 and datediff(d, begindate, enddate)

This code fetches a row for every day between the begin date and end date.

3
0 437
Question Drew Holloway · Feb 28, 2020

In T-SQL, I can create a recursive CTE to create a subquery or a view that will hold a whole lot of numbers.  Is there a way to do this in Cache SQL?  I'd like the numbers from 0 to 10000 if possible. 

Thanks!

3
0 368
Question Ali Chaib · Feb 28, 2020

Do you have any clue how to create a list of messages in studio ?

Example :

I can define one message that is called DoctorInfoMsg such as 

set DoctorInfoMsg= ##class(PKGNotification.InDoctorInfo).%New()

Where PKGNotification.InDoctorInfo is composed of 

Property UserName As %String;

Property ListOfPatients As list Of %String;

How to define a list of PKGNotification.InDoctorInfo messages ?

How to get UserName of the first message?

6
0 298
Announcement alex kosinets · Feb 8, 2020

Ladies and gentlemen, good news for our town.

It finally happened  - M was put in the cell.

And feels great there. Maybe it not a prison but an Excel cell.

Being there, he leads the whole M-gang. As well as conditional formatting in EXCEL.

Close integration of excel with the database provides a new convenient design tool.

Interactive reports, input forms, diagrams are generated only by m-commands in cells, without classical programming.

More detailed on https://github.com/mx-alex/MX

We will monitor the development of the situation and answer your questions.

best wishes

Alex

19
1 1673
Article alex kosinets · Feb 29, 2020 4m read

There is a special Query for reporting, it takes one cell of Excel. Example :

?$$omQuery 113^oPeat | Country   Country:Province   Date   Product:Date   Date:Product:-zr   | tn EURO | zrzr| | if Date'<%XD81,Date'>%XD82 |  set zrzr=zr,EURO=summa

The omQuery sets the structure and content of the required documents as well as filters and data processing procedures.

In one request, up to 9 reports are created, with subtotals by group.

0
0 267
Article Robbie Luman · Feb 28, 2020 3m read

Our company is in the process of converting our software for use in Intersystems IRIS and one of the major sections of the software makes use of a custom statically-linked C library using the $ZF("function-name") functionality. During this, I found out that the process for setting up the C library to be used within the database platform has changed significantly between Cache and IRIS.

0
0 409
Question Paul Dawson · Feb 24, 2020

Hello, 

I have a class I'm working on that is extending a base class that contains the %GetComponentByID method and a section of the new code I'm writing uses %GetComponentByID but when I attempt to compile the class I'm getting an error that says the method doesn't exist. 

Am I missing something to be able to include the GetComponent method in an extended class? 

7
0 302
Question Akshat Vora · Jan 23, 2020
   try{
        ....
        ....
        ....

        Set tSC = method_invocation()

        If $$$ISERR(tSC) {
            Quit tSC
        }

        ....
        ....
        ....

}

On compiling the above, I get an error saying "QUIT argument not allowed : 'tSC' ".

  • When I replace Quit tSC with Return tSC, it compiles
  • On replacing Quit tSC with Quit $$$OK, I get the error: QUIT argument not allowed : '1'
  • On replacing Quit tSC with Quit, it compiles
  • A 'Quit tSC' statement outside of the try-catch block does not cause a
9
0 1210
Question Amnon Magen · Feb 25, 2020

Hi

I'm trying to create a form on a csp page, with input elements binding to data using the cspbind attribute.

All is working fine when i use string literal as in

cspbind="UserName"

But trying  to set the attribute to runtime expression  doesn't work for me, i.e:

cspbind= #(..EscapeHTML(query1.GetData(col)))#

 The same rt expression produce the desired string when used in other elements, i.e:

<p> #(..EscapeHTML(query1.GetData(col)))# </p>  

-> will produce 'UserName' on page.
 

Are there any known limitations for this attribute?   

I'm using version:

Cache for Windows (x86-64) 2015.2 (Build 664

Thanks

3
0 423
Question Yone Moreno · Feb 6, 2020

Hello,

We have the following code:

Method incorporarDocumento(request As EsquemasDatos.incorporarDocumentoRequest(REQUIRED=1)) As EsquemasDatos.documentoIncorporado(XMLNAME="return") [ Final, ProcedureBlock = 1, SoapBindingStyle = document, SoapBodyUse = literal, WebMethod ]
{
set ..MTOMRequired = 1set ..SecurityOut.actor = "http://www.gobiernodecanarias.org/Platino/Authentication/1.0"
    set ..SecurityOut.mustUnderstand = "1"
    set ..SecurityNamespace = "http://docs.oasis-open.

1
1 452
Question Anthony Rosania · Feb 23, 2020

First,

Forgive me if this is a rather low-level question - I am a physician informaticist who is learning cache/mumps for the first time. I am sure this probably relates to some setting but I can't find a similar issue anywhere.

When I create a list, and then try and return that list - I get a bunch of symbols back along with my results, or sometimes I just get symbols. 

I pasted a screenshot below.  Thank is advance for the help!

Anthony

6
0 330
Announcement Andreas Dieckow · Jun 28, 2019

Conversion Sequence step 4 (see table below)

Over the last few months, we have made changes to InterSystems IRIS to make it easier for you to move from Caché/Ensemble (C/E) to InterSystems IRIS. The most significant adjustments are the re-introduction of non-Unicode databases and the in-place conversion. InterSystems IRIS now fully supports non-Unicode databases with all the functionally that already exists with Caché. The in-place conversion supports an upgradelike process to install InterSystems IRIS right on top of your existing C/E deployments.

10
1 1332
Article Mathew Lambert · Feb 21, 2020 1m read

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.

1
1 1371
Article Mikhail Khomenko · Aug 16, 2017 20m read

Hello! This article continues the article "Making Prometheus Monitoring for InterSystems Caché". We will take a look at one way of visualizing the results of the work of the ^mgstat tool. This tool provides the statistics of Caché performance, and specifically the number of calls for globals and routines (local and over ECP), the length of the write daemon’s queue, the number of blocks saved to the disk and read from it, amount of ECP traffic and more. ^mgstat can be launched separately (interactively or by a job), and in parallel with another performance measurement tool, ^pButtons.

10
4 3282
Question Michael Davidovich · Apr 1, 2019

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).

How can we format the file for Excel?

28
3 4238
Question Hao Ma · Jan 4, 2020

With ^%SYSMONMGR, there are some brunches that I never found a way to quit out, like shows as the following example: do ^%SYSMONMGR --> Manage Health Monitor --> View Alert Records ...

Does anyone know the answer? thank you very much.

%SYS>do ^%SYSMONMGR

  1. Start/Stop System Monitor
  2. Set System Monitor Options
  3. Configure System Monitor Classes
  4. View System Monitor State
  5. Manage Application Monitor
  6. Manage Health Monitor
  7. View System Data
  8. Exit

Option? 6

  1. Enable/Disable Health Monitor
  2. View Alerts Records
  3. Configure Health Monitor Classes
  4. Set Health Monitor Options
  5. Exit

Option? 2 Sensor (=All

6
0 368
Question Orlando Lagman · Jan 16, 2020

I used the soap wizard to create a web client based on the wsdl.  I was able to get a valid response back, and now it looks like the error is in decrypting the soap message response "inbound"

ERROR #6284: Security header error: SecurityTokenUnavailable.

%objlasterror = error: 0 ìŒSecurityTokenUnavailableÃCPR¹.e^zImportHeader+62^%SOAP.Security.Header.1^1(e^zProcessHeaders+48^%SOAP.WebBase.1^1-e^zProcessSOAPEnvelope+18^%SOAP.WebBase.1^10e^zSOAPRequestResponse+123^%SOAP.WebClient.1^1)e^zInvokeClient+112^%SOAP.WebClient.1^1Dd^zInvoke+2^qcpr.registration.ws.HCValidationPort.one.validate.

1
0 621
Question Suman Samanta · Feb 12, 2020

HI I am using below code to retrieve the last inserted ID of the table. It works when we do not set any custom column as IDKey. If we define any column as 

IDKey below code does not return any IDKey. I know when i am defining any column as IDKey its not auto generated , but whats the best way to get the ID column value

            String sql = "INSERT INTO TestFramework_UI_Data.Execution (TotalTestSteps) VALUES (0)";
            //ResultSet rs = createExecutionSt.executeQuery("SELECT * FROM TestFramework_E2E_Data_TestData.TestCases");
            int t = createExecutionSt.

1
0 806
Question Jonathan Ebbers · Feb 18, 2020

I'm using Cache SQL and want the ability to choose a specific index.

I've boiled the problem down to one table and simplified the query down to

SELECT *
FROM Registration.PatResp
WHERE SchedApptNum=8450022

SchedApptNum is indexed, but instead of using that column, "Show Plan" indicates that it's looping through the entire Registration.PatResp table on Id (the primary key for the table).

I've done a tune-table with no change.

SQL provides %IGNOREINDEX, which allows me to ignore a specific index, but I don't need that.  I need the reverse - %CHOOSEINDEX so that I can force SQL to use a specific index.

6
0 1315
Question Mathieu Van Sevenant · Feb 6, 2020

Hello everyone smiley

Here is a try of sending a stream object with %ToJSON() by HTTP POST request on a remote server.

First the JSON structure:

{
    "document": {
        "id": "{43495441-4445-4C4C-4500-0500129C762E}",
        "patient_id": "5003171TC01",
        "language": "fr",
        "doc_type": "CONS",
        "doc_time": "2019-06-12 11:02:00",
        (.

7
2 1559
Question Yone Moreno · Feb 12, 2020

Hello,

We would like to convert a string which represents a dynamic JSON object, to a JSON.

We have:


linea: {"app_id":"5cf57b56-c3b4-4a0d-8938-4ac4466f93af","headings":{"en":"Cita Atención Primaria","es":"Cita Atención Primaria"},"subtitle":{"en":"C.P. ISORA","es":"C.P. ISORA"},"contents":{"en":"Aqui el contenido del mensaje si aplicase","es":"Aqui el contenido del mensaje si aplicase"},"data":"{\"centro\":\"C.P.

2
0 1934
Question Yone Moreno · Feb 13, 2020

Hello,

We would like to store a list into a global. The need is to get the full Web Service's Response Message, because of currently, our Operation sends the message to the Process, whith an empty list:

We have created a copyList which is a clone of the list which is being returned from the web service client:

set copyList = ##class(%ListOfObjects).%New()
 set copyList = pResponse.RSPK21QUERYRESPONSE.%ConstructClone(1)
 $$$LOGINFO("copyList: "_copyList)
 $$$LOGINFO("copyList count: "_copyList.Count())
 $$$LOGINFO("copyList.GetAt(1): "_copyList.GetAt(1))
 $$$LOGINFO("copyList.PID8: "_copyList.

2
0 315
Question Javier Sanchis · Feb 13, 2020

Hi, everybody, 

I've been reading some posts in the community but I haven't been able to come to a conclusion. Here's my point.

I have a cache code, and following this guide https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?… but I can't understand how to run this from jenkins for example, without using the console, and thus automate the process. That is to say, if it were possible to do it, what steps should I follow.

Thank you very much

2
0 1204
Question Yone Moreno · Feb 10, 2020

Hello,

We would like help to know why our web service which gets Patient's ID number, does not accept messages?

We observe its Event Log, and it contains the following pattern:

We detail each log to give info to discover what's happening:

First there is a new connection:

Then it suddenly disconnects

After that it looks like the service restarts:

The next one is interesting: it outputs that UTF-8 encoding is invalid, inside EnsLib.SOAP.InboundAdapter

We have searched for UTF-8 inside SOAP.

3
0 797
Question Mathew Lambert · Feb 12, 2020

I've recently encountered a HS Caché that won't start informing that Collation 30 is not available, but I have not found an easy way of knowing what collation is 30.

I've found that the following command returns the ones from the current locale, but not from all locales:

Set Rset = ##class(%ResultSet).%New("%Library.Collate:CollationList")

d Rset.Execute()

While (Rset.Next()) {zw Rset.Number_": "_Rset.Name}

Thank you

2
1 466