Hi Community!

Sometimes I meet a method which accepts 10+ parameters.

And often I need only the 8th parameter  to  pass. And I call the method something like:

do ##class(Some.Feature).Method(,,,,,,,"flag")

And I don't like this method when I call it like this cause, you know, often I just miss the number of commas and raise some other flag I wanted.

How do you avoid this situations? 

If you meet such a code, how do you call it and sure that you didn't miss the number of ","?

What is a good number of parameters in a method and f you need to pass more parameters in a method what do you do?

Last answer 5 May 2019 Last comment 3 hours 11 min ago
+ 2   0 11
421

views

+ 2

rating

Trying to modernize tasks I have to do on cache like change global variables on different servers, different namespaces....

Actually, I have a bash script  doing ssh on each server and running bash  script on each server like this

echo "zn \"namespace\"
s ^Var=1
"|csession ensapp

0   0 1
0

answers

0

comments

7

views

0

rating

Hi all, 

I am trying to create a method to count the number of entries in a global, including all subscripts. I am having a bit of trouble getting the code to make it to the second subscript. When I get to the position where my key is "Canada" and I add a comma and empty quotes to it, it returns USA as the new key when I do the order function. Is the $Order or the global not able to use a single string to represent multiple subscripts?

 

Here is my global structure:

Last answer 22 hours 52 min ago Last comment 2 days ago
+ 1   0 6
69

views

+ 1

rating

Hello,

I want to create a dashboard with a line graph that shows system availability over time. I used this code to create a Dashboard:

   

            Set tItem = ##class(%DeepSee.UserLibrary.Link).%New()
                Set tItem.fullName = "Availability"
                Set tPage = "Availability.UI.CSVImport.zen"
                Set tItem.href = $system.CSP.GetPortalApp($namespace,tPage)_tPage
                Set tItem.title = "Availability"
                Set tSC = tItem.%Save()

 

Last answer 10 days ago Last comment 2 days ago
0   0 1
83

views

0

rating

EDIT: This article has been updated with up-to-date information about the Port project, which now includes a tutorial for basic usage.

The Port project is something that I've introduced more than two years ago but I hadn't enough room to elaborate a tutorial on how to use it till now.


First, the motivation:

 

Last comment 2 days ago
+ 4   0 0
223

views

+ 4

rating

Hello all,
I'm trying to write tests for an interoperability production using %UnitTest.TestProduction. I'd like to control the behavior of the SOAP operations so they don't actually connect to external systems when I'm testing. My first thought for this is to create a mock outbound adapter class that answers with some configured class method:

Last answer 2 days ago Last comment 2 days ago
0   1 2
25

views

0

rating

I am putting together a new interface to take in a CSV file and output an HL7 message.

I have used the record mapper to create the source class and I am putting together the transform, but when trying to test it I am not seeing the data populate the HL7 as intended.

 

 

Last answer 2 days ago Last comment 2 days ago
0   0 2
31

views

0

rating

Hi All,

I have created a REST class in which have the Parameter HandleCorsRequest = 1;

I can able to access the API using Postman, but not with my web application. It throws the below error.

Access to XMLHttpRequest at 'http://localhost:52773/IrisVSCode/app/test' from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Last answer 2 days ago Last comment 2 days ago
0   0 2
31

views

0

rating

The .NET Core Identity model has an IPasswordHasher<> interface for  for 

  • Hashing a password so that it can be stored in a database
  • Verifying a provided plain-text password matches a previously stored hash. 

I am getting invalid password errors during the login process when the .NET Core Identity model computes a hash from a plain text input and compares it to a password hash value I've returned from Caché. The default hashing algorithm is PBKDF2 with HMAC-SHA256, 128-bit salt, 256-bit subkey, and 10,000 iterations (detailed article on .NET Core Identity PasswordHasher). The algorithm Caché uses is probably different which may be why I am getting errors.

Last answer 4 days ago Last comment 2 days ago
0   1 2
56

views

0

rating

Our team is reworking an application to use REST services that use the same database as our current ZEN application. One of the new REST endpoints uses a query that ran very slowly when first implemented. After some analysis, we found that an index on one of the fields in the table greatly improved performance (a query that took 35 seconds was now taking a fraction of a second).

Last comment 2 days ago
+ 3   0 2
45

views

+ 3

rating

(Originally posted by @Benjamin Spead on June 25, 2014)

This code snippet generates a list of Ensemble Lookup Tables and Schema documents in the user's current namespace. Run the code by running the class method "test":


