ObjectScript

Syndicate content 32 

Hoping someone can help.

I need to convert a timestamp from the following format (YYYYMMDDhhmmss e.g. 20160105125915) to UTC time in the same format.

I presume I need to convert it to the system format ( like $HOROLOG ) and then use something like ConvertTimeStampToHorolog or perhaps LocalWithZTIMEZONEtoUTC but not sure of the syntax.

Thanks,

Conor

 


 

Last answer 21 September 2017 Last comment 20 September 2017
0   0 1
939

views

0

rating

Hello everybody,
we would like to be able to analyze a rather complex software application, which has been programmed in “M” for a number of years by different developers, by means of a tool.
Our goal is to find a starting point for a code refactoring process. In the long run we would like to gradually eliminate the code growth points.
Does anyone know of a tool that can help us to do this?
So far, we have only found "RE / m" etc. by George James Software, but we do not yet know if these tools will help.

Last answer 21 September 2017
0   0 1
0

comments

196

views

0

rating

Hi all.

I have been using  a command pipe to open/run UNIX scripts for months without issue.  We recently installed the 2016 Caché Upgrade and now I'm getting the following error when opening the pipe:

<PROTECT> *OPEN[Q](|CPIPE|)

I assume some security or permission setting is to blame, but I'm not sure exactly what.  Here's the snippet of code...

s cpipename="|CPIPE|"
s filepath="/path/script"
​o cpipename:(filepath:"R"):10

Any feedback would be greatly appreciated!

Last answer 15 September 2017 Last comment 18 September 2017
0   0 1
206

views

0

rating

Hello guys,

I was wondering whether there is another alternative to extracting a certain string out from a bigger one, rather than using the function $piece.

Maybe regular expressions? Another specific function?

Example:

Big string:

NAD+SLA+++TextIsHereNAD+SLA+++TextIsHere

String I want to extract:

TextIsHere

Function I'm already using:

Last answer 15 September 2017
0   0 1
0

comments

331

views

0

rating

Cache 2016.2.1

the system offers $LISTNEXT as a way of looping  in $LISTs and the documentation says this is much more efficeint than writing

for i=1:1:$LISTLENGTH(myList) { set value = $LIST (myList,i) }

I want to walk backwards in the list,

is there a $LISTPREVIOUS or do I have to use the followng syntax to achie

 for i=1:-1:$LISTLENGTH(myList)

kevin

Last answer 15 September 2017 Last comment 14 September 2017
0   0 0
228

views

0

rating

Introduction

Twilio is a great tool for programmatically initiating and managing phone calls. In this example we'll go over basic account setup, create a Cache Class to manage our interaction with the Twilio API, and initiate a phone call from the Cache Terminal.

The full Class used in this example is available on GitHub as well.

+ 3   0 1
0

comments

439

views

+ 3

rating

XDATA is used for a whole host of ISC libraries to store things like Zen pages, BPL logic and DTL transformations.

XDATA is the equivalent of XML config files of the JAVA world and JSON config files of the JavaScript / NPM world.

Whilst Atelier looks to shift source code to the disk, XDATA will remain a key component to source control our projects config / meta data.

Last comment 7 September 2017
+ 3   0 4
512

views

+ 3

rating

SOLVED

tl;dr how can you tell if a number is really a string

The original question has been updated/improved.

Equality comparisons on floating point numbers will produce different results...

"1.1"=1.1  //is true!

"0.1"=0.1  //is not true :(

This second comparison can be fixed with...

+"0.1"=+0.1 // is true!

Last answer 31 August 2017 Last comment 1 September 2017
0   0 2
575

views

0

rating

Is it possible to dynamically adjust the RetryInterval andFailureTimeout settings in a BPL?

I've got a business process that calls a web service operation to get a session ID from an external system.  There is a string property returned in the body of the response that indicate an exception occurred in the external system. I have code in the BPL that examines the property and sets the status property to an error status when that occurs.

Last answer 30 August 2017 Last comment 31 August 2017
0   0 1
272

views

0

