Caché

Syndicate content 116 

Hi.

 

I'm facing a problem when I try to use the Runtime Expression below inside the XData Contents:

<html>#($$$Text("Testing!"))#</html>

It compiles correctly, but when I open the page on the browser I get the message "Expression Error" instead of "Testing!".

 

How could I use the $$$Text macro with Runtime Expressions? Is there a way to make this?

 

Thanks!

Last answer 27 May 2016 Last comment 27 May 2016
0   0 1
191

views

0

rating

I have seen a customer problem recently where the use of a virus scanner running over Caché databases was causing intermittent application slow downs and bad user response times.

This is a surprisingly common problem, so this short post is just a reminder to exclude key Caché components from your virus scanning.

Generally virus scanning must exclude the CACHE.DAT database files and Caché binaries. If an anti-virus is scanning CACHE.DATs and InterSystems files then system performance will be significantly impacted.

Specifically anti-virus software must exclude Caché files including the following:
* Caché databases (CACHE.DAT).
* Caché executable in the Ensemble/bin or cache/bin directory.
* Write Image Journal (WIJ).
* Journal files in the journal directory.

More details are available in the online documentation

Last comment 27 May 2016
+ 3   0 3
567

views

+ 3

rating

Hello, one of our application partner, is considering modernizing their old CSP laboratory portal by using Zen Mojo with Bootstrap. They have a lot of experience with COS, CSP and some ZEN. They are new to REST/JSON and have some limited knowledge of javascript - perhaps not enough to the extent used by client framework. 

They are trying to create their portal main page with header and footer fixed where at the header level is going to have a menu or navbar and at the footer level they would like to have some options (buttons, search options, text, messages, etc) dynamically loaded during run time. 

At the body level they would like to load the layout page accorging to the menu header option once selected. They would like not to repeat the header and footer code on all the template classes. They are really interested in to know wether is it possible or not  to have the header/footer as components?

Thanks.

Last answer 15 April 2016 Last comment 27 May 2016
0   0 2
2571

views

0

rating

NewBie's Corner Session: 5 Operator Precedence

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

Click on the Caché Cube in your system tray and select Terminal to try out the commands.

Order Precedence means the order in which mathematical operators are executed. In a Mathematical expression, you may have Multiplication, Addition, Subtraction, and Division. Which of these are executed first, second, third, etc.?

The basic Operator Precedence of mathematics is:

       Multiplication and Division has precedence over Addition and Subtraction

In normal mathematics when you encounter an expression like 5+7*10, the multiplication and division is executed first, and then addition and subtraction, so 5+7*10 is 75 (7*10=70+5=75).

However, in Caché the Operator Precedence is strictly left to right,

So:  5+7*10=120  (5+7=12*10=120)

0   0 2
0

comments

213

views

0

rating

Hi,

Our Cache server(version 5.0.15) has recently crashed. We are in the process of recovery. We had replaced the server's hard disk and trying to install the cache(5.0.15) But getting the following error. Any body show some light on the issue.

CctrlInstallStartCP( CACHE ) failed! Return value: 1
CctrlGetLastError() returned:

A problem was encountered while attempting to restore the write image
journal file (CACHE.WIJ). See the console log for more information.
If you want to start Cache without restoring the write image journal,
move the file to an alternate location.
Start up procedure terminated.

Error in Function: _CctrlGetLastError, in File: F:\WORK_5~1.15\vobs\install\nt\Install\SCRIPT~1_cctrl.rul, at Line: 49

Last answer 25 May 2016
0   0 1
0

comments

647

views

0

rating

Hi everyone!

     I am helping a partner to develop a new application and one of the things we are facing is that this WEB application will be used on different time zones.

     My first recommendation is that all timestamps should be drawn from $ZTimeStamp instead of $Horolog. That would allow the system to be draw the correct sequence of events even when they are generated on different timezones. 

     On the other hand, it is sometimes useful to know what was the local timezone at the moment the event was generated to compare to events generated on other systems or to correlate to people's recollection of facts (people deal with $Horolog concept of time)

Last answer 24 May 2016
+ 1   0 1
0

comments

327

views

+ 1

rating

Hi!

I am trying to create a %Installer script and I noticed from our documentation that %Installer's <CSPAuthentication> will only accept:

<CSPApplication>
Optional; within <Namespace>. Defines one or more CSP applications; the supported authentication flags are 4 (Kerberos), 32 (Password), and 64 (Unauthenticated). 

 

Is "Delegated" authentication supported? What is it's code?

 

Kind regards,

Amir Samary

Last answer 24 May 2016 Last comment 24 May 2016
0   0 2
228

views

0

rating

NewBie's Corner Session 4 The Plus Sign and Concatenation Operators

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

