ObjectScript

Syndicate content 32 

I am running a ZBREAK trace on a legacy FDBMS application that uses arrays but rather than displaying the array value contents, I am seeing logs similar to the following.

Trace: ZBREAK SET LINE=Array Val at BIOPWR+6^BIOPWR

My ZBREAK trace settings are as follows: 

Last answer 3 August 2017 Last comment 3 August 2017
0   0 1
176

views

0

rating

Hi community,

I have some constants hardcoded in my class as parameter values, and those constants are referenced in many places in my module. Now the need has arisen to provide different value for those parameters depending on some context. Is it possible to create some sort of accessor method for the parameter (like it is possible for properties), or do I need to perform a thorough refactoring?

Thanks.

Jiri

 

Last answer 3 August 2017
0   0 1
0

comments

167

views

0

rating

Hi,

How can I read the stack of another process?

I know about ^JOBEXAM, but I only know how to use through terminal, and I need to get a string, or at least do a method that returns me a string

For example:

I have process A and B

B monitors process A at each second.

B logs information about process A in a table

Informations about lock I get through %SYS.LockQuery and the process through %SYS.Process

Last answer 28 July 2017 Last comment 2 August 2017
0   0 2
280

views

0

rating

Good day,

 

I would like to know how to detect in Caché ObjectScript if data saved in string is number and furthermore, if it's type is integer.


I maybe found a solution:
 

set value = "44.2d3"

try{
     set status = $INUMBER(value,"")
     if ('$FIND(+value,".")){
          w "your variable: '"_value_"' is number and integer"
     }else{
          w "variable is number but no integer"
     }
}catch(e){
     w "variable is not number" 
}

Last answer 1 August 2017 Last comment 31 July 2017
0   0 3
645

views

0

rating

Hi, folks!

Suppose I have a CSP app, which provides some service.

And the code of my App knows the name of the CSP App in form: /myappname

How can I programmatically obtain the URL for CSP apps to send the full qualified link to the users(e.g. via email) of my app?

E.g. https://productionserver.com/myappname

 

Last answer 31 July 2017 Last comment 1 August 2017
+ 1   0 2
217

views

+ 1

rating

In this article I would like to tell you about macros in InterSystems Caché. A macro is a symbolic name that is replaced with a set of instructions during compilation. A macro can “unfold” in various instruction sets each time it is called, depending on the parameters passed to it and activated scenarios. This can be both static code and the result of ObjectScript execution. Let's take a look at how you can use them in your application.

Last comment 24 July 2017
+ 8   0 5
1071

views

+ 8

rating

Hi,

I have a situation where I write a character stream to a file. The file content gets signed and the signature is sent to a service provider together with the file content.

The signing is done using openssl.

This works perfectly on a dev PC, which is runnning Windows and has a little-endian architecture.

The problem is as soon as I do this on the server, which has a big-endian architecture, the signed value is incorrect according to the service provider.

The content is signed using RSA SHA256 with PSS padding.

Last answer 17 July 2017 Last comment 18 July 2017
0   0 2
1206

views

0

rating

It is my understanding that when a routine accesses a global it is temporarily stored in global memory. While the global is within global memory, any other routine would be able to readily access the global from memory and not from disk so long as the same node is being utilized.

Last answer 12 July 2017 Last comment 17 July 2017
+ 2   0 1
192

views

+ 2

rating

Hi everyone

Is there any way to change a class definition (especifically a query definition during the compilation time)?
The idea is: 
    I have an abstract class with a parameter where I will define the ROWSPEC of a query and some methods to populate e temporary table
The implementation class will override the parameter, specifying the ROWSPEC of this implementation, and the methods will populate the rows in the same format as the ROWSPEC.

Last answer 14 July 2017 Last comment 17 July 2017
0   0 2
264

views

0

rating

I am working with Caché Relationships.

I know how to iterate through the One side of the relationship and for each One iterate through all the various Manys.

What I have been trying to figure out, is the code (I can put into a Class) that will start at the top of the Manys, iterate down and for each of the Manys, pull the associated One.

I can do this with SQL or Globals, but I want to use only Class type code.

Is that clear? Any help?

Last answer 11 July 2017 Last comment 12 July 2017
0   0 1
216

views

0

rating

Quotes (1NF/2NF/3NF)ru:

Every row-and-column intersection contains exactly one value from the applicable domain (and nothing else).
The same value can be atomic or non-atomic depending on the purpose of this value. For example, “4286” can be
  • atomic, if its denotes “a credit card’s PIN code” (if it’s broken down or reshuffled, it is of no use any longer)
  • non-atomic, if it’s just a “sequence of numbers” (the value still makes sense if broken down into several parts or reshuffled)

This article explores the standard methods of increasing the performance of SQL queries involving the following types of fields: string, date, simple list (in the $LB format), "list of <...>" and "array of <...>".

+ 6   0 3
0

comments

385

views

+ 6

