ObjectScript

Syndicate content 32 

Hi,

I'm in the process of trying to convert my team to a Git-based workflow for source code version management (we use Ensemble and HealthShare, but build a lot of customizations on top). We are having a hard time working with Atelier in this regard for a few reasons:

Last answer 3 May 2016 Last comment 29 January 2019
+ 2   0 1
997

views

+ 2

rating

Hello community!

At the global summit in Phoenix, we (Lite Solutions) will be presenting a tool performing static code analysis on ObjectScript source files. You can see it in action at this URL:

https://demo.cachequality.com

Technically, the tool is a language plugin over SonarQube (http://sonarqube.org) and consists of three main parts:

Last answer 5 April 2016 Last comment 28 August 2018
+ 5   1 7
943

views

+ 5

rating

Is there a way to have a Data Lookup table be automatically updated via a script or cache code? We have a file that is being created by our EMR, and we need to import it into Ensemble to update it. Just trying to see if we can automate this process.

 

Thanks

Scott Roth

Ohio State University Wexner Medical Center

Last answer 11 January 2017 Last comment 11 January 2017
0   0 0
498

views

0

rating

Is there any way that I can check the native type of an object script variable? (similar to the typeof check in javascript)

 

I see that the DynamicArray class uses the type of the variable for its output, I would like to do something similar when I receive a value as an argument to my method.

USER>s var1 = 123  //No quotes, number type
 
USER>s var2 = "123" //quotes, string type
 

Last answer 9 December 2016
+ 1   0 2
0

comments

281

views

+ 1

rating

We don't often use SQL within our org, which is mostly due to the performance issue we experience due to the quantity of data we are reviewing.

Aside from the standard performance measures for non-Caché databases, are there any recommended approaches when querying large tables?

The table would have roughly 50M records, but there are not a finite amount of sub-nodes.

Last answer 2 December 2016 Last comment 6 December 2016
0   0 4
460

views

0

rating

A new Health Connect customer has a few experienced Java folks on their interface team. As they get more into Health Connect and learn Caché ObjectScript they thought it would be useful to have a list of common Java statements with an equivalent statement in ObjectScript. They mentioned string manipulation as an example, but would be interested in other areas as well.
 
This seems like something that is probably already floating around somewhere. Does anyone have something like this or other "COS jumpstart for Java devs" materials?

Thanks,
Marc

 

Last answer 14 November 2016
+ 1   0 1
0

comments

226

views

+ 1

rating

I try to run the cmd command in the studio terminal, but i am getting the <NOTOPEN> Error.

Even ZF(-1) also not working. Any help, Please!!!

 

Note: i restart the Cache instance service with full privilege

 

Code:

Set Path="mkdir E:\Sample\New"

Open Path:"QR":10

Error:<NOTOPEN>

 

This command working on my PC, but on server throws error.

 

Many Thanks

Last answer 4 November 2016 Last comment 4 November 2016
0   0 2
297

views

0

rating

Can somebody explain this behaviour of Cache (and many other calculating machine as well) :

WRITE 1/3*12

4

WRITE 1/3*5

1.666666666666666667

W 1/3*18

5.999999999999999999

W 1/3*21

6.999999999999999999

W 1/3*24

7.999999999999999999

How can we make more occurate caculations in Cache ?

Last answer 3 November 2016
+ 1   0 2
0

comments

446

views

+ 1

rating

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

Last answer 9 September 2016 Last comment 30 September 2016
+ 1   0 1
619

views

+ 1

rating

I've been trying to write a method to compare two local variables, which may be arrays, for "equality" - that is, to see if they have all the same subscripts (if they're arrays) and values. This is the best I've come up with so far - are there any better/simpler approaches out there?

Last answer 11 July 2016
+ 1   0 1
0

comments

668

views

+ 1

rating

Hello!

In Caché there is a way to print all current variables using write command without arguments:

USER>set Einstein = 1879
USER>set Mozart = 1756
USER>write
Einstein=1879
Mozart=1756

But is there a way to get a list of this variables? I am looking for something that would return value like $LB("Einstein", "Mozart") for this case.

Thanks!

Last answer 30 June 2016 Last comment 30 June 2016
+ 2   0 1
885

views

+ 2

rating

Hi,

I have a bit of code that does a find and replace on a "template" and inserts additional content. For example it replaces the @DATA@ with an html table:

<html>

   <body>

      <div id="data">@DATA@</div>

   </body>

</html>

Currently doing this with the $replace function:

Set text=$replace(text, "@DATA@", data)

Last answer 16 June 2016 Last comment 18 June 2016
0   0 1
631

views

0

rating

Hello!

Are there any short ways of serializing COS entity to the string? I am searching for something like .$toJSON() , but I need Caché 2013.* support.

The one way I supposed to work is to use $listbuild:

 

set str = $LISTTOSTRING($LB(1,2,3,",",5))
set list = $LISTFROMSTRING(str,",")
zw list
list=$lb("1","2","3","","","5")

 

Last answer 13 June 2016 Last comment 14 June 2016
+ 1   0 3
1540

views

+ 1

rating

We have noticed that when compiling with Atelier (either Atelier itself or sending the code through the REST interface) that the build will fail if all brackets '() {} []' are not closed. This includes brackets opened in comments.

 

For example, this will fail:

class myclass

{

//if someVar {

}

 

I do not know if this issue has been fixed or if this issue has been brought up, but it has been a nuisance over here.

Last answer 7 June 2016
+ 1   0 1
0

comments

200

views

+ 1

rating

Hello!

I have a WebSocket application which spawns new process using JOB command.

Sometimes WebSocket connection can be terminated, and in the meantime I need to hold spawned process alive until it can be associated with the new WebSocket connection. (Do not suggest serializing process state here instead please)

Last answer 6 June 2016 Last comment 7 June 2016
0   0 2
174

views

0

rating

I am just trying to make a quick hand off HTTP production. I have the class built and compiled onto the server and the production is running as a service. When the production is called (by an inbound job) I can see that the HTTP.InboundAdapter is being used successfully and the stack continues all the up to ProcessInput where OnProcessInput is called in Ens.BusinessService.

Last answer 25 May 2016 Last comment 1 June 2016
0   0 2
763

views

0

rating