I am receiving the following error in my buisness operation:

ERROR <Ens>ErrException: <UNDEFINED>zGo2+181^mb.MbMainOperation.1 *tSC -- - registered as '-' number - @' set pResponse = ##class(mb.MbMessageResponse).%New()'

From what I understand, the problem occurs in the generated int file mb.MbMainOperation.1 in the method zGo2, with the offset of 181 lines, and the variable in question is a local variable tSC.

However, the line where the error occurs does not refer to tSC in any way

0 3
0 186
Question
· Dec 2, 2021
SNN Encryption

I need to store an equivalent of the SNN (Social Security number). I need it to be encrypted and I'll have to be able to search for it once stored.

For what I've seen my options are:

- SHAHash from the %system.encryption library. Simple and easy to implement. My question is, might collisions be a problem? We are talking about a 10 millions entry.

- AES encryption. In this case I'd like to know if there is a standard way for key management in the InterSystems environment.

0 2
0 295

Hello everybody.

My question originated when trying to help a coworker...

There is a system module, specifically a ClassMethod that inserts records into a table as per the pseudocode below:

set Obj = ##class(FooSchema.FooTable).%New()
set Obj.fooProp = fooValue
// Other Foo properties //
set status = Obj.%Save()

From time to time, when trying to save the object, an error , informing that it was not possible to obtain the exclusive lock on the table instance

0 2
0 194

Hi all,

In the days when I was still using studio, the indentation character of choice was tab, due to misalignment of code when using non-monospaced fonts.

In VSCode when I create new class files, this defaults to 4 spaces. Where and how do I set the default indentation for ObjectScript class files?

Also, with python it should be spaces. So what is recommended when doing python script inside objectscript classes?

Thank you.

0 2
0 329

Example:

Method Execute (args...) As %Status {
...
 #dim statement as %SQL.Statement
 set statement = ##class(%SQL.Statement).%New(2)
 set statement.%Dialect = "CACHE"
 do statement.prepare(query)

 #dim rs as %SQL.StatementResult
 set rs = statement.execute(args...)

My questions are: 1) how do I get the size of args **2) how to get all values of **args **3) is it possible to modify the **args?

0 6
0 236

Hello,
as i'm trying to develop a operation and its methods (SQL adapter), I'm running into issues when i run my test class.
I have the class i want to test in the very same folder as my test class.
I followed the tutorial in the documentation.
When i run the test class, i get the following message error :

LogStateStatus:0::ERREUR #5002: Erreur Cache: <METHOD DOES NOT EXIST>zTestAdd+1^unitTests.testMyClass.1 *myMethod,Package.BO.MyClass

Here is my test class (heavily inspired bythe documentation :-) :

0 3
0 262

I am currently debugging a piece of code relying heavily on macros. I am using breaks in the method to then check the values of macros and object properties as I go. However, any time I invoke a macro within a break I get an error. To get around this I am converting the macro calls into the underlying code. Some of these macros have messy translations and this is somewhat time consuming. Is there an easier way to access macros from within a break?

0 5
0 152
Question
· Nov 20, 2023
Working with Named Pipes

While creating my latest examples for the JavaContest I faced the need
to communicate with my code from a program in IRIS to my Java code.

Communication with |CPIPE| worked as READ or WRITE but not both?
In the Documentation Named PIPEs are explained rather shortly.
"Once open, a pipe acts like an ordinary device." Not so precise.
I failed to achieve my expected READ/WRITE as TCP would offer.

0 4
0 219

With help from others here I had developed some code to take a Base64 PDF within a OBX.5 and save it locally to the file structure on the server.

I had to make a change to the code to return me a String so I can pass the Path back into Ensemble to use it in the message. When I made this change I am getting " ERROR #5034: Invalid status code structure ("/ensemble/data/transfer/AncillaryPDF/TMSAUDIO/Apr-11-1/980512729TMSAUDIO1046784936436537800.pdf")"

Here is the code...

0 3
0 1K
Question
· Jun 19, 2017
Date Filtering Functionality

I have come across several cases where I need to set a Date filter to send only send any admit/scheduled date past a certain point. We have a couple different date comparison functions but none looking at the true date. Most of them are date + 15 or etc. Does anyone have a good date function they have written to say if x > 20170102 ?

Thanks

Scott

0 14
0 2.1K
Question
· Jul 27, 2017
Get STACK of another process

Hi,

How can I read the stack of another process?

I know about ^JOBEXAM, but I only know how to use through terminal, and I need to get a string, or at least do a method that returns me a string

For example:

I have process A and B

B monitors process A at each second.

B logs information about process A in a table

Informations about lock I get through %SYS.LockQuery and the process through %SYS.Process

0 2
0 493

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

0 13
0 1.3K
Question
· Feb 9, 2018
SQL prepare error

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.

0 5
0 1.1K

I have a class that has a property calledTags (like DescriptiveWords, but tags), where multiple tags are possible. I am trying to decide on list of Objects vs. array of Objects.

Based on this post: https://community.intersystems.com/post/querying-list-property-sql, sounds like using an array of Objects is the better way to go. Indeed, I already noticed that it's not possible to have duplicates when using an array of Objects.

0 4
0 798