Question William Proctor · Sep 30, 2016

Good Morning and thanks in advance for all replies.  I have created a PowerShell script for backing up CACHE and all related files to be run on a nightly basis.  My script works as long as the Unknownuser has %all access which is not acceptable in our production environment.  I have tried every format I can thank of to get the script to use a specific id with no luck.  How can I get this command to run under a specific id? 

..\bin\cache -s. -U%SYS "##Class(Backup.General).ExternalFreeze() <d:\backup\login.scr" 

The file just has

userid`r`n
​password`r`n

`r. For a carriage return and a

5
0 757
Article Evgeny Shvarov · Aug 31, 2016 1m read

Hi!

Sometimes you see that call to DeepSee cube building method:

w ##class(%DeepSee.Utils).%BuildCube("CubeName")

does nothing.

Here are my 2 cents on possible reasons.

1. Run DeepSee Reset method in certain Namespace:

NAMESPACE> w ##class(%DeepSee.Utils).%Reset()

and try again.

2. Make sure, that all the indices in your base class for the cube are rebuilt, rebuild them and run it again:

w ##class(%DeepSee.Utils).%BuildCube("CubeName")

Hope this will save some time for you, and will be helpful as was to me.

2
0 468
Article Mike Kadow · Sep 15, 2016 2m read

NewBie's Corner Session 27 Traversing A Global with $Order Part 1

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

Traversing A Global

Perhaps the most difficult concept in Caché/MUMPS is its Global Structure. This session and several that follow it deals with the Global Structure. However, just presenting the material will not guarantee your understanding of it. You must experiment with the data and concepts that are presented.

In this session, we are going to create a small Global of three levels deep, and then show the code to Traverse the Global.

The followin


20
0 911
Article Mike Kadow · Sep 23, 2016 5m read

NewBie's Corner Session 28 Various Methods to Traverse a Global

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

Judging from the number of responses to Session 27 Traversing A Global, developers are passionate about their methods. I am not here to judge the merit of the various methods.

Over the next few pages I will demonstrate a number of methods to Traverse a Global. If you don't already have a favorite they may help you pick one.

I will repeat the method from Session 27 just to have all methods in one post.

There may be variations on these methods

13
0 718
Question Rustam Ibragimov · Aug 5, 2016

Hello, guys.

I need to copy the text from one stream to another filestream and save it. I am using  

do fileStream.CopyFromAndSave(rtn.Code)

However, if "rtn" stream contains Russian characters I get something like "???". Is there any way to convert stream to Unicode?  Something like $zc(str, "O", "UTF8") for streams.

3
0 474
Question James Fitzpatrick · Sep 28, 2016

Hi all,

This is a real long shot, but does anyone have experience integrating MS wsHttpBinding with a Cache application?

Link 

I ask because my project had some initial design discussions for new web service communication and this specification was mentioned. 

Thanks.

1
0 367
Announcement Evgeny Shvarov · Oct 1, 2016

Hi, Community!

Here is the digest of Articles and Questions published on InterSystems Developer Community in September 2016.

Most viewed

Mirroring 101: a brief guide and FAQ - 238

NewBie's Corner Session 27 Traversing A Global with $Order Part 1 - 214

Cache for Raspberry Pi? - 209

Free Text Search: The Way To Search Your Text Fields That SQL Developers Are Hiding From You!* - 199

REST in Pieces - 196

User authentication using Arduino with RFID - 146

Windows 7 performs shutdown too fast for Cache to close and so it gets forced down - 143

Cache or Caché? - 141

NewBie's Corner Session 28 Various Methods to Traverse a Global - 134

Cache Certification - 128

Most voted

Ensemble and file outbound adapters - a small hint - 11

Free Text Search: The Way To Search Your Text Fields That SQL Developers Are Hiding From You!* - 9

Windows write caching - 9

Advanced URL mapping for REST - 6

Windows 7 performs shutdown too fast for Cache to close and so it gets forced down - 6

Featured InterSystems Video: OAuth 2.0 Overview - 6

The Art of Mapping Globals to Classes  (2 of 3) - 5

Running HealthShare XSLTs from Terminal - 5

Cache for Raspberry Pi? - 5

Cache or Caché? - 5

Most commented

NewBie's Corner Session 27 Traversing A Global with $Order Part 1 - 16

Cache for Raspberry Pi? - 14

question on ExternalFreeze on windows platform -- - 14

Cache or Caché? - 12

Mirroring 101: a brief guide and FAQ - 10

Windows 7 performs shutdown too fast for Cache to close and so it gets forced down - 9

Multiple namespaces in web application - 8

cleaning up CSP sessions (aka where/who/what is the %CSP.Daemon?) - 8

NewBie's Corner Session 28 Various Methods to Traverse a Global - 8

Free Text Search: The Way To Search Your Text Fields That SQL Developers Are Hiding From You!* - 7

0
0 404
Question Rustam Ibragimov · Sep 9, 2016

Hello, guys. 

I found one interesting moment in Cache Object Script. It doesn't have(or at least I didn't find) trimming function. By trimming I mean if a string has some whitespaces/tabs/carriage returns from very beginning or/and from very right, this function removes them. 

  I have found several workaround ways. 

1. Using Cache Basic

ClassMethod TrimCacheBasic(str As %String) As %String [ Language = basic ]{Return Trim(str)}

2. Using SQL

ClassMethod TrimSQL(str As %String) As %String
{
	set tStatement = ##class(%SQL.Statement).%New()
	set tSC = tStatement.%Prepare("SEL
6
0 2121
Article Murray Oldfield · Sep 30, 2016 1m read

I saw someone recently refer to ECP as magic. It certainly seems so, and there is a lot of very clever engineering to make it work. But the following sequence of diagrams is a simple view of how data is retrieved and used across a distributed architecture.

For more more on ECP including capacity planning follow this link: Data Platforms and Performance - Part 7 ECP for performance, scalability and availability

To start

  • There are three globals on disk ^A, ^B and ^C.
  • Global ^B equals "B"
  • There is one Data server and two or more Application servers.
  • The diagrams show the cache (global buffers) o

















0
0 1338
Question Paster-Bachar Gadi · Sep 29, 2016

Hi All

I have a question on working with dev and prod environments.

After project is ready and signed, I usually migrate outcome to production using the export tool from the studio.

For changes/adding to existing projects, I exclude the production class (as it has some different values differing the dev from the live) and I add the differences manually afterwards.

My questions on migrating are:

Does anyone has (to share) his/her best practice steps on "migrating dev to prod"?

Does the export action (in management portal) is better to use?

Thanks

Gadi

2
0 574
Article Istvan Hahn · Sep 30, 2016 8m read

The article is a step by step guide for beginners to learn how to build a RESTful web service consumer (or client) in Ensemble. The provider can be any RESTful service, but the example is based on the service we made during the previous sessions.

It is more than obvious that many client development environment has programming libraries or containers to build a RESTful client. For example in the earlier sessions we used Java Script to access services. Ensemble as a container also offers client functionality. Let us have a quick list what Ensemble offers. Integrating an external resource is the

0
0 2843
Question Scott Beeson · Jun 21, 2016

I'm following the tutorial here.  When I try to call the default Test() method I get the following error:

An error occurred with the CSP application and has been logged to system error log (^ERRORS)

I found this document which says I need to make the "Web Application" accessible by running a couple commands.  I'm not even sure I created a Web Application.  Regardless, I tried a few variants but still get the same error.

Here is the URL for the Service Catalog: /csp/healthshare/mhclib/Custom.MHC.Scott.ServiceTest.cls

I tried different things including these two:

set ^SYS("Security","CSP","AllowClas
5
0 3304
Article John Hotalen · Sep 29, 2016 1m read

Checking if Directory or File Exists:

Outlined below is an example of how to check if a directory exists:

Set directoryName="c:\temp\nosuchdir"

/* Check for existence of a directory - Return Value:  0 - directory does not exist;  1 - directory does exist  */

Set directoryExists=##class(%File).DirectoryExists(directoryName)

If ('directoryExists)  // do the processing for when a directory does not exist


Outlined below is an example of how to check if a file exists:

Set fileName="a_test_filename.txt"

/* Check for existence of a file- Return Value:  0 - filename does not ex
1
0 3361
Article John Hotalen · Sep 29, 2016 1m read

The one question that some of you might have is:  

How do I change my login information for Cache Studio if I clicked the checkbox to automatically save my login info so I do not have to enter my username/password every time I open Studio?
 

Well.....excellent question!!!!!!

Here's the answer:  

Bring up Studio and press F4 (or go to File menu -> Change Namespace) - when the Change Namespace box appears - click on the [Connect] button and you can select the server you want to connect to and it will re-prompt you for your login credentials -- at that point change the Cache Account to whatever accoun

1
1 1507
Question Chris Bransden · Sep 29, 2016

Hi all,

We're creating a series of RESTful APIs that output data from a Cache database (made up of global storage that we've mapped to classes). I'm running into some problems with object-to-JSON conversions when relationships are involved. Eg:

ParentClass has children relationship to ChildClass

ChildClass has parent relationship to ParentClass

If you %WriteJSONFromObject on an instance of ChildClass, it will retrieve the instance of ChildClass you're asking for, and it will retrieve the ParentClass as a JSON sub object, via the parent relationship (this part is OK), AND it will retrieve EVERY oth

1
1 724
Announcement Derek Robinson · Sep 26, 2016

Click here to view our OAuth 2.0 Overview

InterSystems created this video as a high-level overview of OAuth 2.0 technology, geared toward developers looking to learn the basics of OAuth 2.0.  It will teach you how OAuth 2.0 works, what roles are involved, what benefits it can provide, and how InterSystems Caché can be used with this technology.

3
0 673
Question Kevin Furze · Sep 27, 2016

Looking at the posts, I cannot find a simple way to show everything in DATE order (newest first).

when I click on "NEW", It's 11:26am (UK time) and the first few entries are

Post by Istvan Hahn 6 min 19 sec ago.          Enabling Cross-origin Resource Sharing (CORS) for RESTful Services new
Post by Eduard Lebedyuk 23 hours 46 min ago.   Automatic removal of system methods from codebase
Last answer 2 hours 46 min ago.                Is the possible for Multiple Streams using in single method?

 

Date/time seems to bear no relationship to the order.

what can I click on so that I see

1
0 229
Question Asaf Sinay · Sep 28, 2016

Hello,

I think it will be very useful to add the following information about community members:

-Full Name (that is the only thing we see today)

-Company

-Title

-[Optional] Areas of interests/expertise 

This information should help the community members evaluate the credibility of posts and responses.

Thanks,

Asaf

1
0 254
Question Susan Cockrell · Sep 26, 2016

In Subscriptions > Overview >  I checked Digest Mode, which is defined as:

"Merges your notifications into a single email, sent at the interval you specify. "

Under Preferences I set the Send Interval to be Daily.

I receive a couple dozen emails each day.  They all have a subject of "Subscription Digest for..."

Each email only contains a single item, so it doesn't appear to be a "digest."

It clearly is coming more than once a day, so doesn't appear to be following the set Send Interval.

Is this a bug or am I misunderstanding the settings?

1
0 263
Question Ponnumani Gurusamy · Sep 22, 2016
Hi ,
 1.  I will ready to write  a cache Developer Certification Level1. 
 2.  How to prepare this exam and any mock test available.
 3.  Where place to I will write exam . (Online as I will write a exam in my home place ).
 4. Will i Complete and pass 1st level , you will provide certificate.
1
0 695
Question Scott Beeson · Sep 27, 2016

I need to do an UPDATE via SQL and I would like the statement to return the `ID` column of each row that is updated.  MS SQL has an "OUTPUT" statement, but I don't see anything similar in Cache.  Is there a way to do this?

4
0 886
Article Istvan Hahn · Sep 27, 2016 5m read

Cross-origin Resource Sharing (CORS) is one of the basic security features built into browsers. CORS controls accessing resources from a HTML page in domains other than the original domain. It is particularly important for AJAX calls. Since RESTful services can be used as data provider to any AJAX call, you have to be able to control cross-origin access. By default services are not allowed to do CORS. You are going to learn how to enable it for Ensemble RESTful services.

The Resource Map class (the subclass of %CSP.REST) controls whether CORS is enabled. There are two approaches to do. One way

0
0 1607