Announcement Evgeny Shvarov · Dec 24, 2017

Hi, Community!

I'm pleased to announce that in this December 2017 we have 2 years of InterSystems Developer Community up and running!

Together we did a lot this year, and a lot more is planned for the next year!

Our Community is growing: In November we had 3,700 registered members (2,200 last November)  and 13,000 web users visited the site in November 2017 (7,000 last year).

Thank you for using it, thanks for making it useful, thanks for your knowledge, experience, and your passion!

And, may I ask you to share in the comments the article or question which was most helpful for you this year?

Happy Birthday, Developer Community!

2
0 431
Article Jenna Makin · May 26, 2016 2m read

With the release of Cache 2016.1, JSON support was re-architected and made part of the core object model with the creation of %Object and %Array classes, which allow you to create dynamic JSON enabled objects and arrays.

On a recent demonstration I was working on, I had the need to create a REST web service that returned a JSON representation of a persistent object.  After searching for methods that would allow me to accomplish this, ultimately I found none, until now.

20
0 3034
Question Jose Sabike Raja · Dec 15, 2017

In if condition what is the difference between specifying the single operator and double operator? For example, what is the  difference between (&& and &) or (|| and !)

9
0 855
Article Jon Willeke · Sep 20, 2016 3m read

In OS X 10.8 and earlier, PHP was built with ODBC support, making it easy to connect to a Caché database:

$ php -r 'phpinfo();' |grep 'ODBC Support'
ODBC Support => enabled

However, this support was removed in OS X 10.9:

$ php -r 'phpinfo();' |grep 'ODBC Support'

Some people use Homebrew, MacPorts, or Fink to get their tools back. If you're comfortable coloring a little outside the lines (i.e., using sudo and the command line), you can build the odbc.so or pdo_odbc.so extension (depending on which API you prefer), and use it with Apple's version of Apache and PHP. You'll need the following:

1
0 2699
Question Thembelani Mlalazi · Dec 20, 2017

I am trying to read an xml document using %XML.TextReader and that's is all well and l can get my elements values  but would like to determine where the next record start on the xml without referring to the document path in essence would like to use the same method to read different xml docs. I would like to know if is there a way or a function that I can use to get the start and end of a record in xml  as I would to get the start and end element.

Typical example  l would like to get the highlighted paths please note this would need to go for any xml doc

6
0 907
Question Bert Sarens · Dec 19, 2017

Hello,

Is is possible to reorder the comments so we see new comments at the top? At the moment its very hard to find a new comments since the order of the comments is always from oldest to newest, if you comment on the first comment then your comment will be at the top while making a new comment on the post will be at the bottom. Also marking new posts with a different background color or highlighting them would be convenient.

This would be very handy for posts that are getting more comments than can fit on one page or just posts with more comments in general.

Thank you

3
0 254
Question Maarten Van den Vreken · Dec 15, 2017

Hi all,

I have a database with 140 million records containing financial transactions. When I do a query to calculate the sum of those records spanning a number of months it takes around 4 seconds on my database server which seems reasonable. However if I run the same query on an application server it takes around 40 seconds to do the same query.

In just this instance I would like to run that piece of code on the database server instead of the application server. It's a query that is only run a few times a day so I would prefer to have a fast result and don't mind putting a bit more stress on my database server for that.

4
0 891
Question Motti Peretz · Dec 8, 2017

Hi community,

I got quite a busy namespace with lots of services, processes and operations. The Ensemble purge that runs daily keeps the last 10 days. I would like to increase the NumberOfDaysToKeep to 60, but only for a small number of the interfaces in the namespace, and I would like to do it in a way that will be seamless to the users, so they will not have to change the URL of their calls, or will even be aware of the change.
The one idea that I had is to move these few interfaces to a new namespace , but how do I then do it without affecting the URL? with a Pass-Through interface somehow?

2
0 428
Question Jack Smith · Nov 30, 2017

This might be a very simple rookie question but I'm trying to create couple of web services in Ensemble and using  document below as my tutorial, I do manage to do it:

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…

But instead of doing it as described above, where method signature is like this:

Method GetCustomerInfo(ID As %Numeric) As ESOAP.SOAPResponse [WebMethod]

I would like it to be:

