Hi Community!
New "Coding Talk" video is already on InterSystems Developers YouTube:
Create Your First InterSystems ObjectScript Code with IRIS Community, Github, Docker and VSCode
InterSystems ObjectScript is a scripting language to operate with data using any data model of InterSystems Data Platform (Objects, Relational, Key-Value, Document, Globals) and to develop business logic for serverside applications on InterSystems Data Platform.
Hi Community!
New "Coding Talk" video is already on InterSystems Developers YouTube:
Create Your First InterSystems ObjectScript Code with IRIS Community, Github, Docker and VSCode
Well, we now have two different platforms Caché and IRIS. With so many changes, that it makes so many difficulties to have the same sources for both platforms. I'm not arguing about the reasons for it. Some of the changes are really reasonable.
It's good when I can import code from Caché to IRIS and get it worked after all background job was done. In Caché we have %CacheStorage type used for Storages. In IRIS it automatically converts to %Storage.Persistent. So, If I develop on IRIS, I will have incompatible sources for Caché.
So, it is one of the problems, and I expect more.
Hi There
I created function to manage string as requirement extract the first two letter of each word after space for example:
Text = "Review symptoms to report with patient"
After passed function it will be return "Resytorewipa"
ChangeFormat(desc)
set desc = "Review symptoms to report with patient"
q:$g(desc)=""
SET delim=" "
SET countdown=$LENGTH(desc,delim)
set i =1
for
{
q:i>countdown
set abbrv = $e($PIECE(desc,delim,i),1,2) // But if I put w abbrv I can get "Resytorewipa"
set i = i+1
}
w abbrv
However, at the end I got only abbrv=''pa" how to get data as requirement.
Hi Community!
You're very welcome to watch a new video on InterSystems Developers YouTube, recorded in a new format called "Coding Talks":
Developing with Docker and InterSystems IRIS Community Edition
I am still new to cache objectscript and am trying to figure out how I would go about removing the escape characters from my JSON below. When I call the $toJSON method it's adding the "\" character in the file path.
{"FileStatus":"P","Path":"\/somepath\/test\/test123\/filename.txt","InterchangeOID":"100458"}
My Code:
set tJSONFile = {"FileStatus":pRequest.FileStatus,"Path":pRequest.Path,"InterchangeOID":pRequest.InterchangeOID}
set tJSONFile = tJSONFile.$toJSON()
Thanks.
I have a need to dynamically create a web application definition in a namespace using ObjectScript. I am having trouble finding a cache class or routine that let's me do this.
Thanks
Hi All,
I need to transfer the sub-directories and their contents from a SFTP server to a shared directory while maintaining the structure.
I can do it without maintaining the structure.
Best Regards.
Michel.
P.-S. : files are HL7 messages.
I've tried this:
s status=msg.AttachFile("F:\MyDir","myFirstFile.pdf",1,.count)
s status=msg.AttachFile("F:\MyDir","mySecondFile.pdf",1,.count)
But it's not working at all...
Thank you in advance!
Terminal scripts can be used to run pre-designed commands on the terminal, like a batch file. You can write anything that can be executed on terminal, like for loop, if else and so on, inside Terminal scripts. In this article, I will show you how to call Terminal scripts, how to use parameters in Terminal scripts and how to avoid session disconnected when running Terminal scripts. If you have any information about how to use Terminal scripts or you have any feedback, please feel free to leave a comment.
Method : to download the FTP file from intersystem cache : If you have any question please drop a message :
ClassMethod FTPDownload(myFTP = "", myUserName = "", myPassword = "", sFileLocation = "", dLocation = "", noOfdownloadFile = 1, sourceFileDel = 0)
{
/*---------------------------------------------------------------------------------------------------------------------------
download the file according to the requirements : FTP
Method : Resuable
by : Sanjib Raj Pandey on 30/03/2018
downLoadFile = No of files or all files .
Hey Developers!
Do you want to reap the benefits of the advances in the fields of artificial intelligence and machine learning? With InterSystems IRIS and the Machine Learning (ML) Toolkit it’s easier than ever.
Join InterSystems Sales Engineers, @Sergey.Lukyanchikovand @Eduard Lebedyuk, for the Machine Learning Toolkit for InterSystems IRIS webinar on Tuesday, April 23rd at 11 a.m. EDT to find out how InterSystems IRIS can be used as both a standalone development platform and an orchestration tool for predictive modelling that helps stitch together Python and other external tools.

Hi,
I have a global that holds users name and date of birth.
I would like to loop through them and check if the date of birth is more than 2 years based on todays date
so I have ^checker("under2", "Eric David", "02-05-2018")
I want to check the birthdate based on todays date to see if it is greater than 2. How do I access the birthdate in the global
Please can you advice
I tried :
set values = $order(^checker("under2"))
set td = $zdate($horolog, 3)
set ol = $p(^checker("under2"), ",", 3) // this does not work
while (values ' = "")
{
set difdays = $system.SQL.DateDiff("d", ol, td)
if difdays > 730
{
set ^value("greater than 2")
}
}Hi guys!

Portrait of Madame X, Gustave Caillebotte.
One of the features I like in InterSystems ObjectScript is how you can process array transformations in a specific method or a function.
Usually when we say "process an array" we assume a very straightforward algorithm which loops through an array and does something with its entries upon a certain rule.
The trick is how you transfer an array to work with into a function.
One of the nice approaches on how to pass the information about an array is using $Name and Indirection operator.
Below you can find a very simple example which illustrates the thing.
We use a lot of external MS SQL calls to look up numerous things when it comes to HL7. I am running into an issue where the outbound calls are queued but the message is sent onto the next process before it gets a response. How do I get it to wait till the response gets back from the MS SQL call before sending it onto the next process?
Below is a screen shot of what I am trying to explain...Select Research Study executes at 8:33 the message is sent to the next process at 8:34, but the response of the MSSQL call doesn't come till 9:31.
.png)
Hello gentlemen,
I have to create a objectscript program that will simulate a mainframe (because it's going to be removed). For my program, I receive data from another program that is written in Delphy by TCP on a preset socket. Here is my problem, how can I handle this?
Which class shoud my program extend?
Which Adapter should I use?
My program must be able to read what the delphy one is sending and i don't really know what structure it is in what it is in. So is there a class that can allow me to read it? Thanks for your future anwers.
Here is a sample of what I have thought but doesn't work.
Continuing on from my last post, I am posting my succesful output for the Day 2 Part 1 below.
A full explanation of Day 2 part 1 can be found at: https://adventofcode.com/2018/day/2 and the input can be found
at: https://adventofcode.com/2018/day/2/input
A brief description of this exercise is that you receive a sequence of strings.
You have to count the if any duplicate or triplicate chars exist in the string. Multiples will exist, but if you find multiple ldupicates / triplicates you will count them once.
At the end of sequence of strings you have to SUM the no.
I have a query that I would like to have refreshing at certain intervals lets say every 30 seconds with out refreshing the page content using the META TAGS
refreshes the whole page but I have a jquery function that will run at those intervals that I can use the problem is getting the jquery to call my COS function or is the way to do it with pure COS
<html>
<head>
<!--meta http-equiv="refresh" content="30"-->
<!-- Put your page Title here -->
<title> Cache Server Page </title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/
libs/jquery/1.3.0/jquery.min.js"></script>
<script type="text/javascript">
var auto_refresh = setInterval(
function ()
{
$('#load_tweets').load('#(..myquery())#').fadeIn("slow");
}, 10000); // refresh every 10000 milliseconds </script>
</head><body>
<div id="load_tweets"></div>
<script language="Cache" method="myquery" returntype="%Integer">&sql(select Count(*)INTO:COUNTER from Collection)
QUIT COUNTER
</Script>
</body>
</html>Hi all,
I'm facing the error 7802 ("Worker job/s unexpectedly shut down") when trying to work with the Queue Manager. Since today it was working fine, but suddenly today it started failing when arriving to the line:
Set sc=queue.WaitForComplete()
The method is pretty simple: first I invoke the queue manager by doing set queue=$SYSTEM.WorkMgr.Initialize("/multicompile=1",.tSc,64), and then into a loop I call a method exactly 64 times. Then after the first 64 processes are done, the system launches 64 more jobs.
After many sleepless nights it's a pleasure to announce the newer, better, moderner ObjectScript compiler which implemented pretty much everything you ever wanted to have in modern ObjectScript:
But we not only parse the modern ObjectScript syntax, we have implemented finally the long-standing request which we always dreamed about. Closures!
I have a wdsl soap request that now requires a header. Where do I modify the header to allow this new value to be sent?
<soapenv:Header>
<Headers xmlns="urn:epic-com.2013.Interconnect.Headers">
<Epic-Client-ID>12349fe5-2ff8-4b79-b723-e69efbabcdef</Epic-Client-ID>
Thanks
Scott
I am trying to base64 encode a string with non standard characters encoded in utf-8 also tried windows 1252 and I am getting error like so
ERROR <Ens>ErrException: <ILLEGAL VALUE>zEncodeStream+18^ -- logged as '-' number - @' set encString = $TRANSLATE($SYSTEM.Encryption.Base64Encode(streamString),$C(10,13))' any help appreciated if anyone has faced this before
I use Documatic a lot to generate class documentation from comments embedded in the code. Is there a good way to create documentation for SQL views as well? Ideally I want to document each column in the view with HTML markup similar to how I document each method of a class with Documatic.
Pieter Brueghel the Younger, Paying the Tax (The Tax Collector), 1640
In my previous article, we just skimmed the surface of objects. Let's continue our reconnaissance. Today's topic is a tough one. It's not quite BIG DATA, but it's still the data not easy to work with: we're talking about fairly large amounts of data. It won't all fit into RAM at once, and some of it won't even fit on the drive (not due to lack of space, but because there's a lot of junk). The name of our subject is FIAS DB: the Federal Information Address System database - the databases of addresses in Russia. The archive is 5.5 GB. And it's a compressed XML file. After extraction, it will be a full 53 GB (set aside 110 GB for extraction). And when you start to parse and convert it, that 110 GB won't be enough. There won't be enough RAM either.
I am having an intermittent issue that when I make a call to MSSQL from a BPL that the response does not come back in the amount of time required. Since the call from the BPL is synchronous I tried changing the timeout to 60 but it has not helped (see below). Is there anyway to guarantee that the call waits long enough for a response before continuing on?
.png)
Thanks
Scott Roth
Hi Community!
We are pleased to invite you to the upcoming webinar "Machine Learning Toolkit (Python, ObjectScript, Interoperability, Analytics) for InterSystems IRIS" on 26th of March at 10:00 (Moscow time)!
Is it possible to mimic what selenium does like navigating to a site and logging in and filling out a form then logout in COS.I am trying to do that in COS using %Net.HttpRequest class or should I be using a different class the idea is to be able to call a web app login into it and fill out form and log out
In recent discussion on CachéQuality I was (friendly) blamed for old syntax promotion and deliberate obfuscation of the code. Therefore I decided to clarify my point and shed some light on one of possible source of side effects that may unexpectedly occur with RETURN command with an argument.
what is the bullet point char value in COS the equivalent of •
Hi all,
Lets imagine that there's a process that locks an entry of a gived domain, in my example the ID 2 of the table User.tApplications and using an exclusive lock. Additionally the error handling is managed by a $ETrap routine wich will look for error data in order to log it
Set $ETrap "Do Err1^ErrRoutine"
Hello Gentlemen,
My Business process connector receive a Oru_01 hl7 message with an ED segment inside (Base64 pdf). How is it possible to extract it and create a pdf file within?
Here is the sample of function I have. I know it doesn't work but if you could help me, it would be perfect. Here is my function, the goal would be it create the file where I want and return me the link of the file.
Method getPdfFromED(req As EnsLib.HL7.Message,segment As %String) As %Status
{
do req.GetFieldStreamBase64(.base64, segment)
set stream1=##class(%Stream.FileCharacter).%New()
set stream2=##class(%Stream.FileCharacter).%New()
set sc = stream2.LinkToFile("\\chr13139\test\ceciEstUnTest.txt")
while 'base64.AtEnd {
set temp=base64.Read()
set temp=$translate(temp, $c(13,10))
do stream1.Write(temp)
}
do stream1.Rewind()
while 'stream1.AtEnd {
set temp=stream.Read(4000)
set temp=$system.Encryption.Base64Decode(temp)
do stream2.Write(temp)
}
do stream2.%Save()
return $$$OK
}