Caché

Hello Community,

My Intersystems Caché Version: 1.2014 (Can't update now.)

I have the following issue:

I have for example an articlenumber with 15049950, which is numeric. But sometimes it can also be an alphanumeric string like PK15049950.

How can i set numbers always to string in Json Stream with quotes like "15049950".

Code Example:

set object = ##class(%ZEN.proxyObject).%New()

set articlenumber = "15049950"

set object.articlenumber = articlenumber

Last reply 1 hour 55 min ago
0   0 1
38

views

0

rating

First,

Forgive me if this is a rather low-level question - I am a physician informaticist who is learning cache/mumps for the first time. I am sure this probably relates to some setting but I can't find a similar issue anywhere.

 

When I create a list, and then try and return that list - I get a bunch of symbols back along with my results, or sometimes I just get symbols. 

I pasted a screenshot below.  Thank is advance for the help!

 

Anthony

0   0 3
95

views

0

rating

Currently, when we want to write data to a file that will be viewed in Excel, we parse the data in tab deliminated format to the file and name it with .xls at the end.  That is sent to end users via email.  They get a warning that the data is not formatted properly (it's not really an Excel file after all) but it does display somewhat correctly as the tabs are understood (this does not work if we deliminated with commas however).

Last reply 6 days ago
+ 3   3 14
1,302

views

+ 3

rating

I'm using Cache SQL and want the ability to choose a specific index.

I've boiled the problem down to one table and simplified the query down to

SELECT *
FROM Registration.PatResp
WHERE SchedApptNum=8450022

 

SchedApptNum is indexed, but instead of using that column, "Show Plan" indicates that it's looping through the entire Registration.PatResp table on Id (the primary key for the table).

I've done a tune-table with no change.

0   0 4
99

views

0

rating

Hello,

 

We would like to store a list into a global. The need is to get the full Web Service's Response Message, because of currently, our Operation sends the message to the Process, whith an empty list:

 

We have created a copyList which is a clone of the list which is being returned from the web service client:

 

Last reply 13 days ago
0   0 2
74

views

0

rating

Hi, everybody, 

I've been reading some posts in the community but I haven't been able to come to a conclusion. Here's my point.

I have a cache code, and following this guide https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?K... but I can't understand how to run this from jenkins for example, without using the console, and thus automate the process. That is to say, if it were possible to do it, what steps should I follow.

Thank you very much

Last reply 13 days ago
+ 1   0 2
72

views

+ 1

rating

I've recently encountered a HS Caché that won't start informing that Collation 30 is not available, but I have not found an easy way of knowing what collation is 30.

I've found that the following command returns the ones from the current locale, but not from all locales:

Set Rset = ##class(%ResultSet).%New("%Library.Collate:CollationList")

d Rset.Execute()

While (Rset.Next()) {zw Rset.Number_": "_Rset.Name}

Thank you

Last reply 12 February 2020
0   1 1
49

views

0

rating

Hello,

For many routines we write, we utilize a global we name ^HITLIST($JOB,"routineName") as temporary storage as needed.  For various reasons this gets junked up and we are at a point where we need to do some routine garbage collection.

The idea is to write a utility that looks at all the ^HITLIST($JOB) nodes, check if the job is currently running and if it isn't then we can issues the KILL command on ^HITLIST($JOB).

Last reply 10 February 2020
0   1 4
131

views

0

rating

I am looking to run some analysis on existing software to quickly identify global variable references. Ideally you would feed in a "starting routine" and after going through all referenced routines you would end up with a finite set of global variables. So the primary purpose is to take say 10,000 lines of code and map out the referenced global structures without relying on a programmers eye. I found the post on Object Script equivalent to Studio "Find in Files" interesting but the downside is that output is too verbose and would require parsing to extract the global structures. How would you override writing to the terminal so that you could parse the data?

Last reply 10 February 2020
0   0 3
141

views

0

rating

We have multiple databases running on a single server. I have duplicate interfaces on each database.

If we're doing testing in copy #1, the interfaces should be running in that copy. I want to block analysts who try to start the interfaces in copy #2.

So, I'm looking for something that would check the port and tell me the status: already in use or free. 

My challenge is that this system needs to stay ISO/ANSI compliant.... so I can't use any of the newer tricks.
Is there any plain-old Cache' I could use for this task?

Last reply 7 February 2020
0   0 2
123

views

0

rating

I am developing a viewer for Crystal Reports using the Crystal Reports for Visual Studio (CR13SP26).  I have also installed the latest ODBC Drivers for Cache, but when I connect some reports to the Cache database using a connection string, I get an error that I failed to retrieve data from the database, and it reports the Database Vendor Code 30.  Has anyone used Crystal Reports connecting via a connection string and received this error?  If so, how did you correct it?

Thank you,

Brian Cromwell

Last reply 6 February 2020
0   0 0
38

views

0

rating

Hello,

I am wondering the best way to disable a user account using this class in Cache (Security.Users).

https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls

 

Example User Account = jhipp

Currently is Enabled

 

I know that we can use the auto-generated EnabledGetStored method, for example:

%SYS> w ##class(Security.Users).EnabledGetStored("jhipp")
1

 

Last reply 6 February 2020
0   0 2
113

views

0

rating

How do you cancel a query that is executing in the Management Portal  > System  >  SQL?

Does closing the browser cancel the query or does it continue to run in the background?

Is there any added benefit to using the Shell over the Portal? Perhaps there is a way to cancel/stop a query here?

$SYSTEM.SQL.Shell()

  Thanks

Last reply 6 February 2020
0   0 3
154

views

0

rating

A quick question regarding to SQL Query Plan:
Why these two requests have different plans, in particularly, why second request needs temp file? To me, temp file is a bad thing which should be avoided, right?

  1. select * from Test.Log where cdate = 1
  2. select * from Test.Log where cdate > 1

Plan for 1:

Read index map Test.Log.cdateIndex, using the given %SQLUPPER(cdate), and looping on ID.
For each row:
 Read master map Test.Log.IDKEY, using the given idkey value.
 Output the row.

Plan for 2:

Last reply 30 January 2020
0   0 1
86

views

0

rating

Hello,

I am working on Ensemble 2017.2.1 .
I need to export my security settings into an extern database, in order to make a report.

I've created a Business Operation with an SQL Adapter into a Namespace, but I don't know how to get every security data from "%SYS" Namespace  ( SQLPrivileges , Resources , Roles , Services , Users ... ).

I dont't want to use the terminal and the ^SECURITY routine, because i don't want to store a XML file on the server.

Last reply 30 January 2020
0   0 2
69

views

0

rating

Hi

I'm using this query "Config.MapMirror.List" To get information of the list of servers that are in the mirror system.

I'd like to know how can I know which of the list is the primary and which is the failover or async member.

Is there a way to do it with this query? Is there another query to get this info?

Thanks a lot

Last reply 30 January 2020
0   0 4
174

views

0

rating

I would like a REST client to be able to send a custom header with the http request, for example "APPLICATION-ID".

This can be seen in the CSP gateway trace but I have tried using %request.GetCgiEnv("HTTP_APPLICATION-ID") in various formats and parts of the classes but cannot work out where I can get this.  Documentation says this should work but is for normal CSP pages.

Any ideas?

 

Last reply 15 January 2020
0   0 1
68

views

0

rating

I've writing a short classmethod that extracts an HL7 message from EnsLib.HL7.Message by ID and returns it as a stream. It's to be called as a stored procedure via ODBC (or ADO.NET) to fetch messages into an application.

I'm not using an SQL query in the classmethod itself, but it will be called as part of an SQL query via ODBC, but I can't figure out how to set a custom SQLCODE and error text from within the classmethod that propagates back to the external application. I thought %sqlcontext would be useful for this, but it doesn't appear to do anything. Here's the class:

Last reply 6 January 2020
+ 1   0 3
75

views

+ 1

rating

Hi All,

I am planning on doing some maintenance in 2020, I was wondering if it is possible to run a query to get a log on when a DTL and/or Business Rules was called in HEALTHSHARE, the idea behind this is to do some cleaning and remove some clutter.

Your help or ideas are highly appreciated.

LW21

Last reply 2 January 2020
0   0 1
57

views

0

rating

Hello team,

I am trying to do a basic read file of HL7 messages. Need to count how many FT1 segments are there in each file and how many messages are in each file.

Any help will be appreciated. I have the stream object.

Just need to loop through the stream and get the info in some way.

Any help will be appreciated.

Thanks,

Jimmy Christian.

Last reply 30 December 2020
0   1 2
120

views

0

rating

Hi everyone,

I've encountered this annoying issue so many times before, if any one also encounter this issue, please share here if you have any solution.

So, I've been working on a web service project using HealthShare 2015. Sometimes I have to set a debug target to a csp file to debug it. If I pause the debug process about 3 minutes above or so (to examine an object, variable, etc..) the studio will hang.

Last reply 30 December 2020
0   0 3
80

views

0

rating