Hi everyone,

I'm having trouble parsing XML containing unicode characters which I receive from an external webservice. I believe my file is saved properly with UTF-8 encoding but the SAX Parser still throws me an error.

I have 2 classmethods: 1 general one (get) to make a request to a webservice and return the date, and 1 (getSportsPerDate) to make a specific call and then parse the data.

0 5
0 2.2K

Hi, folks!

Suppose you have a Caché class with %String property which contains relatively large text (from 10 to 2000 symbols).

The class:

Class Test.Duplicates Extends %Persistent 

{

Property Text As %String (MAXLEN = 2000);

}

And you have thousands of entries.

What are the best options to find entries which are duplicates on this property?

0 26
1 1.3K

We are trying to convert some of our SQL Service Integration Service jobs from Visual Studio to Ensemble. If we execute a Stored Procedure within SQL Server Management Studio it is returning approx 12,000 rows. However when Ensemble executes the same Stored Procedure it is only returning 250 rows.

Is there a limitation to EnsLib.SQL.Snapshot?

This is how we are calling the Stored procedure

0 4
0 787
Question
· Oct 18, 2017
Rebuild class index

I have a class. In class there is an index. This index is for quick search on name property.

Class User
{

.....

Property Name as %String;

Index NameInd On Name;

.....

}

This class is mapped to some global ^GL(userId) = "Name*other data....****"

And there is also index global ^GLNameIndex(Name, userId) = ""

When I add new User entry through class, f. i.

S user = ##class(User).%New()
S user.Name = "Some name"
​D user.%Save()

calling method %Save() adding new entry to index automatically.

0 6
0 1.3K

Hi,

I know you're doing a big effort to build a new IDE in Eclipse ecosystem but Visual Studio Code is a new an even better and faster tool for coding... did you have any plans to release any COS extension for it in the near future? There you can already find extensions for all current more common progrmaming languages and it would be great to have COS as one of them.

Thanks

2 5
0 1.4K
Set httprequest=##class(%Net.HttpRequest).%New()
	Set httprequest.Server="www.intersystems.com"
	Do httprequest.Get("/")
	Do httprequest.HttpResponse.OutputToDevice()
	Do httprequest.Get("/cache/")
	Do httprequest.HttpResponse.OutputToDevice()

The above is the code which i found in this link http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?P...

0 5
0 3.2K

Recently, we scheduled two tasks (1008 and 1009) within Task Manager. Task ID 1008 is set to run after Purge Tasks (%SYS-ID:3), and Task 1009 is set to run at 7:00:00 each day.

In attempt to provide as much detail as possible, each of the tasks are as follows:

  • Task 1008

    WHILE (($p($h,",",2) < $ZTH("10:00 PM")) && ($P($g(^Task.1008(+$h,$j)),"^",1) = +$h)) { J ^ROUTINE, ^ROUTINE2 D SUB^ROUTINE3 H 5 }

0 4
0 730
Question
· Sep 21, 2017
Searching Refactoring tool

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.

0 4
0 327

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

0 8
0 3.6K

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!

0 4
0 573

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

0 4
0 499

Currently, we are utilizing batch jobs at the OS level to kick off routines that watch for files. We are trying to convert these processes to be performed by the Task Manager.

The routines have while loops and perform while loops so long as the time parameters are being met.

What's the best way to ensure Task Manager kicks them off after the completion of the shutdown/backup/start process is performed, which we do nightly? I want to ensure that it starts it regardless of the time that we've set.

0 13
0 917
Question
· Aug 31, 2017
Extract piece of string

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:

0 3
0 658

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
0 8
0 1.6K
Question
· Aug 25, 2017
Runtime type detection

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!

0 31
0 1.1K

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.

0 3
0 650