#Debugging

0 Followers · 168 Posts

Debugging is the process of finding and resolving defects or problems within a computer program that prevents the correct operation of computer software or a system.

Article Vachan C Rannore · Oct 21 3m read

Hello!!!

Data migration often sounds like a simple "move data from A to B task" until you actually do it. In reality, it is a complex process that blends planning, validation, testing, and technical precision.

Over several projects where I handled data migration into a HIS which runs on IRIS (TrakCare), I realized that success comes from a mix of discipline and automation.

Here are a few points which I want to highlight.

1. Start with a Defined Data Format.

0
0 0
Question Jean Millette · Oct 15

Can someone help me understand what type of user error (?) is going on here please?

One one system, I write out a group of $c() values and get the expected results:

USER>for i=250:1:260 { write i," ", $c(i),! }
250 ú
251 û
252 ü
253 ý
254 þ
255 ÿ
256 Ā
257 ā
258 Ă
259 ă
260 Ą

USER>w $zv
IRIS for Windows (x86-64) 2023.1.4 (Build 580U) Fri Apr 19 2024 11:16:07 EDT
USER>

On another system, I get some unexpected results:

0
0 0
Question Anna Golitsyna · Aug 7

For example, you start debugging the AAA function, which calls the BBB function, then goes to the CCC^ABC function in a different routine and ends up while executing XXX^XYZ. No other routines or functions are visited in this example. What I would like is to get the record of AAA -> BBB -> CCC^ABC -> XXX^XYZ. No marking each function with recording code should be involved: too time consuming, too many functions in real code.

UPD: Iris has built in %SYS.Trace for this purpose but this class is apparently absent in Cache 2017. Did not find any substitutes yet.

0
0 0
Article Guillaume Rongier · Jul 28 3m read

This will be a short article about Python dunder methods, also known as magic methods.

What are Dunder Methods?

Dunder methods are special methods in Python that start and end with double underscores (__). They allow you to define the behavior of your objects for built-in operations, such as addition, subtraction, string representation, and more.

Some common dunder methods include:

0
0 0
Question Yone Moreno Jiménez · Jun 23

Good morning,

We would need help, thanks in advance for your help. 🙂

We have been trying to debug the following error, when sending a DICOM from a "EnsLib.DICOM.Operation.TCP" to a PACs:

  ERROR <EnsDICOM>NoCompatibleTransferSyntaxFound: No negotiated transfer syntax for SOP class '1.2.840.10008.5.1.4.1.1.4' is compatible with document transfer syntax '1.2.840.10008.1.2.4.70'

We use the following AET titles at the Operation:

LocalAET: ESBSSCC-DCM

RemoteAET: HUNSCESBGWT

0
0 0
Question Colin Brough · Jun 26

I am attempting to follow the tutorial at Publishing Web Services Using Caché | Caché Web Services QuickStart Tutorial | Caché & Ensemble 2018.1.4 – 2018.1.11 to build a toy SOAP web-service using Cache but am running into what I suspect are permissions issues, or perhaps setting up the "plumbing" to get an incoming request to call the web-service methods.

Ensemble instance running on local laptop. Only the Ensemble private web-server installed on the machine (no IIS or Apache).

0
0 0
Article Shuheng Liu · May 16 9m read

1. A Motivating Example

Embedded Python has been around for a while. You probably followed the tutorials and learned about it. However, if you've tried to combine Python and ObjectScript in real development work, you probably ran into situations where you get an error message like this:

USER>Do##class(MyClass).SomeMethod()

ERROR #5002: ObjectScript error: <PYTHON EXCEPTION> *<class 'ZeroDivisionError'>: division by zero
0
0 0
Discussion Harshitha · May 30

Hey everyone,

I'm diving deeper into Caché ObjectScript and would love to open a discussion around the most useful tips, tricks, and best practices you’ve learned or discovered while working with it.

Whether you're an experienced developer or just getting started, ObjectScript has its own set of quirks and powerful features—some well-documented, others hidden gems. I’m looking to compile a helpful set of ideas from the community.

Some areas I’m especially interested in:

0
0 0
Discussion Eduard Lebedyuk · Mar 18

How do you collect stack info when debugging non-interactive jobs?

I cobbled this together today from the docs, but maybe there's something pre-built? LOG^%ETN()?

