Hello Everyone,

I'm want to know, what is more common for your company to use, the abbreviation syntax or the complety name of commands, and why?

Ex.

S VAR=10 / D FUNC^ROUTINE F 1:1:1000

Set VAR=10 / Do Func^Routine / For 1:1:1000

set var=10 / do func^routine / for 1:1:1000

Here in my company, we are familiar with the abbreviation syntax, because to spell is more faster.

2 35
0 916

Currently, when we want to write data to a file that will be viewed in Excel, we parse the data in tab deliminated format to the file and name it with .xls at the end. That is sent to end users via email. They get a warning that the data is not formatted properly (it's not really an Excel file after all) but it does display somewhat correctly as the tabs are understood (this does not work if we deliminated with commas however).

3 28
3 3.6K

I'm aware of two ways to get list of files in a dir:

set dir = "C:\temp\"
set rs = ##class(%File).FileSetFunc(dir, , , 1)
do rs.%Display()

and:

set dir = "C:\temp\"
set file=$ZSEARCH(dir_"*")
while file'="" {
   write !,file
   set file=$ZSEARCH("")
}

Yet they bot return only files and directories in a current directory, but not files in subdirectories.

I suppose I call one of these recursively, but maybe there's a better solution?

1 25
1 3.6K

Hi,

I have a program that displays the current running processes to the screen. I need to have a program execute that display program and capture the results to a file. The display program does pause at the bottom of each page waiting for an 'enter' to go to the next page.

Note( the display program will not successfully compile on the current system but it does work)

Also - very, very new to Mumps.

Thanks,

Bob

0 23
0 438

Hi guys!

As you know there are two (at least) ways to get the stored value of the property of InterSystems IRIS class if you know the ID of an instance (or a record).

1. Get it by as a property of an instance with "Object access":

ClassMethod GetPropertyForID(stId As %Integer) As %String

{

set obj=..%OpenId(stId)

return obj.StringData

}

2. Get it as a value of a column of the record with "SQL access":

0 18
0 908

All responses are appreciated. I am new to both scripting and CACHE so please bear with me. I am setting up a nightly backup script for freezing cache then backing it up and then thawing it back out. Currently when I enter the freeze command I am getting a response of access denied even though my id has %all access. I've tried passing the userid/password as a parameter in the externalfreeze command and passing it from a file. I've used my id and lastly I used the _system id in the file. What ID should I use for this or am I passing it wrong?

0 17
0 1K
Question
· Jan 3, 2019
n00b questions

Hello,

I have some beginner questions as I am working through the InterSystems Cache learning path:

- Where I work, we us Cache, but we often learning about and train on MUMPS. No one really talks about or mentions MUMPS here, but my understanding is that ObjectScript is basically MUMPS plus whatever new things InterSystems put on top of it. Is that a fair assessment?

0 16
0 646
Question
· Aug 28, 2018
Replace elements in $lb

Let's say I have a list structure:

set list = $lb("stri,ng", $c(0), 2)

I want to replace all $c(0) elements with empty elements, so my list would look like:

set list = $lb("stri,ng", , 2)

What's the fastest way to do that?

0 13
0 554
Question
· Jul 17, 2017
Connecting to a web service

Hi,

I am new to coding web services and trying to connect to an API that returns its format in xml or json.

I have a class as follows.. when I run I get back a 6059 in my status - Unable to open TCP/IP socket to server

Can someone help me identify what I am missing? Thanks

0 12
0 2.7K
Question
· Jul 16, 2019
Interface Monitoring

Hi all,

I'm looking to set up monitoring for several interfaces. I understand that I can set an Inactivity Timeout. However, obviously there are messages coming through more frequently during certain hours than other hours.

Is there a way to set an Inactivity Timeout for each hour of the day instead of one value that is used all day long?

Best,

Erin

0 12
3 687

I have a service that takes a file and pass it through to the production .While I am passing the file through I get the file stream and set it to a variable within my message and the variable is of type %Ens.StreamContainer. But after all processing and I need to write out my file to a pdf format The file gets written but is a corrupt file since I can not read it I have tried this with asimple pass through everything is fine .But here I do not know what I am doing wrong here is the operation code

0 11
0 782

Hello dear developers,

I am currently doing an internship and learning about InterSystems IRIS and ObjectScript and have downloaded and installed the community version of IRIS.

I have not made any changes in the Management Portal.
In Visual Studio Code I have loaded the InterSystems ObjectScript Extension Pack.

If I now want to compile a file, VSC throws an error:
"ERROR #16006: Document name 'x.csp' is invalid"

0 11
0 130
Question
· Feb 12, 2016
Get columns dynamically?

In MSSQL I think you can do something like this:

select *
from HS_IHE_ATNA_Repository.COLUMNS
where TABLE_NAME='Aggregation'

How can I do this in Cache SQL?

[%msg: < Table 'HS_IHE_ATNA_REPOSITORY.COLUMNS' not found>]

0 11
1 2.1K

Since now i have been working from external connection but i want to work with the SQL utility of Management Portal

i dont know how to do with several instructions like in other editors like this example

update Prod.Articulos set Alto = 1646, Ancho = 16, Fondo =  80 where CodigoNum = '100' and Empresa = 'CO'
update Prod.Articulos set Alto = 1646, Ancho = 16, Fondo =  400 where CodigoNum = '101' and Empresa = 'CO'
update Prod.Articulos set Alto = 1646, Ancho = 16, Fondo =  400 where CodigoNum = '102' and Empresa = 'CO'

it returns

0 11
0 648

I need to know if given package exists or not.

Currently found two solution - one doesn't work, another works but I don't like it.

Solution 1.

I started, of course, with %Dictionary package - it has PackageDefinition class after all.

However, %ExistsId returned 0 on packages that clearly do exist, so I went to %LoadData, it uses this macro to determine if the package exist:

0 10
0 331

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"
}

0 10
0 1.8K
Question
· Dec 15, 2017
cache operator

In if condition what is the difference between specifying the single operator and double operator? For example, what is the difference between (&& and &) or (|| and !)

0 9
0 697
Question
· Jul 21, 2017
Ens.StreamContainer

Hi All,

I am fairly new to Ensemble and I wanted to know I have inbound business service (EnsLib.File.PassthroughService) which is looking for pdf files once it finds a pdf file (within the business process) it needs to find the associated xml file which would be in the same directory. Once both of these files are found they need to be sent to the business operation and deleted from the source (EnsLib.File.PassthroughOperation).

0 9
0 1.4K