NewBie's Corner Session 20 Parameters and Status Part I

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

Parameters

Parameters are another name for Variables when used in passing data from one Routine to another.

Let us say we have 2 routines (RtnA and RtnB), and we want to pass 3 parameters (Parm1, Parm2, Parm3) from RtnA to RtnB.

RtnA would look like:

0 1
0 357
InterSystems Developer Community is a community of 18,627 amazing developers
We're a place where InterSystems IRIS programmers learn and share, stay up-to-date, grow together and have fun!

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

MUMPS verses Caché, what's the difference?

MUMPS was developed at Massachusetts General Hospital during the 1960s. Through a series of experiences and companies over the years eventually MUMPS evolved into Caché. Some deny this but the facts are there. You can read through the various websites with Wikipedia and make up your own mind. The closest way to explain this is that Caché is a superset of MUMPS.

0 3
0 643

Here is the digest of the most interesting and valuable posts on Developer Community published in August 2016.

Here we go!

News, events, releases

JSON changes in Caché 2016.2

Announcement about the Caché 2016.2 and 2016.3 Field Test Programs

Alert: Database Compaction

2016.1.2 Maintenance Release

Most viewed

Announcement about the Caché 2016.2 and 2016.3 Field Test Programs - 406

JSON changes in Caché 2016.2 - 306

What is causing the journals to grow rapidly? - 197

Writing forward compatible JSON in 2016.1 - 190

how to connect to the Cache database from node.js ? - 188

Caché MapReduce - introduction to BigData and MapReduce concept - 155

NewBie's Corner Session 17 New command - 153

Global references done internally by Cache - 145

Tips & Tricks - Process-private Globals as a class storage - 118

ZUTILS - 114

Most voted

Improve SQL Performance for Date Queries, AGAIN! - 8

JSON changes in Caché 2016.2 - 8

Caché MapReduce - introduction to BigData and MapReduce concept - 7

Announcement about the Caché 2016.2 and 2016.3 Field Test Programs - 7

Writing forward compatible JSON in 2016.1 - 7

HealthShare's new SDA extensions - 6

The Art of Mapping Globals to Classes 1 of 3 - 6

Enterprise Monitor and HealthShare - 5

What is causing the journals to grow rapidly? - 4

TLS v1.2 support in Caché - 4

Most commented

Setting ContentType in Rest Service - 13

Use of $ZUTIL(49) is deprecated - 11

CSP CONFIGURATION - 10

Announcement about the Caché 2016.2 and 2016.3 Field Test Programs - 10

Calling javascript method from Zen method, with parameters - 9

Git Continuous Integration - What are the most important differences between CacheGitHubCI and CacheUpdater? - 8

how to connect to the Cache database from node.js ? - 7

What is causing the journals to grow rapidly? - 7

Problem in the Property parameters (DISPLAYLIST | VALUELIST) [ SOLVED ] - 7

NewBie's Corner Session 17 New command - 7

0 0
0 335

Hi, I have a question about web applications.

First, I know that my ZEN application is using a web application called /OurAppName, but I honestly don't know why it's choosing that web application over the default of /csp/default-namespace, so if you can give me a hint as to how else the web application is set, please do let me know. I'd also love to see the web application's properties programmatically, if possible (such as the physical files path).

Our other web applications are called /OurAppName/NAMESPACE rather than /csp/namespace.

0 3
0 376

Hello Fellow Cache Developers:

Has anyone ever created an index on values of a list property? If so, would you be willing to share an example?

Also, feel free to offer input and suggestions regarding use of indexes on List values.

Here is my database scenario:

Parent Class:

PropertyA - %String

PropertyB - %Integer

Child Class:

PropertyC - %Integer

PropertyD - list of %Integer

Data illustration:

0 2
0 570
Question
· Aug 30, 2016
Get to know the format

I know that Cache files can be stored as XML and UDL based files. Is there any way to determine in which format the file(class, routine, dfi and so on) is stored? Because you can easily name your XML based file as class.cls and it will be perfectly valid.

I know that one way to check whether this file is in XML format is just try to parse it like

Set st = ##class(%XML.TextReader).ParseStream(contentStream)

if $$$ISERR(st) return $$$NO

else return $$$YES

However, is there a better way?

2 4
0 345

I am going to start playing with Zen Mojo (again) and as I understand it there are two ways to manage moving data to/from your Zen Mojo page:

  • interacting with REST services
  • using Mojo's built-in transport