set stack = ""for loop=0:1:$STACK(-1) { 
      set stack = stack _ "Context level:" _ loop _ " Context type: " _ $STACK(loop) _ $c(10,13) _
                          "  Current place: " _ $STACK(loop,"PLACE") _ $c(10,13) _
                          "  Current source: " _$STACK(loop,"MCODE") _ $c(10,13)
}

Log meth

0
0 0
Question Colin Brough · Mar 10

We are calling a REST web-service from Ensemble using EnsLib.HTTP.OutboundAdapter and redefining the adapter class to set custom headers as described by @Eduard Lebedyuk here: How to set Content-Type

During development we accidentally stumbled across puzzling behaviour - we now suspect that the %Net.HttpRequest object created in the linked example is being reused in the following scenario:

0
0 0
Article Evgeny Shvarov · Feb 26 1m read

Hi colleagues!

Yet another time I figured that there is no super-simple way to display error from %Status variable, but I need it relatively often in a terminal.

Yes, I know about $$$ Macro, but they are not superhelpful in a terminal.

My usual behavior is to try to remember by heart or copy from somewhere the formula:

USER>w $System.Status.DisplayError(st)

0
0 0
Article Trent Chismar · Jan 28 2m read

ISCLOGs are a useful debugging tool provided with IRIS that can help you troubleshoot many different issues. For more information about creating these logs, please see the following IRIS documentation: "Logging".

This log is written to the ^ISCLOG global stored in the %SYS namespace. Each global node is a separate event, with additional information sometimes logged to the subnode.

0
0 0
Question Colin Brough · Feb 25

We have some ObjectScript code in a custom business process:

When Log Trace Events is ticked on the business process in the Production view in the management portal, the argument is obviously computed.

Our question is whether the argument is computed when Log Trace Events is not ticked? Don't want to accidentally include something in a $$$TRACE() statement that takes enough computation to make a performance difference when released to production, even though the final output is not written to the event log.

0
0 0
Question Evgeny Shvarov · Feb 21

Hi folks!

I'm building a very simple REST API.

But before testing it via a Web Server what I want to make sure that REST API methods work in principle.

Is it an easy way to "fake" the web-server request and get a result e.g. of the method with signature like that?

ClassMethod GetAllRecords(pRequest As %CSP.Request, pResponse As %CSP.Response) As %Status

e.g. calling it in Terminal?

0
0 0
Question Thembelani Mlalazi · Feb 10

I have an operation using $ZF this operation ran and did not error but the job has been active and it can not be stopped I have tried stopping it from the front end and through the terminal using ##class(ENSLIB.Job).%New() Stop method. Now my production will not update even if I add a new item to the production I cannot update the item is there a way to force stop  this job.

0
0 0
Question Colin Brough · Jan 10

We are using a DTL transformation to take HL7 and transform into custom XML. But the nodes in the resulting XML are appearing out of sequence - and therefore failing validation against the schema.

The XSD schema for the XML looks fine when imported into Ensemble: root node in the XSD looks like this:

And shows in Ensemble like this:

The transformation looks like this, and we can see the text from the trace elements at lines 5, 12 and 19 appear in the correct order in the event log:

HOWEVER, the resulting XML has the <allergies> nodes before the <patientNotes> nodes....:

0
0 0
Question Colin Brough · Jan 13

We are using a DTL transformation to take HL7 and transform into custom XML (XML is a virtual document, held in an EnsLib.EDI.XML.Document object). The schema specifying the format of the XML says one element should occur no more than 24 times (maxOccurs="24" in the XSD schema). However, the transformation to produce one such element always produces 24 elements, all but the last one blank, when tested stand-alone. And when the sub-transform producing one element is incorporated into the full transformation to produce the whole XML object, it produces the wrong output.Is this a bug in the

0
0 0
Question David Hockenbroch · Jan 8

I need to see the full SMTP trace when a %Net.SMTP attempts to send an email to troubleshoot an issue. As far as I know, the only way to get that is to uncomment line 192 in the %Net.SMTP class.

//:#define SMTPTRACE

I've done this in the past by giving myself the %DB_IRISSYS role, so I tried that. That database is also not mounted as read-only.

Of course the bigger issue here is that I can't seem to get that trace without having to edit a system class or create my own, but to fix my more immediate issue, what else do I need to check that would be preventing me from editing that class?

0
0 0