Caché

Syndicate content 130 

Hi,

I seem to be able to execute sqlproc using the convention defined here https://docs.intersystems.com/latest/csp/docbook/Doc.View.cls?KEY=GSQL_q... provided the package/folder is a single level. As, soon I have a nested folder structure I get an error while trying to execute this. 

For instance, 

select id, Utils.Users_getRole(id) roles from users.users

works fine while, 

00
0 3 32
Question
Sabit Issakhan · Nov 26, 2020
Set null

Hello! 

How to set null in variable? 

I need to create JSON like below:

{

"id":"1",

"Code": null

}

 

00
0 3 65

Hi,

I'm trying to access the categories configuration for the WorkMgr via COS, so I can be able to create new categories for our processes and this way try to overlock the limit of cores*2 workers. I've seen that last version of IRIS is supposed to have a menu on the portal (System Administration > Configuration > System Configuration > WQM Categories), but since we are in 2020.1 this doesn't exist. 

Does anyone have experience with WQM.API to manage the categories, or the usage of ^%SYS("WQM") to set it directly?

00
0 1 37

I have multiple files with different columns, first 9 values are fixed, so i want to ignore the first value, and next 8 values i want to combine into one value using ^ sign

Current Format

|||||||||||^^||||||^^|||||||||||||||||
|||||||||||^^||||^^|||||||||||||||||||||||
|||||||||||^^|||^^||||||||

Desired Format

^^^^^^|||^^||||||^^|||||||||||||||||
^^^^^^|||^^||||^^|||||||||||||||||||||||
^^^^^^|||^^|||^^||||||||

Reading each line from the file use below code.

00
0 11 105
Question
Fiona Griffiths · Nov 17, 2020
Terminal replacement

Hi 

Has anyone found a good terminal emulator replacement for Cache Terminal?  

We want one where the up arrow works to bring back the last command typed (without extraneous characters appearing at the beginning of the line) and be able to run D ^JOURNAL and have it display correctly. 

I tried WebTerminal a couple of years back and but it didn't work properly with the journal.  I've tried RoyalTS and that doesn't do up arrow or the journal correctly even though it's supposed to be emulating a VT400. 

Any suggestions?

thanks

 

00
0 4 97

Hi,

Please, advise how to programmatically set "System Mode" value.

Manually this value can be set via Management Portal > System > Configuration > Memory and Startup > System Mode dropdown.

Value can be programmatically obtained via $SYSTEM.Version.SystemMode() , but  I couldn't  find a programmatical way to set it.

Thank you.

00
0 5 107

In Cache WIndows environment:

Trying to use the $SYSTEM.SQL.DDLImport to import XML File that has ClassMethods, no SQL Table, but it doesn't appear to be working. I can use this ClassMethod to create SQL Tables. The manual method I have been using is to go into Cache Management Portal, Classes, Import.

I create an XML file first, then run the following to import but get no errors. Any ideas?

00
0 2 40

Hi:

I have noticed a problem in some new code I did on one of our productions. I think it is leading to 2 problems. 

I have a file, lets call it 1111111111_2300.pdf. 

We make the file UNIQUE to avoid an issue. This filename in the working directory gets a session ID Added to it before the .pdf. So lets say it was session ID 9 it would be 1111111111_2300#SID9.pdf in a working directory . 

There are further operations to be done on this document before it is sent. For various errors an email is sent back to service users. 

00
0 3 62
Question
Daniel Aguilar · Nov 4, 2020
Avoid $c(0) in globals

Good Morning,

I have this question for a long time. When I make an insert by SQL from an external application in the fields of type %String, if they are empty, it writes the character $c(0) in the global.

Is there a way so that if an Insert is received in a field of type% String with null value instead of the $ c (0) it leaves it empty?:

00
0 7 140

Hi Cache team, I am in the need of listing all the user defined schemas that are present my Cache db and also the user defined tables and views and Columns of those tables and views through Queries. So that I can write some JDBC code to run the queries and fetch the above metadata. Any help is appreciated.

Thanks in Advance,

Kranthi kiran.