rating

I needed to pass through a file with Ensemble but the operation wasn't writing some filenames as given because the  EnsLib.File.PassthroughOperation 'sanitizes' filenames removing characters that are not valid on some operating
systems;
09000655_AEDC_C3344059_A&#47;E_Martin Browne_09000655_201706221018.pdf
09000655_AEDC_C3344059_A#47E_Martin_Browne_09000655_201706221018.pdf

+ 1   0 2
0

comments

292

views

+ 1

rating

Caché offers a number of methods for going through a collection and doing something with its elements. The easiest method uses a while-loop and lets you fulfill the task in an imperative manner. The developer needs to take care of the iterator, jumping to the next element and checking if the loop is within the collection.

Last comment 4 July 2017
+ 13   0 3
1290

views

+ 13

rating

Good day, I have this issue. I have global like: ^myglobal(varX) = $LB(var1,var2). I need to delete all globals that have variable var1 in that list same without a need to iterate through all globals and checking their value.

Exact example:

- in database exist following:

Last answer 3 July 2017 Last comment 4 July 2017
0   0 1
435

views

0

rating

Good day, I would like to find out the size of Caché ObjectScript variable in order to guarantee that my program will not leak, equally in terminal and Caché globals.  For example how huge number I can store in that variable ? And what happen in Caché when variable will leak ? How is this behavior treated? (how much memory is reserved for common variable?)

Thanks  in advance for your answers.

Last answer 3 July 2017 Last comment 3 July 2017
0   0 1
313

views

0

rating

This is a translation of the following article. Thanks [@Evgeny Shvarov] for the help in translation.

This post is also available on Habrahabrru.

The post was inspired by this Habrahabr article: Interval-associative arrayru→en.

Since the original implementation relies on Python slices, the Caché public may find the following article useful: Everything you wanted to know about slicesru→en.

Note: Please note that the exact functional equivalent of Python slices has never been implemented in Caché, since this functionality has never been required.

And, of course, some theory: Interval treeru→en.

All right, let’s cut to the chase and take a look at some examples.

Last comment 27 June 2017
+ 4   0 1
417

views

+ 4

rating

I am trying to balance a query using a SQL Inbound Adapter against the output of Ensemble. I am finding that a couple of records here and there are missing in the output file. 

Most of our queries are based of of views which may or may not have a unique key.

So If you don't have a Delete Query in your settings and Key Field Name is blank, it is possible that some records may or may not make it through to your endpoint?

Thanks

Scott Roth

Integration - Interfaces

The Ohio State University Wexner Medical Center

0   0 1
0

answers

0

comments

143

views

0

rating

I have come across several cases where I need to set a Date filter to send only send any admit/scheduled date past a certain point. We have a couple different date comparison functions but none looking at the true date. Most of them are date + 15 or etc. Does anyone have a good date function they have written to say if x > 20170102 ?

 

Thanks

Scott

Last answer 20 June 2017
0   0 2
0

comments

485

views

0

rating

Here's my issue. I've been using Sample.* globals and packages mapped to another development namespace to realize unit tests. So when I ran it, I notice that I forgot to start a transaction in order to be able rollback it to it's original data.

I assumed that I should use transactions since I was manipulating it's data but I didn't want it to be persisted.

Last answer 13 June 2017
0   0 2
0

comments

175

views

0

rating

I have a case where I am creating a PDF file from an Encoded String, and I need to transfer this file over to another server. I was wondering since this is PDF file if I could just invoke the FTP.OutboundAdapter within my Object script that is creating the PDF from the encoded string. Is this possible? Does anyone have an examples of using EnsLib.FTP.OutboundAdpater within their Object Script?

Thanks

Scott Roth

Integration - Interfaces

The Ohio State University Wexner Medical Center

Last answer 9 June 2017 Last comment 12 June 2017
0   0 2
259

views

0

rating

Hello experts,

I’m working on an "Sort After" (]]) bug that I traced back to some weird behavior in ObjectScript.  Perhaps someone can enlighten me…

The problem is as follows:

Let’s say we have:

Set A = “1.0”
Set B = “2.2”

If you execute the command ‘Sort After’ (]]), you get the following:

W A]]B
​1

…Which is wrong, A does NOT sort after B.  The output should be 0.

If you set A and B to numeric values, it correctly outputs false (0):

set A = 1.0
set B = 2.2
​W A]]B

0

Last answer 8 June 2017 Last comment 8 June 2017
0   0 6
232

views

0

rating

I need to guarantee that a parent AND child rows has been inserted successfully before any other process is able to read ANY of the data.

What is the proper way to prevent DIRTY reads?  Per the Intersystem's documentation I should be able to use 'START TRANSACTION ISOLATION LEVEL READ COMMITTED'.  I have attempted to use these commands in embedded and dynamic SQL calls to no avail.

Last answer 2 June 2017 Last comment 2 June 2017
0   0 0
368

views

0

rating