I am trying get the Unix time stamp in milliseconds

set epochSecond= $ZDATETIME($ZTIMESTAMP,-2)*1000

but the result is not accurate as $ZDATETIME ignoring /truncating the fraction of the seconds and the milliseconds calculation is not accurate with fraction seconds

for example

set epochSecond= $ZDATETIME($ZTIMESTAMP,-2)

1675830682

when its converts to the milliseconds

it became 1675830682000. not the accurate fractional seconds.

My target system looking for the milliseconds time stamp to authenticate.

0 3
0 275

So, I know that I can return a SQL Error message from my SQL Procedure written in ObjectScript, with code like this

$ cat <<EOF | irissqlcli iris://_SYSTEM:SYS@localhost:1972/USER
CREATE or REPLACE PROCEDURE test()
LANGUAGE OBJECTSCRIPT
{
 SET %sqlcontext.%SQLCODE = 400
 SET %sqlcontext.%ROWCOUNT = -1
 SET %sqlcontext.%Message = "test error message"
};

CALL test();

EOF
[SQLCODE: <-400>:<Fatal error occurred>]
[Location: <SPFunction>]
[%msg: <test error message>]

But I did not find how to do it with Python. I can't find %sqlcontext variable available there

0 1
0 166

I copied a 5 MB messages.log file to AWS where I have iris-log-viewer app deployed. I ran the test to see how it takes in IRIS code to import the lines into a persistent table:

IRISAPP>set m5mb="/home/irisowner/irisdev/messages.old_20221231.log"

IRISAPP>

IRISAPP>do ##class(otw.log.irislogreader).Test1(m5mb)
Test1 begins at 02/05/2023 12:49:30
ReadLogLines
/home/irisowner/irisdev/messages.old_20221231.log
Open
Test1 ends at 02/05/2023 12:49:34
Test1 execution time: 3.500789

select count(*) from otw_log.Log

63239

0 7
0 198
Question
· Jan 26, 2023
Line Separator

Hello all,
I am facing a little issue with line separators. I export classes with $SYSTEM.OBJ.Export to the file system, but I'm on a Linux (docker) environment and he uses LF.

Is it somehow possible to change the line separator for the export or in general?

Thanks in advance!

Bests, Matthias

0 6
0 255

Hello all,

I am hoping someone can give me some guidance.

I have this code below; please see below. It works perfectly fine. However, when I use a different target, it is not working. 0 files were copied.

w $ZF(-100,"/SHELL /LOGCMD","copy","C:\DICOM\IMAGE\IMAGE1.DCM","E:\IMAGE\COPIEDIMAGETEST1.DCM")

0 3
0 250

Hi All,

I am currently using D $SYSTEM.SQL.Shell() command or management portal to retrieve the data from database. I just learned we can also run cache table sql queries in MS access. MS access already installed on my machine.

I need to ask how I can connect my database of USER or sample namespace in MS access to run these SQL queries.

Thanks in advance!!

0 4
0 205
Question
· Jan 26, 2023
Using ODBC on linux

I already have a working setup with:

- Ubuntu 21.10
- Unixodbc 2.3.6
- ODBC-2018.1.5.659.0-lnxubuntux64
- libcacheodbcur64.so

I have tried to update to:

- Ubuntu 22.04
- Unixodbc 2.3.9

But, i am getting "SQLDriverConnect: 0 [unixODBC][Driver Manager]Driver does not support the requested version".

So, I have tried to switch to:

0 1
0 217

Hi *,

I want to dynamically generate the arguments of a method during compile time.

'For example, I want the following method

ClassMethod DoCleverStuf() As %Status [ CodeMode = objectgenerator ]
{
    do %code.WriteLine("    Set tSC = $$$OK")
    ...
}

to look like this in the .int code.

ClassMethod DoCleverStuf(pValue1 As %Integer, pValue2 As %String) As %Status [ CodeMode = objectgenerator ]
{
    // some generated code will be here
}

Is this possible? Or alternativel;y, can I generate a whole method at compile time?

Thanks.

0 2
0 190

Hi All,

I am a beginner in cache. I need to extract data from multiple tables (4-5) tables based on an SQL query . The data is more than 9 lakhs of records (i checked using count). The total number columns is 16.

When I am running this SQL query through management portal, I am getting time out exception. Could you please suggest how I can retrieve those records. Which way will be good (Dynamic query using %SQL.Statement or Embedded SQL (not known to me) or Writing to a global will help or not).

1 4
0 276

Hi,

Is there a way of printing out information about IRIS.DAT file eg. database name?

The reason is that I've "refreshed" TEST system from LIVE system and I'm not sure I've the copied the correct file to the correct place

on the file tree. The file tree structure shows the database that IRIS.DAT represents.

eg. /db/HMF/IRIS.DAT should be the HMF database

0 6
0 322

Hi all,

I am trying to use some process private variables (percent variables) in Triggers.

I am referring to values from $System.Process, like the ClientIPAddress and CSPSessionID.
These do to not contain values and I suspect it is bacause of scope. I also checked, and the %session variable is not available if the change originated from a CSP request.
I know that in triggers the scope of the variables are to be kept local, that is why NEW is to be used.

0 10
0 245

My team works on implementing an Interoperability solution utilizing InterSystems Kubernetes Operator on Red Hat OpenShift container platform.

We are trying to determine how many messages we can process in any given time. We have a Feeder app running in 10 containers sending 50k messages each to a load balancer all beginning at the same time.

Messages are received via HTTPS protocol by webgateway containers.

Interoperability production runs in compute pods with persistent data, journals, and WIJ volumes.

1 1
1 389

Hi Interoperability experts!

I'm into interoperability now with data transformations and I wonder: how can I use DTLs?

I've created one that transform Ens.Request into Ens.Response. How can I use it now in the production?

I'm trying to add the business process expecting to see it available in the list but it seems it is not the case.

Tried documentation and it doesn't say either what to do after creation the DTL. If it is obvious could you please help?

0 4
0 187