User bio
404 bio not found
Member since Oct 23, 2023
Replies:

The first error means that you aren't calling the method/routine correctly. See the <NOLINE> error code in this doc page: https://docs.intersystems.com/iris20231/csp/docbook/Doc.View.cls?KEY=RER... . Are you sure $$ConvertToMTime is the right name?

As for the second error: unlike most other programming languages, just calling a routine/method does not work in M/ObjectScript. Every line of code must use a command; in this case what you are looking for is the DO command: https://docs.intersystems.com/iris20231/csp/docbook/Doc.View.cls?KEY=RCO...

So, when calling a method/routine, you would write 'do ConvertToMTime(h,m,s)'

I'm not sure about TABLOCK specifically, but there are a couple other features that might help you solve this:

First, there is the LOCK TABLE statement: https://docs.intersystems.com/iris20241/csp/docbook/Doc.View.cls?KEY=RSQ...

There's also the objectscript LOCK command: https://docs.intersystems.com/iris20241/csp/docbook/Doc.View.cls?KEY=RCO...

You could use either of these to block the method while other instances of it are running and prevent the race condition. I'm not sure how efficient this method would be compared to TABLOCK, but it would fix the bug.

I hope this helps!

I'm not entirely clear on the question you are asking - if you just need to add quotes to a string, you can do so by escaping with another quotation mark. For example,

set b = """Cat""" // That's 3 quotation marks in a row on each side: one to open/close the string, two to add the quote character to the string

set c = b

w c
"Cat"

If you are asking how to display the quotes without actually adding quotes to the string, I'm not sure if that's possible - would need a more experienced dev to chime in.

Certifications & Credly badges:
Nick has no Certifications & Credly badges yet.
Global Masters badges:
Nick has no Global Masters badges yet.
Followers:
Nick has no followers yet.
Following:
Nick has not followed anybody yet.