Class benspead.EnsTablesSchema
{
    classmethod test() {
        If ##class(%Dictionary.CompiledClass).%ExistsId("Ens.Util.LookupTableDocument") {
            // only supported in Ensemble 2012.1+
            Write !,!,"Exporting Ensemble Lookup Tables..."
            Set sc = $$$OK
            Set rs = ##class(%ResultSet).%New("Ens.Util.LookupTableDocument:List")
            Do rs.Execute()
            While rs.Next() {
                Set item=rs.Data("name")
                Write "document found: "_ item,!
            }
            Do rs.Close()
            Set rs=""
        }
        If ##class(%Dictionary.CompiledClass).%ExistsId("EnsLib.HL7.SchemaDocument") {
            Write !,!,"Exporting Ensemble HL7 Schemas..."
            Set sc = $$$OK
            Set rs = ##class(%ResultSet).%New("EnsLib.HL7.SchemaDocument:List")
            Do rs.Execute()
            While rs.Next() {
                Set item=rs.Data("name")
                Continue:$listfind($lb("2.1.HL7","2.2.HL7","2.3.HL7","2.4.HL7","2.5.HL7","2.6.HL7","2.7.HL7","2.3.1.HL7","2.5.1.HL7","2.7.1.HL7","ITK.HL7")
                                    ,item)
                Write "document found: "_ item,!
            }
            Do rs.Close()
            Set rs=""
        }
    }
}

Here's a link to the code on GitHub: https://github.com/intersystems-community/code-snippets/blob/master/src/...

Last comment 2 days ago
0   0 3
262

views

0

rating

Hi Community!

Enjoy watching  the new video on InterSystems Developers YouTube, recorded by @Joel Solon, InterSystems Senior Technical Trainer:

Globals Quickstart

 

+ 1   0 1
0

comments

15

views

+ 1

rating

Here are a few examples of conversions and operations you might need, along with links to documentation where you can learn more.

At the time I wrote this, Eastern Daylight Time was in effect for my Caché system.

How Caché keeps the time and date

Caché has a simple time format, with a longer range of recognized dates compared to some other technologies.

The current time is maintained in a special variable $HOROLOG ($H):

Last comment 2 days ago
+ 5   0 7
5076

views

+ 5

rating

I have set up a process to produce a daily file to be submitted to another system and this is working (using EnsLib.RecordMap.Operation.FileOperation).  However, the file needs to have a header line added each time it is created so it can be processed by the down stream system.  Looking though EnsLib.RecordMap.Operation.FileOperation and EnsLib.File.OutboundAdapter, I can't see where I can do this easily.  Any suggestions?

Thanks

Last answer 5 days ago Last comment 3 days ago
0   0 1
58

views

0

rating

Hi,

    I am trying to create a new report on Trakcare. I created a class file and corresponding crystal report . It works fine and data is populating when I try to run on crystal environment. But when I make a setup on Trakcare and click on print option, I am getting an error on print history " VB error in tkCrystalJob] Error number[-2147417848] Method '~' of object '~' failed [at line 421]". If I click on print preview option its going to empty browser. Inorder to setup new report, already made set up on report manager and menu manager.

Last answer 4 days ago
0   0 2
0

comments

42

views

0

rating

Hi, everyone!


I want to share a personal project that started with a simple request at work: 

Is it's possible to know how many Caché licenses we are using? 

Reading other articles here in the community, I found this excellent article by  David Loveluck 

Last comment 4 days ago
+ 5   4 3
117

views

+ 5

rating

Hello everyone,
After some work with IRIS we want to share our ToolBox-4-Iris with you.

What is this about?

The ToolBox-4-Iris is an API for IRIS with a collection of handy and useful tools - features that are not available in IRIS, but greatly simplify application development. To save time and effort on the "typical tools" that every developer needs. This includes additional classes, individual methods or even more efficient macros, which are described in the respective packages.

Content

Last comment 4 days ago
+ 10   0 2
69

views

+ 10

rating

I'm a DBA and support Caché databases on AIX. I coded shell scripts for monitoring journaling status, databases size, license end date.

We recently got a new instance of Caché on Windows. I'm just curious to know whether anyone coded database monitoring scripts on Windows using PowerShell or any other scripting language.

If yes, please share the details.

 

Thanks & Regards,

Bharath Nunepalli.

Last answer 4 days ago Last comment 4 days ago
0   0 3
56

views

0

rating

I have a colleague that is trying to eliminate any HL7 transactions that have admit date/time of midnight from going to an downstream system within a routing rule. I have tried several different iterations of code trying to figure this out just in the routing editor. Without having to write an object script function is this possible?

Last answer 4 days ago Last comment 5 days ago
0   0 2
60

views

0

rating

Hi Community!

Two more new videos are already on InterSystems Developers YouTube Channel:

1. Machine Learning - How it Works - Part 1

 

2. Machine Learning - How it Works - Part 2

+ 1   1 1
0

comments

21

views

+ 1

rating