InterSystems Developer Community is a community of 17,763 amazing developers
We're a place where InterSystems IRIS programmers learn and share, stay up-to-date, grow together and have fun!
Question
· Oct 18, 2018
$match or "?"

Hello all...

Is there two matching patterns in Caché, is there a difference in use one or the other?
Example:

USER>set a = "(1234)"

Using $match.

USER>w $match(a,"\([0-9]{4}\)")

USER>1

Using literal match (sorry if not correctly term expression)

USER>W a?1"("4n1")"

USER>1

What is different from using one or the other?

The 'a?1"("4n1")"' does this pattern exist only Caché.
Exists performance improvement with use pattern Caché?

0 2
0 539

Recently, a partner company started to develop an Angular client for their Cache application. Together, we decided to leverage the power of Caché dynamic objects to exchange JSON encoded data between client and server parts. However, we realized that currently there is a gap in Cache JSON implementation that prevents simple use of traditional registered and persistent classes to exposed their data with the same ease as with XML. I wrote a small JSON adapter, that does the job and bridgers the gap. It's purpose is simple expose data described by a regular Cache class in a one-to-one fashion to a %DynamicObject. On the other hand, when a serialized JSON data comes in, it can be easily deserialized into dynamic object and subsequently bound to regular class by the newly created adapter.

13 7
1 2K

I think I already know the answer to this but I thought I'd ask anyway. So the Node.js adapter allows you to perform operations directly on Globals. Does the InterSystems.Data.CacheClient.dll or InterSystems.CacheExtreme.dll provide a mechanism to access Gobals directly or are you accessing globals via Caché ObjectScript classes?

0 5
0 510

This code snippet uses %ZEN.Auxiliary.jsonSQLProvider. The namespace and string of SQL can be edited for different situations. The class method "test" runs the code:


Class eduardlebedyuk.passQuestionParams
{
    classmethod test(pValue = 50) {
        s ns = $Namespace
        zn "samples"
        s tSQL = "SELECT ID, Name FROM Sample.Person WHERE Id > ?"
        s tPR = ##class(%ZEN.Auxiliary.jsonSQLProvider).%New()
        s tPR.sql = tSQL
        s tPR.%Format = "tw"
        s tPR.maxRows = 100
     
        s tParam = ##class(%ZEN.Auxiliary.parameter).%New()
        s tParam.value = pValue
        d tPR.parameters.SetAt(tParam,1)
      
        d tPR.%DrawJSON() 
        //d ##class(%ZEN.Auxiliary.jsonSQLProvider).%WriteJSONFromSQL(,,,,,tPR)  //same thing
        zn ns
    }
}

(Originally posted to Intersystems CODE by @Eduard Lebedyuk, 5/13/15)

Here's a link to the code on GitHub

1 0
0 253
Question
· Oct 17, 2018
SQLGateWay performance.

I have a ZEN page with nine tablepanes. Each tablepane queries a table in the same SQLServer db. I have a single SQLGateWay(odbc) to this SQLServer db. I need to get better performance when I query all nine table at the same time. Would my performance improve if I had nine SQLGateWays(nine odbc configurations/connections), one for each query? I would appreciate any and all suggestions for getting the very best performance when using SQLGateWays. Thank you.

0 1
0 256

I have created a view to stage some data in a different format and then want to reference that view in a SQL query from a table that filters the data from the view using a property of the table.

Example:

select
MsgId,
FileName,
(select
ReportName
from
custom_view
where
MsgId = ReportId
) as ReportName
from
main_table

Is this even possible? When I try this, I get an error table not found for the view?

David

0 1
0 267

All responses are appreciated. I am new to both scripting and CACHE so please bear with me. I am setting up a nightly backup script for freezing cache then backing it up and then thawing it back out. Currently when I enter the freeze command I am getting a response of access denied even though my id has %all access. I've tried passing the userid/password as a parameter in the externalfreeze command and passing it from a file. I've used my id and lastly I used the _system id in the file. What ID should I use for this or am I passing it wrong?

