This is good work, but there's actually already a built-in function for this in %SYSTEM.SQL.Functions.LASTDAY().
- Log in to post comments
This is good work, but there's actually already a built-in function for this in %SYSTEM.SQL.Functions.LASTDAY().
I've had to do this a time or two in a development environment. Sometimes you can find it under System Operation > Processes and terminate the process. If that doesn't work, you can look at the process ID of the process and kill it at the OS level (the kill command in Linux, or taskkill in Windows). Just be aware that depending on what it's doing and how the task was written, you may end up with some weird stuff.
SQL gateway connections provide a way to make an ODBC or JDBC connection to an external data source. It can be another IRIS instance, but doesn't have to be. So whatever you can do with either of those kinds of connections, you can do with the SQL gateways.
This might be easier to do with XPath rather than a loop.
First, you'll need to create a %XML.XPATH.Document object, maybe using the create from string method:
set sc = ##class(%XML.XPATH.Document).CreateFromString(xmlstring,.mydoc)
Check that the status you get back from that is not an error. If it isn't, you mydoc should be an XPath document. Then you should be able to use the EvaluateExpression method of that document to get what you want, something like:
set sc = mydoc.EvaluateExpression("/Msg/Parties/Party[AgentId=1]/OrgCode","",.value)
If that status is okay, the value you're looking for will be in value, unless there are multiple XML nodes that match that path. W3 provides the XPath syntax specification here.
The only way I can get it to succeed at a test from the SSL configurations setup screen is if I check SSLv3 under the Protocols in the Crytographic settings, then have it test smtp.gmail.com, port 465.
Where are you seeing this error? What's running and trying to connect?
Is that what you want to do, or should you be defining your property as:
Property Status As %String(VALUELIST = ",InProgress,Done,Canceled") [ InitialExpression = "InProgress" ];
This makes InProgress the default status when a new CarDealer.Order is created.
If you have a routine that's saved as MyRoutine.mac, that would be:
do $$^MyRoutine
If you have a method within the MyRoutine.mac called Process, it would be:
do $$Process^MyRoutine(myargs)
Where is the function func1? If it's in a routine, you'd use do $$func1^MyRoutine where MyRoutine is whatever the routine is called.
I'm not sure you can do that, but is there any reason you can't define it as two web applications, one with the dispatch class and one without?
Are you sure that's where your problem is? If I do:
select MONTH(dateadd(mm,-1,GETDATE()))
I get 12. If I create a query with a where clause similar to yours on my data, it works as expected.
A parameter is a shared, constant value that's available to all instances of a class. It can be calculated when the class is compiled, but it generally can't be altered at runtime.
A property is a variable that each instance of a class stores it's own value for, and it can be set changed at runtime.
Here's some documentation on the INTO clause.
As Robert already said, though, it's a way to do an embedded query and store the result columns into variables in the host language.
We're still using a combination of Crystal Reports and ZEN reports, but also looking into Intersystems reports. I don't have much to say yet, other than that I'm also interested in this topic.
Make sure your user account has an appropriate role (like %Developer or %All) and also make sure you aren't using all of your licensing.
The last couple of times I tied this, it told me it couldn't find the jar file to download. I got it from the dev directory on my IRIS server and configured it manually.
You can send texts through SMTP if you know the SMS gateway for the service provider. Several of these should be preconfigured on your instance of Cache or IRIS under System Administration, Security, Mobile Phone. You use the phone number @ that server as the email address to send to. For instance, if the phone number was 999-999-9999 and it was on AT&T, you'd send the email to 9999999999@txt.att.net.
So that's one way to do it, but I'm sure there are better ones.
Where I've used that second option to get an IP address, I've noticed that if the client has more than one IP address, it can return different ones different times, and I'm not sure how it determines which one.
I still can't see my csp files or .bas routines in VS Code. What do I have wrong?
Is there much of an API for Intersystems Reports? We've used a lot of Zen reports as part of our ERP system where we're feeding parameters to a report and generating it to a stream, or emailing it as an attachment, or saving it to a file.
I don't see anything in that list about them.
I'm concerned that we're getting rid of something without really having a suitable replacement just yet.
Marc, I'm not asking about doing all of that from within the Intersystems report server. I'm asking about doing it from, say, an ObjectScript routine within IRIS.
Where you're using document.getElementById() in javascript, you're probably not getting the right element. If you right click on the element and inspect it in your web browser, you'll see that it has an id like zen13 or something similar.
Instead of document.getElementById('loading') try using just zen('loading'), for example:
zen("loading").style.display = "none"
I don't believe you can do that without an ActiveX control for a Windows client. You might be better off figuring out how to present whatever it is you're trying to print for the user - either display it in the browser, or let them download the document - and letting them print it from there.
Do the methods in %JSON.Adaptor meet your needs?
After using your %ExecDirect() method, you should have a %SQL.StatementResult Object. Let's assume you called this object rs (for result set). So you did something like set rs = ##class(%SQL.Statement).%ExecDirect(blahblahblah). From there:
//Get the list of columns
set cols = rs.%GetMetaData().columns
//Loop through the result object
while rs.%Next(){
//Loop through the columns
for x=1:1:rs.%ResultColumnCount{
//Get the value of each column
set colValue = rs.%GetData(x)
//Get the name of each column
set colName = cols.GetAt(x).colName
//TODO: Add whatever you're doing with the name and value here
}
}
The columns have a clientType property. Is that what you're looking for? That would be:
set colType = cols.GetAt(x).clientType
That will get you an integer that corresponds to a data type, as documented here. So if that clientType is 1 it's Binary, 2 is a date, 3 is a double, and so on.
@Luis Angel Pérez Ramos, you're looking at the deprecated %Library.ResultSet class. If this is using IRIS 2023.1, it's probably starting from a %SQL.Statement, and the ExecDirect method is returning a %SQL.StatementResult, which doesn't have that method.
I believe that's an object handle. You could have a table with a column that contains ObjectScript objects, and in that case the query would return a reference to that object.