Click on the Caché Cube in your system tray and select Terminal to try out the commands.

Plus Sign (+) operator

Typically, the Plus sign (+) adds two numbers together. This is true in COS (Caché ObjectScript), but COS uses it in other ways as well.

Set the variable X to a value of +12

Set X=+12
Write X
12

Set the variable X to the value of +"ABC"

0   0 1
0

comments

204

views

0

rating

Hi everyone!

     I am trying to choose the best collation for a new application that will be running on a spanish locale (Chile).

     I can see there are database collations for Spanish1, Spanish2, Spanish4 and Spanish5. What is the difference between them? I can't find anything on our documentation. Should I simply choose the latest (Spanish5)?

Kind regards,

Amir Samary

Last answer 24 May 2016
0   0 1
0

comments

136

views

0

rating

Hi -

Let's say I want to override the HTML that is generated by provided ZEN Mojo Helper Plugins I use the onloadHandler method of my document page, retrieving elements, and modifying them using jQuery syntax.

For example, I'm using bootstrap, and, I want  the <button> element automatically generated with the use of the $navbar layout object, to collapse/expand a different <DIV> on my page, to the default one it produces. 

Is this the correct spot and approach to use ? 

thanks

Steve

Last answer 23 May 2016 Last comment 23 May 2016
0   0 1
132

views

0

rating

Good morning, I am using a tableNavigatorBar on a tablepane. I want to execute the onselectrow method of the tablepane each time the tableNavigatorBar is used to proceed to a tablepane record. Has anyone connected these two component in this way before? Thank you for any hints, input and/or comments.

Last answer 23 May 2016 Last comment 23 May 2016
0   0 1
154

views

0

rating

Hello!

I am trying to install Caché 2016 on a Debian Jessie machine; so I downloaded the latest release from WRC, OS RHEL x86_64, in tarball format.