00
0 2 91

Hi,

I need to read a UTF8 encoded text file and translate the content to 8-bit.

Using %File class and $ZCVT(TXT,"I","UTF8") works , but I see that if the content is larger than max string  (32000) and we cut the content

To max string chunks, we can get a <translate> error if we cut it in the "wrong" point..

Is there a better way to do this task?

My code looks like this:

00
0 10 860
Question
Jude Mukkadayil · Oct 29, 2020
Editor for Cache Database

Hi,

 

         Can anyone please recommend an editor for cache database. I am looking for free version.

I am using winsql free version but data is missing while extracting or copying data from winsql.

 

Thanks

Jude

00
0 3 95

Hi All,

Can you please guide me on how to restore the .cbk file from the 2015 Cache version into the 2017 version or any other versions of Cache or IRIS software? I have a new instance on my server. It's an entirely new server. I have a .cbk backup file.  I want to restore the backup file into a new namespace which one I will create on my new server.  When I am trying on ^DBREST utility, I am getting "This is not a Cache Backup File" this error. 

Please advise on this. It's a bit urgent.

Thanks,

Arun Kumar. 

00
0 6 71

Hey, 

I have a value in epoch time in which I need convert in order to be able to lookup a table that has dates in YYYY-MM-DD HH:MM:SS format

I thought the below would work but it is not.

select COUNT ('Arrival Time') FROM dbo.table where 'Arrival Time' < DATEADD(ms, CONVERT(int,LEFT(1603173432000, 20)), '1970-01-01 00:00:00')

00
0 8 72

Hello there community, 

I am pleased to say that i have started building a product and I have chosen InterSystems technology to be used in it. 

But I have a confusion with regard to it. 

I actually have to come to a conclusion to whether to use CACHE or IRIS. 

I will be using a lot of data and also integrating it along with Python for DEEP and Machine Learning. 

Also I do not have an idea of how to get the licensed version of either of that. 

00
1 3 153

Hi all,

I need some advice about JSON conversions and the outputs. I am being sent a JSON response from an API call and I am struggling to produce an output that I can use from it.

I have used the %FromJSON() method call to take the JSON stream source (pData) and convert it to a Dynamic object (object) but I am a little unsure as to how I can read the dynamic object and use it to extract the values from this and set the values as a property in another class.

The current coding I have for the conversion:

00
0 21 269

I noticed when creating Record Map's within Ensemble that it is creating a Persistent cache table as it translates the file and puts it into the Record Map data structure.

I was wondering if there was a way to add a column to the cache table that is Hidden from the record map, but is a calculated date value on when that record was inserted? 

00
0 4 81
Question
Rodrigo Souza · Oct 8, 2020
Report Render Server Error

Hi everyone, i'm using a render server to make pdf output with zen report and everything was fine till recently i've been getting this error message and i have no idea what it means, i'd be very thankfull if someone could help or got into the same situation.

Error message:

ERROR #5001: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: "fo:table-body" is missing child elements. 
Required content model: marker* (table-row+|table-cell+) (See position 817:-1)

 

00
0 4 64
Question
MARK PONGONIS · Jul 17, 2018
Cache Dynamic SQL Pagination

Would like to know if there is an alternative or better way to paginate through a dataset using dynamic SQL than what I am using below. The problem is that as the potential pool of data gets larger, this code slows down to the point of not being useable. In analyzing each line of code below, it appears the slow down is related to the initial rset.%Next() iteration. Is there anything available which does not require a subquery/%VID such as a simple LIMIT/OFFSET?

My code is similar to :

s sql=##class(%SQL.Statement).%New()

10
1 21 1,176

If a global node contains special characters, (eg : a line returns), it will be displayed like this in Portal ("System > Globals > View Global Data" panel) :

^A(1) = "this is"_$c(13,10)_"a test"

I would like to export global data to a txt file using a similar format.

I already wrote the main code (that loops on all nodes and dump them to file), the problem is how to handle special characters.
For the moment I replace them manually one by one. It works, but it's far from perfect :

10
0 5 112