rating

Good afternoon - 

I'm in the process of learning to make COS calls to REST-based web services and while I am having success, I'm struggling on how to parse out the results (I admit I'm very green at this):

Here's the code retrieving the JSON response:

Last answer 30 August 2017 Last comment 30 August 2017
0   0 1
574

views

0

rating

Hi, folks!

I'm sending emails with %Net.MailMessage.

How can I add a new line for the email body?

The code is:

dim msg as %Net.MailMessage = ##class(%Net.MailMessage).%New()
set msg.Charset="UTF-8"
do msg.TextData.Write("Dear  "_Username)
do msg.TextData.Write("Line1")
do msg.TextData.Write("Line2")
And I'm getting in email:
Dear UserLine1Line2

How can I get:

Dear User

Line1

Line2
Last answer 28 August 2017 Last comment 28 August 2017
0   0 3
357

views

0

rating

This article will describe and include an example of how to embed an external PDF file into an HL7 segment, specifically ADT_A01:2.3.1 OBX().  This can be useful when attempting to insert pictures or other external data into an HL7 message.  In this example, the name of the PDF file to be embedded is provided in the incoming HL7 message in OBX(1):ObservationValue field.

Last comment 23 August 2017
+ 8   1 1
3683

views

+ 8

rating

I know there are numerous Java libraries available to scan a PDF meta data, but is there a way to scan a PDF using native cache object script? We are looking to take a PDF from an external vendor, scan for meta data, create the HL7 message, and embed the PDF within the HL7 message.

Thanks

Scott Roth

The Ohio State University Wexner Medical Center

Last answer 18 August 2017 Last comment 2 August 2017
0   0 3
556

views

0

rating

Has anybody defined their own Cache ObjectScript (COS) commands and symbols? Is it even possible? For a list of currently used commands and symbols please use the following link.
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS

Last answer 16 August 2017 Last comment 16 August 2017
0   0 3
230

views

0

rating

Hello!

Intersystems is a fascinating yet niche marketed.
We are using it, but we struggle to find good developers to join us to work on Caché or Ensemble products.

Who is interested into joining us? the job will be in Geneva, Switzerland!

For more information, please drop me an email to: erika.stegagnini@ch.randstad.com or call me directly +41 58 2015408.

Thanks!
Erika

+ 1   0 2
0

comments

466

views

+ 1

rating

Good day, every process in my software is about to update 3 specific globals in row when the process is called to do some job. I need to guarantee that during updating of those globals with multiple processes there is only one process that is actually working with those globals. Moreover I need my globals unreadable if other process is in critical area.


Example:

Last answer 14 August 2017 Last comment 14 August 2017
+ 1   0 2
308

views

+ 1

rating

I am currently working on a issue with WRC on one of my Inbound SQL Adapters not returning all the records it should be. If I looked at the count of the records in Ensemble and compare it to that of a Microsoft SQL View, Ensemble seems to be off by a few records here and there. I am using a full dynamic select statement in my settings of the adapter.

SELECT Text, PhysicianLastName, PhysicianFirstName, PhysicianAddress1, PhysicianAddress2, PhysicianCity,

Last answer 20 July 2017 Last comment 14 August 2017
0   0 1
338

views

0

rating

Hello everyone .

I am trying to update a setting of an operation directly via the code of a business operation.

Concretely, my customer want a counter for the number of calls to the operation and the possibility to redefine the point of this counter.

Last answer 8 August 2017 Last comment 14 August 2017
+ 1   0 3
253

views

+ 1

rating

Good day,

I need to find out if it is possible somehow to receive actual linux TIMESTAMP for example with $NOW() or other functions.
I was trying to recalculate it with $NOW() function, but without success. I would like to simulate Redis TIME command in COS.


My tryings:

USER > set time = $NOW()

USER > w (($PIECE(time,",",1)*86399) + $PIECE(time,",",2))
5573319043.403186

But in Redis it is:

Last answer 11 August 2017 Last comment 11 August 2017
0   0 1
321

views

0

rating