I bet that not everyone familiar with InterSystems Caché knows about Studio extensions for working with the source code. You can actually use the Studio to create your own type of source code, compile it into interpretable (INT) and object code, and sometimes even add code completion support. That is, theoretically, you can make the Studio support any programming language that will be executed by the DBMS just as well as Caché ObjectScript. In this article, I will give you a simple example of writing programs in Caché Studio using a language that resembles JavaScript. If you are interested, please read along.
I'm using this code to read a file, line by line.
Most lines are shorter than 32767 symbols, but some are longer. No line is longer than $$$MaxStringLength and long strings are enabled.
Is there a param to Open/Read command I can pass to increase Read limit?
My code:
set filename = pFile
open filename:("R")
for {
use filename read x
quit:$ZEOF=-1
set ^dbg($i(^dbg)) = $lb($e(x,1,10), $e(x,*-10,*), $l(x))
}
close filenameI've checked reclen parameter but it did not seem to help
We are trying to get a custom header that I have added to a request to Cache, and I have seen the following in another post, however it doesn't work for us:
You can do it as in any CSP page/class. With %request, which is object of class %CSP.Request
And headers available in property CgiEnvs, where every http header appear with a prefix HTTP_
So, you may try this code.
set ipCountry=%request.
Hi Community!
Check the fresh Virtually Speaking recording "InterSystems on vSAN" with @Murray Oldfield
Have a great weekend!
Hi Community!
This is a digest of the Developer Community postings in November 2018.
Most viewed
New release cadence for InterSystems IRIS 302
Abnormal programming with InterSystems 217
Language features that you really should know from day 1 215
What is best approach to parsing CSV string to tab-delimited string? 207
How do You Convert 8-bit Database to Unicode? 141
InterSystems IRIS 2018.2 available in preview 139
How to get running operating system 122
ObjectScript: Looping over a multidimensional global value and comparing 119
Syntax highlighting for ObjectScript 119
Detection of last update timestamp of each class row (DSTIME ?) 117
Data Verifier for InterSystems Data Platforms 104
Uploading and downloading files via http 99
Utility to compare class and include file definitions between builds 55
Hi, all.
I know this is basic, and I think I have done this before, but I haven't been successful this time.
In a Routing Rule, I would like to take the value of MSH:9.2, see if that value does NOT exist in a lookup table, and ultimately return out of the rule if true.
So, if my message is an "A05", but "A05" is not in a particular lookup table, then it evaluates to 1, and I execute my action of "Return" and the rule ceases processing.
Is there something incorrect with my sample code below?
..DoesNotIntersectList(HL7.{MSH:9.2}, "ValidAdt.lut")
Thank you in advance for any insight!
Bill
I am new to InterSystems.
I have set up a simple application in HealthShare.
Name: /testwebapp
CSP Files Physical Path: /Users/lakinducker/Documents/Dev/testwebapp/dist/testwebapp
In that directory are the following:
index.html
styles.3bb2a9d4949b7dc120a9.css
polyfills.c6871e56cb80756a5498.js
main.4ba7035983a7e3311083.js
runtime.ec2944dd8b20ec099bf3.js
favicon.ico
3rdpartylicenses.txt
If I go to http://localhost:57772/testwebapp, I get "Not found".
If I go to http://localhost:57772/testwebapp/index.html, I get the index.html file.
Good morning,
Background to task: Shut down Ensemble from a task in Task Manager.
I have a batch file that shuts down Ensemble when run as administrator. I can confirm this works, as it brings up the shutdown/restart prompt for Ensemble, however I now need to plug this into Ensemble's Task Scheduler so it can be run on-demand.
At present I am trying to use: do ^execute: %windir%\system32\cmd.exe Z:\Scripts\shutdown.lnk
This is to run the batch file from the shortcut, which runs it as admin.
Hi Community!
We are pleased to invite you to the Moscow InterSystems Developer Community Meetup on 11th of December!
The following class contains 1 class method "test" that creates a Zen Application and Page:
Class objectscript.createZenPage
{
classmethod test() {
// create Application.
set app=##class(%Dictionary.ClassDefinition).%New()
set app.Super="%ZEN.application"
set app.Name="ZenTest.MyZenApplication"
set app.ProcedureBlock=1
set param=##class(%Dictionary.ParameterDefinition).%New()
set param.Name="APPLICATIONNAME"
set param.Default="MyZenApplication"
set param.parent=app
do param.%Save()
set param=##class(%Dictionary.ParameterDefinition).Hi all,
I have an incoming JSON message with a string field exceeding in length the 'caché long-string limit' of 3641144 characters.
Using {}.%FromJSON(instream) I am able to create %DynamicObject properly. However, I am unable to access the long property, as in every assignment, I get the <MAXSTRING> error.
Is there any way for me to obtain contents of the 'too long' string field as a stream?
Thanks
Jiri
Hello, I need help in health insight. I am trying to generate reports on deep see but i am not able to pull in the patient ids as these are our requirements for the project. Can anyone help me in unlocking this feature. Can anyone help me with link to correct documentation on how to access the edge gateways of multiple facilities to access the clinical data on sql explorer.
When using the JSON_OBJECT() function in Caché SQL on a %String property that contains JSON syntax, it converts the %String into a JSON object instead of escaping it as a string literal. How can I prevent this? (without ridiculous hacks like "add a space to the beginning of the value" as we don't always know which properties will contain these values and I certainly don't want to have to check for nulls and add/remove a space every single place this value is used in the application)
I don't want these strings automatically marshalled into JSON objects.
Hi Community!
New session recording from Global Summit 2018 is available on InterSystems Developers YouTube Channel:
Hi everyone! My name is Bruno Soares and I work with HealthShare. I have one question and would be very grateful if someone help me. Can somebody tell me where HealthShare parameters weight came from? Thank you all.
I've created a CCDA schema with from an xsd ad now am trying to reference the CCDA elements in a custom class (process). What is the syntax for referencing my CCDA elements?
I've tried the following
Method OnRequest(pRequest As EnsLib.EDI.XML.Document, Output pResponse As Ens.Response) As %Status
{
// constructing PDQ Request
set tPDQRequest = ##class(HS.Message.PatientSearchRequest).%New()
$$$LOGINFO("Starting Process")
set tPDQRequest.Title=pRequest.GetValueAt("/title")
$$$LOGINFO("Title: "_tPDQRequest.Title)
set tPDQRequest.LastName=pRequest.
Hi Community!
I'm pleased to share the announcement that InterSystems IRIS Data Platform is available on Amazon Web Services marketplace!
Hi,
I'm having the following error when returning a large dataset from a REST API.
"errors":[ {
"code":5002,
"domain":"%ObjectErrors",
"error":"ERROR #5002: Cache error: <STORE>%0NmGk1+5^xxxxxx",
"id":"CacheError",
"params":["<STORE>%0NmGk1+5^xxxxxxxxxxxxxxxxxxxx"
]
}
],
"summary":"ERROR #5002: Cache error: <STORE>%0NmGk1+5^xxxxxxxxxxx"My understanding is that this error is related to the amount of memory available.
Please see my method implementation below.
As part of a BPL I am building I need to foreach over a some repeating elements and look for a certain value, if said value is present I need to forward the message to another operation.
I can't seem to get the if statement inside the foreach loop to work and I think I am doing something wrong?
The error message I am getting:
ERROR <Ens>ErrException: <UNDEFINED>zS2+2^GWH.Messages.Eobs.AKISegmentCheck.Thread1.1 *k1 -- logged as '-' number - @' Set k1=request.GetNextIndex("PIDgrpgrp("_(1)_").ORCgrp()",k1,.tSCTrans)'
Can anyone explain that error to me?
Cheers
Hi Community!
We're pleased to welcome @Sean Connelly as our new Moderator in Developer Community Team!

Let's greet Sean with big applause and take a closer look at his bio!
Can we plugin a different UI or anyone has a suggestion to a more appealing UI in Deepsee that can be plugged in easily
Hi Community!
It's started! Home sale of the year!
This weekend, November 23-25, is a Black Friday Deals weekend on InterSystems Global Masters Advocate Hub!

Everybody has a testing environment.
Some people are lucky enough to have a totally separate environment to run production in.
-- Unknown
.
In this series of articles, I'd like to present and discuss several possible approaches toward software development with InterSystems technologies and GitLab. I will cover such topics as:
- Git 101
- Git flow (development process)
- GitLab installation
- GitLab WorkFlow
- GitLab CI/CD
- CI/CD with containers
This first part deals with the cornerstone of modern software development - Git version control system and various Git flows.
Hi
Is this a bug? We came across it on an older version of Cache but I've also just tried it in version "Cache for Windows (x86-64) 2017.2.2 (Build 865U)" and got the same result.
Create a Class like so:
Class My.Email Extends %Persistent
{
Property AddSeq As %Integer(MAXVAL = 32767, MINVAL = -32768) [ Required ];
Property EffBegDat As User.SQLdatetime;
Property EffEndDat As User.
Greetings,
How can I extract/return the workstation id in M. In other words, I csession in to MUMPS and I want to extract the workstation to use.
Thanks in advance for everyone's help...
I am quite new to Studio and I have been a Microsoft guy for a very long time and spoilt because of the short cuts provided and the flexibility of the IDE. Any tips and tricks for me to make my life easy while using the studio?
For each instance of an XML-enabled class I want to control whether a property is projected as an empty element or not projected at all. With string properties, I can set the value as $c(0) for an empty element, or an empty string for no projection. But it looks like this isn't consistent for properties with type %Boolean or %Integer. With booleans $c(0) gets projected as "false". With integers $c(0) stays as a zero-width space in the XML output (which gives me a SAX parser error if I try to read it).
Is there a way to do this that works for all datatype properties?
Hi,
I need to route a message synchronously to multiple targets using a routing rule.
In IRIS I built a general routing rule set, made up of a couple of rules. For one Rule in particular, and based on a common condition, I want to send the incoming message to 2 different targets. (no transformation is used)
I can select, in the single SEND action, multiple target names, or, I can create consecutive SEND actions, one after the other, each sending to their specific target.
Hi Developers!
New video from Global Summit 2018 is available now on InterSystems Developers YouTube:
Modernize Traditional Applications
Hey Developers!
We're pleased to introduce Scott Roth as a new Developer Community Moderator!

Let's greet Scott with big applause and take a closer look at his bio!




