I have global with binary data, structured like:
^a(1)=<binary>
^a(2)=<binary>
^a(n)=<binary>
What could be easiest way to read it via Stream interface? I.e. to pass an adapter to a function expecting Stream?
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.
I have global with binary data, structured like:
^a(1)=<binary>
^a(2)=<binary>
^a(n)=<binary>
What could be easiest way to read it via Stream interface? I.e. to pass an adapter to a function expecting Stream?
Hi ,
I would like to know if there is possibility to disconnect child from parent in Parent/child relation and move child to Other Parent?
Object Synchronization is a feature that has been around for a while, since Caché days, but I wanted to explore a bit more how it works. I've always thought that database automatic synchronization is complex by nature but, for some particular scenarios shouldn't be so hard. So I considered a very simple use case (OK, perhaps the typical one, I'm not discovering anything... but if it's common and it works, it's good
). You can download from GitHub and compile it into your system, generate sample data and play a bit with
I have a list property that I query from the database to get the values contained in that list using $LISTFROMSTRING() when the list is returned the list values contain a rectangle like character similar to when you copy past something to the Terminal and it has a preceding space .The problem is I need to compare those values to other values and they do not match because of this value I have tried to use $EXTRACT(value,*W) and *P but this is not striping the preceding character how do I get rid of this character any ideas please.
Hello All,
I need some help:
I would like to create Web Application using our ZEN with Cache DB so please guide me.
1.What is difference between zen page and zen application.
2.what is the difference between Client Method and server Method then where to use it.
Thanks.
I have an OAuth 2.0 development environment where Caché is serving all three roles as the Authorization Server, Client and Resource Server based on a great 3-part series on OAuth 2.0 by @Daniel Kutac. I have a simple password grant type where an x-www-form-urlencoded body (as described in this post) is sent as a POST to the token endpoint at https://localhost:57773/oauth2/token and a response body with a HTTP Response 200 header is returned. The response body looks something like this.
How can I round to the next whole number?
.1 = 1
1.2 = 2
1.7 = 2
I got stuck with this for 2 days, please help me
Actually my logic is when I enter the input on the text field in browser, the entered input to be print on the next page but I am getting "Undefined". How to i do it.
Below is my code:
{
/// Class name of application this page belongs to.
Parameter APPLICATION;
/// Displayed name of this page.
Parameter PAGENAME = "userLogin";
/// Domain used for localization.
Parameter DOMAIN;
/// This Style block contains page-specific CSS style definitions.
Hello gentlemen,
here is my question: I would like to delete files one by one (not all at a time because I need to check somethinkg to delete it or not) in a defined folder but how can I handle it? I have used the extension :
EnsLib.File.PassthroughService
But it only works when a file is moved in my folder. But I want to launch my program everyday (with a planifier) in the purpose to delete file that more that 2 months old.
Hello,
I am struggling to print out the actual property values of the Security.System class.
https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.c…
I was hoping to be able to print the Authentication Enabled properties of a system from the command line using the Get or GetProperties class method. Currently, however, I am only able to get a return 1 or Invalid Oref error.
I would expect one of these to work, but I think I am missing something. Any tips?
%SYS>w ##class(Security.System).Get("
1
%SYS>w ##class(Security.System).
0 {?
Hi all, I have released the latest version of VSCode extension for ObjectScript already a month ago, and finally a time for the info about this new release.
So, what's new in the release:
For details how it works now, look further.
A SOLID Design in Cache Object
In this session, we will discussing SOLID Principle of Programming and will implement in a example.
I have used Cache Object Programming Language for examples.
We will go step by step to understand the requirement, then what common mistakes we use to do while designing, understanding each principles and then complete design with its implementation via Cache Objects.
If you have any questions or suggestions, please write to me - sethisourabh.hit@gmail.com
CodeSet - https://github.com/sethisourabh/SolidPrinciplesTraining
Hi,
I have a method that has multiple parameters and is normally used from other classes in ObjectScript. Most of the parameters have default values. Withing the server code that's perfect. In some areas I can call myMethod(,,"sometext") or myMethod(tVariab) and thats fine... I use it as it's required in each place.
But now I want to expose it as a REST service so I need to buld a kind of wrapper.
Hi Everyone!
Please watch the new video on InterSystems Developers YouTube, recorded by @Sourabh Sethi in the "Coding Talks" format:
Informative and Fast WEB API VIA ObjectScript and Ensemble/HealthShare
Hello ,
Need some help to write a Request message to the File using EnsLib.File.PassthroughOperation class.
Request object is sent to the Ensemble operation has below simple structure.
{
Property SiteCode As %String;
Property HospitalCode As %String;
Property PatientFirstName As %String;
Property PatientLastName As %String;
Property EncounterId As %String;
}
But in the operation i am getting error
ERROR <Ens>ErrException: <PROPERTY DOES NOT EXIST>zOnMessage+1 ^EnsLib.File.PassthroughOperation.1 *Stream,ABC.Req -- logged as '-'
number - @'
Quit:'$IsObject(pRequest.
Pre-requisite - Basic knowledge of ENSEMBLE and ObjectScript
My both previous sessions were related to OBJECTSCRIPT.
This time, we are going to add a flavour Ensemble/Healthshare,
to be informative and fast.
In this session we are going to discuss about -
"Informative and Fast WEB API VIA ObjectScript and Ensemble/HealthShare"
Web API can be REST or SOAP. We will taking example of SOAP in this session.
However, whatever I demonstrate today, will also be applicable for REST.
In many projects I was faced with storing hierarchical data (tree) in classes.
By tree, I mean such data, where each node has a parent node — an object of the same class.
Many examples of such data can be given. For example, a catalog in the online store. Suppose that this online store sells books, in this case, the category tree might look like this:
The number in front of the name is the category ID.
For storage, you can create classes:
The MyApp.Category class is used to store the category tree and contains the property “Parent” - reference to the same class.
In this article we are going to compare $Increment and $Sequence functions.
First of all, a note for readers who have never heard of $Increment. $Increment is a Caché ObjectScript function which performs an atomic operation to increment its argument by 1 and return the resulting value. You can only pass a global or local variable node as a parameter to $Increment, not an arbitrary expression. $Increment is heavily used when assigning sequential IDs. In such cases parameter of $Increment is usually a global node. $Increment guarantees that each process using it gets a unique ID.
Hello,
Is it possible to write global output values to STDOUT, in a similar way to how csession can take routine intput, like below:
(In Cache Terminal)
%SYS>d ##class(%SYSTEM.License).
License Server summary view of active key.
Distributed license use:
Current License Units Used = 1
Maximum License Units Used = 1
License Units Authorized = 200
Local license use:
Current Connections = 1 Maximum Connections = 1
Current Users = 1 Maximum Users = 2
(From Linux OS Terminal)
[jhipp@test-sbox ~]# csession TEST "##class(%SYSTEM.
Hello Community,
How do i disable an operation explicitly based on a value in a variable?
I set the ReplyCodeAction to E=D.
In the Operation Code i am throwing an explicit ERROR
But my operation still remains up.
Any suggestions please will be appreciated.
Thanks,
Jimmy Christian.
I'm not saying that this is in anyway "best practices," but I'm in a peculiar situation where I need to restrict users from starting a "retired" Ensemble Production in a namespace that's been renamed. It's still an "Ensemble-activated" namespace; we need to keep it available for Ensemble Message Viewer access ... fortunately, only for a little while.
It's a bit of a hack ...
Open the Production class in Studio and add the following classmethod:
ClassMethod OnStart() As %Status
{
Return $system.Status.Hello community! I have to work with queries using all kinds of methods like embedded sql and class queries. But my favorite is dynamic sql, simply because of how easy it is to manipulate them at runtime. The downside to writing a lot of these is the maintenance of the code and interacting with the output in a meaningful way. In an effort to have as much dynamism as possible so that we're not rewriting code constantly, and so that we have as little code possible (while still making sense and getting the job done), I made a function that takes in any dynamic query and outputs a dynamic object.
Hi Everyone!
Please watch the new video on InterSystems Developers YouTube, recorded by @Sourabh Sethi in a new format called "Coding Talks":
A SOLID Design in InterSystems ObjectScript
Hi Everyone!
You're very welcome to watch the new video on InterSystems Developers YouTube, recorded by @Evgeny Shvarov in the new format called "Coding Talks":
GitHub Flow with InterSystems IRIS: Edit with VSCode, Test with Docker, Commit, Push, Pull Request
Hi guys!
What is the IRIS analog for Ensemble.INC?
Hi all,
I have a class that I want to serialize to JSon. So I'm using the object %ZEN.Auxiliary.jsonProvider)
set myClass = ##class(myapp.myclass).%New() set myClass.property1 ="value 1" set myClass.property2 = "value 2" set myClass.property3 = "value 3" do ##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(.tStream,myClass ,,,1,"ed") write tStream.Read()
By definition of myclass, all properties are serialized, that's fine. But I want not serialize the property3. I think is using a XML attribute in the property, or something about. But I didn't find anything about.
Hi Everyone!
You're very welcome to watch the new video on InterSystems Developers YouTube, recorded by @Sourabh Sethi in a new format called "Coding Talks":
Locking in InterSystems ObjectScript
Hi, I am trying to transform a message to meet a third party specification, and would like to know if you can advice me on how to separate a single OBX segment into several segments based on a '.'
I would like to separate the segment where the . [marked in red] is into another OBX segment. So the next segment would be:
OBX|2|TX|R^REPORT^L|1|Patient had lumbar spine MRI ~ Patient also had barium swallow ~ Patient has good alignment 99%perfect ~ Patient has aspiration visible
Is there a way to do that?
Would appreciate your advice on this
Regards,
Eric
All,
I'm using Cache 2014.1 in an openVMS environment.
If I have multiple RMS files to clean up, for example.
!DIR MEMBER_EXTRACT.*;*
MEMBER_EXTRACT.CSV;2 MEMBER_EXTRACT.CSV;1
MEMBER_EXTRACT.PROC;1 MEMBER_EXTRACT.TXT;3
MEMBER_EXTRACT.TXT;2 MEMBER_EXTRACT.TXT;1
S FILE="MEMBER_EXTRACT.*;*"
Do ##class(%Library.File).ComplexDelete(FILE)
!DIR MEMBER_EXTRACT.*;*
MEMBER_EXTRACT.CSV;1 MEMBER_EXTRACT.TXT;2
MEMBER_EXTRACT.TXT;1
Total of 3 files.
What would be the best way to delete all the files using the ComplexDelete class