0 17
0 1K

Hi All,

I need urgent help,

I want to export the values from Global to CSV file.

Values are in global are :

^Global1(1)="1,2,3,4"
^Global1(2)="5,6,7,8"
.
.
.
^Global1(n)="n,n,n,n"

I want output in CSV File as:
1,2,3,4
5,6,7,8
.
.
.
n,n,n,n

I made a class:

0 5
0 1.9K

Hello, our Team is trying to develop Ensemble DTL to transform incoming X12 files into persistent data records. We created a persistent class and we can insert data using SQL. We tried to verify that %Save() gets called by adding %AddToSaveSet() method to persistent class and there writing to a global. We had to extend our persistent class with Ens.VDoc.Interface class or we could not see %Save() being called from Ensemble DTL. We suspect that %Save() gets some kind of error. We tried to debug by overwriting Transform() method in our DTL class.

0 3
0 725
Question
· Oct 15, 2018
Caché - cinstall_silent.

I would like to know how to choose the "Development" installation type in silent mode.

When performing a normal installation:

Please review the installation options:
------------------------------------------------------------------
Instance name: CACHE
Destination directory: /cache
Cache version to install: 2015.2.1.705.0.17420
Installation type: Development

When I perform a silent install:

0 3
0 481

Hi,

I ran the Cache ODBC Driver installer as Administrator on my Windows 7 PC this morning. It completed successfully with o indication of any issues. When I check installed programs and features via Win 7 Control Panel, I see it listed as Intersystems ODBC Driver 1.00.000.

However, when I try to configure the driver via Control Panel - Administrative Tools - Data Sources (ODBC), I cannot find it. The only driver listed under the Drivers Tab is SQL Server.

I am not sure how to proceed.

I appreciate any suggestions.

Thanks,

Bill

0 5
0 1.5K

Hi All,

I need some help with sending PDF files to printer using cache instead of using third party tools(Adobe, foxit reader, etc..).
Sometime i getting access issue with the exe files.

Can able to send text data to printer using below code.

Set Dev="|PRN|PrinterName"
OPEN Dev:(/DATATYPE="TEXT"):80
USE Dev Write "Test printing",!
CLOSE Dev


Any suggestions on sending PDF to printer?

0 3
0 847
Article
· Nov 23, 2017 12m read
Where is my global stored?

It's well-known that namespace global mapping helps us to write code independent on database storage details (Caché instance name, directory path). But sometimes we can face problems accessing an unsubscripted global which has subscript level mapping (SLM) defined. Most of such cases are evident and associated with administrative tasks that should be done on database level, but some of them can confuse even an experienced developer. Just to start:

4 8
0 1.3K

Google Cloud Platform (GCP) provides a feature rich environment for Infrastructure-as-a-Service (IaaS) as a cloud offering fully capable of supporting all of InterSystems products including the latest InterSystems IRIS Data Platform. Care must be taken, as with any platform or deployment model, to ensure all aspects of an environment are considered such as performance, availability, operations, and management procedures. Specifics of each of those areas will be covered in this article.

6 0
2 3.8K
Question
· Oct 12, 2018
Healthshare/Ensemble Learning

Hello,

I'm wondering what the path is to learning healthshare & ensemble? I've looked on the learning page and its minimally helpful. I've found that as a long time mumps programmer that new jobs are requiring this. I've just been using mumps to assist with epic emr. Everything I'm seeing is either VistA or Healthshare. Does someone know where do I go to learn these apps? Seems like a catch 22. You need to know these prior to getting a job but you can't get a job where you can learn them. Frustrating.

0 4
0 520
Question
· Sep 7, 2018
Remove FHS segment from file

Is there any out of the box capability in Ensmeble to remove an FHS segment from a batch file? We have a client that is creating a batch of HL7 messages and they insert an FHS but there is no trailing FTS.

We are hoping to avoid custom COS code to handle this scenario.

0 2
1 396