%XML.Reader.OpenFile fails with SAX XML Parser-Error: <STORE> on importing large (1.5 GB) xml file. Any workaround for it?
My goal is one-time import of the file using classes generated by its XML schema.
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.
%XML.Reader.OpenFile fails with SAX XML Parser-Error: <STORE> on importing large (1.5 GB) xml file. Any workaround for it?
My goal is one-time import of the file using classes generated by its XML schema.
Looking for official guidance concerning the pitfalls of mixing Object Script with legacy MUMPS in the same .INT and/ or .MAC. Thanks, R
Hi,
I'm trying to send emails to a distribution list but it doesnt work. However, When I send emails to individual emails it works fine. Is there a configuration that I need to be checking or enable?
I'm doing it within a Business Operation:
Set SendList="grouplist@email.com, eric@email.com"f a1=1:1:$l(SendList,",") s ToAdd=$p(SendList,",",a1) d .Set Mailer = ##CLASS(%Net.SMTP).%New().Set Mailer.smtpserver = "10.xx.200.000".Set Msg = ##class(%Net.MailMessage).%New().Set Msg.From="manager@email.com.Do Msg.To.Insert(ToAdd).Set Msg.Subject = "Sample Email to distribution list".S
Sometimes, we need to copy part of the properties of an object into a different one.
The simplest thing would be to do the following:
Set obj1.FirstName = obj2.FirstName
Set obj1.SecondName = obj2.SecondName
What happens if the object contains a large number of properties? or we just want to extract an important group of data, and complement the information in another object?
Having the following classes:
Class Kurro.PersonalInfo Extends %Library.SerialObject
{
/// Code of personal
Property Code As %String;
/// First name of personal
Property FirstName As %String;
///Hi ,
Does anyone know how to dynamically set a variable, for example
set Counter = 1
set x_Counter ="test" in Cache Object script. I tried with EXECUTE XECUTE ("set x"_Counter "="_DIAGS_""), but it does not work.
Thanks
A function iterates global ^data(a,b,c) with $order using 3 nested for-loops. At certain point, for example with a=10, b=20, c=30, the function exits and later has to resume the iteration from the same point. What could be easiest way for it? My solution looks too ugly.
I was wondering if there was a way to easily identify the node depth of a global.
Take the following global example. Is there way to determine the depth is 3?
s ^global("first","second","third")="some^info^here"Morning guys I have a SQL operation that I use to read data and results to a record map. But seems to have trouble saving the objects to a record map as I get this message
ERROR ErrException:
zInsertObject+2^%Library.RelationshipObject.1 -- logged as '-' number - @''
please help here is my code let me know if I missing anything thank you in advance
Method OnRequest(pRequest As DQToolsSet.PrimaryMessageREQ, Output pResponse As HSCIC.DBS.RequestRBAT) As %Status
{
#dim status as %Status=$$$OK
#dim resultSet as %SQL.StatementResult
set
I've collated a list of public Caché Projects that I've been able to find through GitHub topics and various other searches, let me know if I have missed any and I will add them to the list.
The full list is here...
https://github.com/SeanConnelly/Public-Cache-Projects/blob/master/README.md
I've been writing ObjectScript for a long time and was a little surprised by this behavior so I'd like to understand what is going on.
I was doing a peer review on some source which had roughly the equivalent of the following line:
Set myRecord = ##class(MyObj.Record).%OpenId(id) Set emailList = previousEmails_","_myRecord.RecordGroup.EmailList
I flagged it for further testing because the code didn't check if RecordGroup was set and I knew that not all records were part of a Group so I was expecting that in cases where it wasn't set this line should throw an <INVALID OREF>
However, it turns out
Hello community,
I need to perform some processing-heavy operations on a set of input objects and I would like to utilize more than a single processor core to do the heavy lifting.
Is there any way to call methods in parallel and wait for the results in a blocking way?
Basically, I am looking for an equivalent of the pythonese
with Pool(n) as p:
results = p.map(function, data)
Thanks
Jiri
EDIT: Correct English :)
This series of articles aims to address the following topics:
WRF to below example my idea is to check whether red is present in the list mylist. You can very well use LINQ on enumerable in C#
mylist.Where(x => (x.Property2 == "red")).ToList().Count;
set mylist=##class(%ListOfObjects).%New()For i=1:1:2 {S object = ##class(User.NewClass).%New()
Sobject.Property1=iS object.Property2="red"do mylist.Insert(object)}It can be done with iterating over mylist
for j=1:1:mylist.Count(){Set item = mylist.GetAt(j)
If (item.Property1 = "red") { // get the count }
//set exist = item.Find("viv",1)}Hi Guys,
Can you please advise on the below queries.
Query 1:
Example 1:
S a="345",b="arun",c="kumar",d="hi",e="yello",f="orange"
Example 2:
S a="345" S b="arun" S c="kumar" S d="hi" S e="yello" S f="orange"
Can you please advise me, which one is performance wise is better.
Query 2:
Example 1:
S:a=1 R="Arun"
Example 2:
I a=2 R="Arun"
Please advise me, which one is giving better performance in this.
Any lead would be appreciated.
Thanks,
Arun Kumar Durairaj.
Set httprequest=##class(%Net.HttpRequest).%New()
Set httprequest.Server="www.intersystems.com"
Do httprequest.Get("/")
Do httprequest.HttpResponse.OutputToDevice()
Do httprequest.Get("/cache/")
Do httprequest.HttpResponse.OutputToDevice()The above is the code which i found in this link http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?…
How do the above code works and can i be able to run this?
Thanks in advance.
I want to disable / turn off the visible cursor and then re-enable from with a Cache MUMPS (COS) routine.
Can anyone advise please ?
I am using the free Intersystems Cache installation (CachePCkit V2017.1) on Windows 10 for my own use & personal development.
Does anyone have a function they built to change a name from all lower case, or all upper case to mix case?
Thanks
Scott Roth
The base class Bmap.Person defines persons within an organization distributed
by various countries. All records are indexed by (Country, PersonalId).
this structure doesn't allow use of bitmaps.
So a wrapper class Bmap.PersonQ around the data eliminates the top level of
the index (Country) and isolates the PersonalId (%Integer, MINVAL=1).
We are ready to use a Bitmap index.
A few performance figures on 300010 generated records.
You see that Relative Cost are sometimes quite misleading.
base
select count(*) from Bmap.Person
300010 global references 1600446 lines executed
demo 1
selectIntersytems documentation says not to hold entire SDA as object in In-memory.
// Serialize Object to XML
Set object = ##class(User.NewClass1).%New()
s object.Property1="one"
s object.Property2="two"
s object.Property3="three"
s object.Property4="four"
Set w=##class(%XML.Writer).%New()
set w.Charset="UTF-8"
Set w.Indent=1
set status=w.OutputToString()
set status=w.StartDocument()
Set status=w.RootO
I'm trying to learn how To use SQL in CACHE, so I hope I don't bore you with "Dumb" questions....
I'm getting "ERROR #6022: Gateway failed" message following this line of code.
s sc=gc.Prepare(hstmt,pQuery)
This line of code comes from an example I found in the documentation. pQuery is the "Select" statement setting up the variables and tables I'm trying to pull information from.
What does that error indicate?
Thank you.
Hi Guys,
I would to know, I have a drop down list items in my applications. While, am clicking on the drop down bx, there are few numbers of listed items, while am doing mouse over action, I should display the entire text of selected item from that drop down list box, even am not selecting that item. I would like to know about the what is exact text it contains in Zen framework.
If any lead would be appreciated.
Thank you in advance.
I am trying to determine the write-access to a windows-directory, using the method %File.Writeable(
Note:
Any help is appreciated. Thanks in advance... :-)
I am using terminal but I have some problem with it.
I use $C(1) (ascii code 1) to separate data but I can't see it in the terminal and This is really hard to see in the table.
So I want to get you guys good brain and skill :)
how can I see it in the terminal ?
Terminal(intersystems) :
I can't see anything
another program :
It replaced ascii code 1 (=SOH) to ┌ (Special Character)
I want to see like another program in Intersystems's terminal.
Thank you smart developers!
Hi Guys,
I would like to know, how to setup a global structure in Cache classes storage type.
I want to set a global like below in Cache classes using Storage methods.
^A("ID1")="Name\Abb\Map"
^A("ID2")="Name\Abb\Map"
^A("ID3")="Name\Abb\Map"
...If any lead it would be appreciated.
Thanks,
Arun Kumar Durairaj.
Hi,
I have an Atelier question.
I have a routine developed in Studio to upload a tab-delimited text file to process using Objectscript into Cache.
In Windows, to upload the file “test.txt”, I used the Objectscript commands,
Set uploadfilename = “c/testdata/RNAseq/GDC download 11-19-17/GDC download 11-19-17 counts/GDC download 11-19-17 unzipped/test.txt”
set file = ##class(%Stream.FileCharacter).%New()
set file.Filename = uploadfilename ; pass in the file name of the file you want to open.How should this be done on a mac?
Should I use the UNIX,
Set uploadfilename = “\Users\petIs it possible to have a, b, c, d, e, and f as a counter instead of the counter being numeric? See below...Epic would like us to set OBX.4 using a alpha numeric combination.
OBX|4|ST|69548-6^Genetic Variant Assessment|1.a|Mutation IDH1:Not Detected||||||F OBX|5|ST|69548-6^Genetic Variant Assessment|1.b|Mutation IDH2:Not Detected||||||F OBX|6|ST|69548-6^Genetic Variant Assessment|1.c|Mutation NPM1:Not Detected||||||F OBX|7|ST|69548-6^Genetic Variant Assessment|1.d|Mutation RUNX1:Detected||||||F OBX|8|ST|69548-6^Genetic Variant Assessment|1.e|Mutation TET2:Detected||||||F
I am trying to come up with a way to decode the Base64 we receive in an HL7 message into a PDF file and save it in a directory on our AIX machine. I thought I had the following working at one time but I am having issues. Has anyone done this before?
ClassMethod DecodeBase64HL7ToFile(base64 As %Stream, Ancillary As %String) As %Boolean
{
set Oref = ##class(%FileBinaryStream).%New()
set Oref.Filename = Ancillary
Do base64.Rewind()
While 'base64.AtEnd {
set ln=base64.ReadLine()
set lnDecoded=$system.Encryption.Base64Decode(ln)
do Oref.Write(lnDecoded)
}
Do Oref.%Save()
quit 1
}
Thanks
Scott
Hi,
My doubt is about the SQL Query in Caché:
I don't want to take all results from the table and orgainze them manually, for example: I have a table with 50 records, but I only want to select 10 records, being from tenth until the twentieth and this without knowing their IDs.
So, how can I do this, without losing performance, there is any way?
NOTE: In other SQL languages I can do, for example, SELECT * FROM extbl Limit 10 OFFSET 10
Thanks,
Andrei L. Nenevê
What happens if you don't declare a Persistent value when you call ExecuteQuery()? What does Ensemble set as the key value for your query? I have a query that I've executed on SQL Server, and I get 15 rows, but because this is my second time querying the data Ensemble thinks it exists.
The Method in question is SelectProviderClarityAudit. If I call this query multiple times it is not returning the same number of results each time in Ensemble.
Class osuwmc.CPD.ClarityDBPoll Extends Ens.BusinessOperation [ ClassType = "", ProcedureBlock ]
{
Parameter ADAPTER = "EnsLib.SQL.OutboundAdapter";
Paramete
This is probably a very naive question but :
Is it possible to create a Windows executable file from a Cache MUMPS (COS) routine, such that the routine can be run directly from Windows ?
If so, could some kind soul direct me to a source of information that describes the process.
I am using the free Intersystems Cache installation (CachePCkit V2017.1) on Windows 10 for my own use & personal development.
Thanks