Method GetCustomerInfo(valid XML against schema1) As valid XML against schema2 [WebMethod]
7
0 838
Question Rick Clayton · Dec 17, 2017

I am trying to install cache 2017.2 on vagrant/VirtualBox and Ubuntu. I have tried both Linux precise64 3.2.0-23-generic #36-Ubuntu and Linux vagrant-ubuntu-trusty-64 3.13.0-137-generic #186-Ubuntu. I am getting an error that i can’t figure out. I have done this:

sudo apt-get install build-essential
sudo apt-get install software-properties-common python-software-properties
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get install libstdc++6
sudo apt-get install gcc-4.9 g++-4.9
sudo apt-get update
sudo apt-get upgrade
2
0 823
Question Arto Alatalo · Dec 14, 2017

Today %SYS.Namespace.ListAll started to report one namespace, for example USER, two times: once as "USER" and once as USER's database "^^c:\databases\user".

Details: my Cache instance has  50+ local namespaces. Today I have "touched" 3 of them (imported new classes), and now ListAll reports each of these 3 twice. Looks like ListAll is the only one who sees those strange duplicates, in all other places (Portal, Studio) only USER is shown.

Can someone explain what is happening?

9
0 415
Question Jenna Makin · Jun 1, 2016

I would like to write some code to parse a set of HTML pages from the internet in order to gather information from each web page.

All of the web pages are generated using a template, so the format of each of the web-pages is consistent with one-another and the information that I want to gather is always located in the same logical place within the page.

What is the best way to parse an html page in order to gather information at a specific place?

Can XML XPATH be used here?  Does anyone have any examples of parsing HTML content?

6
0 1736
Question Scott Roth · Dec 15, 2017

We are seeing something funky when using $ZSTRIP.

w $ZSTRIP("ZZZZTESTSLOCKTEST","<","ZZZZTEST")
LOCKTES
T

Shouldn't this be returning....SLOCKTEST and not LOCKTEST, the goal is to remove ZZZZTEST from the beginning of the string.

THanks

Scott Roth

The Ohio State University Wexner Medical Center

1
0 603
Question Martin Karas · Dec 2, 2017

Hello everyone,

i want an automatic unidirectional syncronization of multiple databases (some tables from .dat file, not the whole .dat file) . 

So far i have tried everything from package %SYNC and the best working class is SyncSet with journals and guids. The problem is initial database transport for example when i want to add another server.  The easiest solution i have found is to transport syncing globals ^OBJ.SYNC.N to another database and then call %SYNC.SyncSet.Import(), however it seems not to work with only the global structure, although it works fine using import files.

7
1 1035
Question Thembelani Mlalazi · Dec 7, 2017

I am trying to transform an Enlib.EDI.XML.Document through aXLT I know how to trans form the xml document  through a xlt stylesheet but been trying to get an Enlib.EDI.XML. Document from a procees by creating aoperation that will do the transformation of this to file if this can be done in a process all ideas welcome  so far I have come to this and I keep getting an error

:ERROR{ERROR #5002: Cache error: <PROPERTY DOES NOT EXIST>zXMLTOJson+6^TestEnvironment.Custom.GENERAL.CUSTOM.XLT.XMLToJsonOperation1.1 *Parameters,EnsLib.EDI.XML}
7
0 1020
Announcement Michelle Spisak · Nov 27, 2017

Anxious about starting your first major REST application? Don't fret! Join Michael Smart, Senior Support Specialist at InterSystems, as he explores the principles of RESTful design and covers best practices for creating flexible, robust, and intuitive REST services.

Watch the webinar and access the sample code.

Still have questions? Ask them in the comments section below!

3
0 1064
Question Soufiane Amroun · Dec 5, 2017

Hi community ,

i come back to you , i've a problem with Client description in Oauth2, when i tick the  Supported grant types and i save , there are not registred on the OAuth2_Client.Metadata table .

can you tell me where is the problem please.

you will find attached a screenshot.

thank's

2
0 600
Question Sankar Manogaran · Dec 13, 2017

HI,

We are using Cache 5.0.15 version. We are facing <DISKHARD> error. I tried to copy the dat file, I am getting cyclic redudancy error. I did run the integrity check and repair utility . Nothing works. Now My question is how to recover the dat file with data.

Thanks in Advance! Sankar

1
0 186