I would like to understand the pros and cons of each approach. Which is recommended in different situations and why? I would like to create a sample application that will hopefully be reusable and helpful to others and I would like to understand which approach to pick for my app.

0 4
0 506

Hello everyone,

I'm trying to authenticate a user(Health Share clinician) from a Java Application.

I 'm already connected to Caché and able to run SQL commands.

My question is: How can I authenticate a user using only SQL? In fact, what I want is verify if the users exists in the base and if the given password is the same used in Health Share.

There is a column 'password' in Security.users table but I'm not able to see its content, even so, I don't know which hash function to use to compare with.

1 7
0 1.6K

Hello everyone,

Does anyone know how to create integration tests using the Cache unit test framework in order to test an Ensemble production?

For example, what would be the best way to create automated tests for a BPL that calls multiple business operations (SQL, WebService ...)?

Should we create some kind of mock service/operation to simulate the response from the business operations ?

1 5
0 1.1K
Article
· Aug 26, 2016 2m read
NewBie's Corner Session 18 Caché or Cache

NewBie's Corner Session 18 Caché or Cache

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

Caché and Cache

Caché and Cache are not the same. Caché is a product offered by InterSystems. Whereas Cache refers to memory storage.
In computing, a cache /ˈkæʃ/ KASH, is a hardware or software component that stores data so future requests for that data can be served faster; the data stored in a cache might be the result of an earlier computation, or the duplicate of data stored elsewhere.

0 0
0 361
Question
· Aug 25, 2016
New keys for Field Tests?

The FT keys InterSystems currently make available to us in the zips from the download pages are due to expire at the end of this month (31-Aug-16). Will there be new keys soon?

Also wondering when we might expect new FT builds for 2016.2 and 2016.3. The last published ones were 24-Jun-16 and 16-Jun-16 respectively.

I haven't seen an Atelier update for a while either.

1 2
0 329
Question
· Aug 22, 2016
$fromJSON and MAXSTRING

Hi, all.
I have CSP application and it needs to get and process data from ajax request with json-content. JSON can be very big.
In this case:
TRY
{
Set RequestObj = ##class(%Object).$fromJSON(%request.Content.Read())
} CATCH(Exception) {
Set Status=Exception.AsStatus()
}
I get just part of getting JSON and validate error in $fromJSON.
If I try to read it all in cycle:
TRY
{
While (%request.Content.AtEnd = 0) {

0 6
0 1.5K
Question
· Aug 25, 2016
Iterate through global

Let's imagine I have a global like this:

^Users(12, "SETTINGS", "IsAllowed") = 1

^Users(41, "SETTINGS", "IsAllowed") = 0

^Users(52, "SETTINGS", "IsAllowed") = 1

Now I would like to check for each user whether they are allowed, therefore I'd need to iterate through the Global. How to do that? It seems that I can't use $Order here like such:

S FF = ""
For {
S FF=$O(^Users(FF,"SETTINGS","isAllowed"))
Q:$L(FF)
W "User ",FF," is allowed",!
}

Is there any other way of doing this?

0 5
0 1.1K

Is there an out-of-the-box or accepted standard method for loading up mappings between different code sets and then referencing these mappings (both directions) from DTL? First thought was the built in Lookup() and corresponding data tables but these only work in one direction (key -> value) and not the reverse. Obviously I can build my own classes to support a two way mapping but am wondering if there's a standard way of achieving this. The mapping should contain the code and display name from each of the code sets and allow mapping based on either code or display name.

Thanks

0 2
0 539
InterSystems Official
· Aug 24, 2016
Alert: Database Compaction

August 24, 2016 – Alert: Database Compaction

This is an addendum to the Alert published on October 14, 2015 – Alert: Database Defragmentation.

That alert indicated that the database defragmentation utility in 2014.1 and higher, on all platforms except OpenVMS, could cause database degradation and the correction JO2871 is available to clients upon request and would be included in future releases. The correction was included in 2015.1.3, 2015.2.2 and 2016.1.

0 0
0 532

Hello community!

Is there any method/property/way in Caché to obtain something like unique identifier for installed Caché system? The idea is to get the identifier that will differ on any other installation/machine/etc, but will forever remain the same for the current installation, even if $zv changes (in case of update) or any data is removed from the database.

0 2
0 429