I untarred it, then launched cinstall; unfortunately a library was missing. I then elected to kill all the processes (which wasn't easy), remove the two users created, and start again.

Unfortunately, for some reason, when I relaunch the install again, the install process still detects the old instance which I installed previously... And I cannot find where this information came from (I removed the install directory by hand entirely).

Where is this information located?

Last answer 20 May 2016 Last comment 20 May 2016
0   0 1
688

views

0

rating

Consider a design where there could be three or four or more servers and there is a need to have these eventually consistent between them all (and not considering database mirroring here).  

The current Caché documentation here demonstrates this well using object synchronization between two servers, however it doesn't indicate whether more than two servers can participate to create a "mesh type" deployment.  Below is a diagram of what I'm curious to know is possible to implement with Object Synchronization.

Last answer 19 May 2016 Last comment 19 May 2016
+ 1   0 1
151

views

+ 1

rating

In MySQL I have the following table:

CREATE TABLE `info` (
   `created` int(11)
);

And it is linked (via JDBC SQL Gateway) to Cache table mysql.info.  `created` field stores unix timestamp. So when I execute  this SQL in SMP:

SELECT created FROM mysql.info

I receive the following output (which is expected):

created
1435863691
1436300964

But I want to to display `created` field converted to ODBC timestamp format. To do that I call this SQL procedur

Last answer 19 May 2016 Last comment 19 May 2016
0   0 0
503

views

0

rating

Hi All, 

I am providing support to an AP about using document criteria on Multiple Templates (Explicit Dispatch).

I am trying to set the  criteria value from:

view.setDocumentKey('initial-search',{patirntId:tPatId});

 However it is not possible to get the criteria value on %GetJSONContent through pCriteria parameter object.

How can I do this with Multiple Templates on bootstrap plugin?

Thanks.

Last answer 17 May 2016
0   0 1
0

comments

143

views

0

rating

Hi, 
My name is Sergio Fernandes and I'm from Brazil.
I would like to know how can i use MVBasic at Cache Terminal or .csp.
My original problem is to converter Integer Numbers to Roman Numbers and consulting cache documentation I found "Conversion Codes" at http://localhost:57772/csp/docbook/DocBook.UI.Page.cls?KEY=GVRF_basicfeatures#GVRF_B127632
My version is Intersystems Ensemble 2013.1.6.950.0
Thanks a lot,

Sérgio Fernandes

Last answer 16 May 2016 Last comment 17 May 2016
0   0 3
221

views

0

rating

NewBie's Corner Session 2 Variables Set and Write commands

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

Session 2 – Click on the Caché Cube in your system tray and select Terminal to try out the commands.

Variables

Like other computer programming languages, Caché uses Variables and the values they represent to control programming. Variables are elements that represent data values. Manipulating and interrogating variables is at the root of programming.

  • Variable names are case-sensitive
  • Variable names should be no longer than 31 characters
  • Variable names must be either Alpha or Numeric characters. No underscores or dashes
  • Variables must start with either "%" or an alpha character (A, B, C . . . Z), lower or upper case
  • By convention, variable names that start with "%", are reserved for the system

Set command

+ 2   0 3
0

comments

204

views

+ 2

rating

Hello, our customer, large industrial company, is considering modernizing their old CSP application so it can run on multiple client device types, using responsive design.

They have a lot of experience with CSP and some ZEN.

They are new to REST and have some limited knowledge of javascript - perhaps not enough to the extent used by client framework.

Does anyone have a framework or a set of templates that you would be willing to share?

Thank you!

Dan Kutac 

Last answer 16 May 2016 Last comment 16 May 2016
+ 2   0 0
515

views

+ 2

rating

Hello,

I'm trying to connect to a Caché server from Atelier; the Caché server is 2015.x.

The address and port I'm trying to connect to is the SQL gateway server; and I get, each time, an "unexpected end of file from server".

Note that unfortunately, for the moment, I connect as _system... And the Caché install has the default privileges.

What am I doing wrong?

Last answer 13 May 2016
+ 1   0 1
0

comments

301

views

+ 1

rating

This is a bit weird.  I'm trying to use `DATEDIFF()` to calculate the time since the last message on an interface.  For some reason, when no messages are received, the number steadily decreases.  This is the opposite of what should happen.  Here is my current query and a few sequential result sets:

SELECT getDate() as now, max(TimeCreated) as latest, DATEDIFF (s,getdate(), max(TimeCreated)) as difference
FROM EnsLib_HL7.Message

 

now                  latest               difference  
-------------------  -------------------  ----------  
2016-05-13 11:05:31  2016-05-13 08:51:16  9945
2016-05-13 11:08:16  2016-05-13 08:51:16  9780    
2016-05-13 11:08:36  2016-05-13 08:51:16  9760 

Last answer 13 May 2016 Last comment 13 May 2016
0   0 1
363

views

0

rating

Hi,

If you want to import data from a mySQL export file (exported with mysqldump), you will find here a little script that could help.

Only the INSERT commands in the sql file are executed into Caché. Indices are not computed for better performance.
%NOINDEX, %NOCHECK and %NOLOCK are generated on each INSERT line.

Currently, the file can not contain a "),(" pattern inside the values part of the INSERT command. If this is the case, the line is skipped. This feature may be implemented in the extractValuesList method.

Feel free to improve it as needed. Unfortunately it's not guaranty bug free for the moment!

mysql.tools.xml_0.zip

Last comment 13 May 2016
+ 2   0 2
234

views

+ 2

rating

Hi -

 

I'm trying to figure out what is the best (or at least pros & cons) on how to manage login accounts in a multi-tenant SaaS web based application context.

Assume that a company is designing a collections of web based applications that they will be selling as "services" to their clients, and that these clients will each have their own "users" and "customers" that will be logging into these services.

In setting up these login accounts for the "users/customers" of the "clients" of the "company", does setting up a unique domain/user-pool context for each "client" make the most sense? And if so, when deploying updates to the applications, would each domain/user-pool context be replicated environments that would each need to be updated?

(I'm trying to figure out what makes any sense in terms of web-login-account management and ease of top-level administration)

Last answer 10 May 2016 Last comment 12 May 2016
0   0 2
230

views

0

rating

Hi!

I believe the simplest is (to work with csv delimited by ";"):


set file = ##class(%File).%New( "data.csv" )
    set sc = file.Open( "R" ) 
    if $$$ISERR(sc) quit    ; or do smth

    while 'file.AtEnd {
        set str=file.ReadLine() 
        for i=1:1:$length( str, ";" ) {
            set id=$piece( str, ";" ,i ) 
            write !, id  // or do smth
        }
    }
    do file.Close()

Possible options:

different variants of error handling with sc code.

Embrace while loop into try/catch block.

And what's yours?

Last comment 12 May 2016
0   0 6
2410

views

0

rating

Often when debugging COS code you get an error message such as '<UNDEFINED>test^routine *test' so the first thing you want to do is to take a look at this code and see what it is doing. From the command line you can:

ZLOAD routine ZPRINT test

Which means splitting the $zerror information into the routine name and the line and adding the zload/zprint commands. Also you often want to view the lines above the one where the error happened as this gives you some context of how you got to this line, using ZPRINT you could 'ZPRINT +1:test' but that may display hundreds of lines.

Since 2013.1 you can use ZZPRINT as follows:

ZZPRINT "test^routine":10

Which will print the 10 lines before the 'test^routine' line, so here you can cut/paste the line reference directly into the command and you can specify the number of lines before or after using this syntax where both the before or after can be blank

Last comment 12 May 2016
+ 5   0 5
469

views

+ 5

rating