Hi Developers!

As you know the application errors live in ^ERRORS global. They appear there if you call:

d e.Log() 

in a Catch section of Try-Catch.

With @Robert Cemper's approach, you can now use SQL to examine it.

Inspired by Robert's module I introduced a simple IRIS Analytics module which shows these errors in a dashboard:

+ 2   1 1
49

views

+ 2

rating

Hi Lucas,

I don't know if Cache or IRIS provides such feature. However, you could create a %Persistent class and link its data to ^ERRORS global in class's storage section.

Recently, @Robert Cemper did a great example mapping ^SPOOL global to a persistent class. May be this example could helps you.

José
 

Hi Robert,

Have you tired to export in UDL format (the UDL format is the document that we edit in Studio, VSCode, or in Atelier) via classmethod ExportUDL from the class %SYSTEM.OBJ

https://docs.intersystems.com/irisforhealth20201/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25SYSTEM.OBJ#METHOD_ExportUDL

To import you can use the classmethods Load, LoadDir  or any other method that load code from disk,. Or you can import from Studio to.

https://docs.intersystems.com/irisforhealth20201/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25SYSTEM.OBJ#METHOD_Load

For me worked export from:

IRIS for Windows (x86-64) 2020.1 (Build 215U) Mon Mar 30 2020 20:14:44 EDT

And import in:

Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2017.2.2 (Build 865U) Mon Jun 25 2018 10:50:02 EDT

In fact, It works!

Installation:

USER>zpm
zpm: USER>install terminal-multiline

[terminal-multiline]    Reload START
[terminal-multiline]    Reload SUCCESS
[terminal-multiline]    Module object refreshed.
[terminal-multiline]    Validate START
[terminal-multiline]    Validate SUCCESS
[terminal-multiline]    Compile START
[terminal-multiline]    Compile SUCCESS
[terminal-multiline]    Activate START
[terminal-multiline]    Configure START
[terminal-multiline]    Configure SUCCESS
[terminal-multiline]    Activate SUCCESS
zpm: USER>q

Usage with copy-n-paste from docs:

USER>d ^%zml
Entering multi line mode. Run with empty line. Stop with single "."
USER:zml:1> SET x=8
USER:zml:2>   FOR { WRITE "Running loop x=",x,!
USER:zml:3>         SET x=x-1
USER:zml:4>         QUIT:x=3
USER:zml:5>       }
USER:zml:6>   WRITE "Next command after FOR code block"
USER:zml:7> 
Running loop x=8
Running loop x=7
Running loop x=6
Running loop x=5
Running loop x=4

Next command after FOR code block
USER:zml:1>

It works like a charm!

Bravo, @Robert Cemper!

Hi Community!

We're pleased to invite you to the Online Meetup with the Winners of the InterSystems IRIS Native API Programming Contest!

Date & Time: Friday, June 12, 2020 – 11:00 EDT

What awaits you at this virtual Meetup? 

  • Our winners' bios.
  • Short demos on their applications.
  • A short interview with all the winners about the past contest. Plans for the next contests.

+ 3   0 2
120

views

+ 3

rating

Extending the reply of @Robert Cemper

  • The following query compiles without errors, even though Studio highlights the error
    &sql(select :fieldname into :fieldvar from :tablename)

    Everything is fine in Caché: the error occurs at the compilation-time.

    In order for an error to occur in IRIS Studio too you need to use the flag /compileembedded=1

  • It is strange that the documentation mentions field name, but there is no mention of table name:
    A host variable cannot be used to pass a field name or keyword into an SQL statement. proof

So, assuming @Vitaliy Serdtsev and @Robert Cemper answers we have:

Index ext [type = bitmap; Extent];

Is the must for every Persistent class, with standard ID, if we want to have fast answer on "How many records"

And the easiest and fastest "How many records" in this case is:

ClassMethod HowManyRecords(ByRef recordsCount as %Integer) As %Status

{
&sql(SELECT Count(1) INTO :recordsCount FROM schema_package.table)

IF SQLCODE<0 {WRITE "SQLCODE error ",SQLCODE," ",%msg QUIT}

}

@Robert Cemper

Whatever gets the process to work right!

I would consider WSL2 also.  Its probably just me, but conceptually I had a problem with running a virtual environment (VM) so I could run a virtual environment (Container).  WSL was not functioning well enough at the time so I went all in on Ubuntu as my native OS.

Good Luck ans

Thank you for your feedback @Robert Cemper 
I didn't run a benchmark, because in my case it's a deprecated class without intensive usage.

It's good to know the indirection performance is not bad. smiley

Interesting @Robert Cemper  !

I wrote a similar code the last year in order to have storage compatible Caché\healthshare and Iris.

We have a legacy persistent class mapped on ^CacheMsg global, my solution : 

<SQLMap name="CacheMsg">
<Data name="msg">
<Delimiter>"^"</Delimiter>
<Piece>1</Piece>
</Data>
<Global>@($s($zv'["IRIS":"^CacheMsg",1:"^IRIS.Msg"))@</Global>

It works very well, but perhaps a little bit slow due to indirection usage.

I'll keep this code until a complete migration to Iris and then It will be removed.

Hi Developers!

It's just a statement to let you know who is working for you this year as Developer Community Moderators. Here is our noble team!

English Community:

@Eduard Lebedyuk 

@John Murray 

@Dmitriy Maslennikov 

@Robert Cemper 

@Jeffrey Drumm 

@Scott Roth 

Spanish Community:

@Kurro Lopez 

@Nancy Martínez 

Moderators! thanks for your hard work to make this place busy and helpful!

Developers! You can meet in person all the moderators on InterSystems Global Summit 2020 in Seattle this year and on regional events. 

Stay tuned!

Last reply 5 March 2020
+ 3   0 4
87

views

+ 3

rating

Hi Developers,

2019 was a really great year with almost 100 applications uploaded to the InterSystems Open Exchange!

To thank our Best Contributors we have special annual achievement badges in Global Masters Advocacy HubThis year we introduced 2 new badges for contribution to the InterSystems Open Exchange:  

✅ InterSystems Application of the Year 2019

✅ InterSystems Developer of the Year 2019

We're glad to present the most downloaded applications on InterSystems Data Platforms! 

+ 2   0 1
0

replies

143

views

+ 2

rating

Hi Developers,

This post is a compilation of Top Authors, Top Experts and Top Opinion Makers of the InterSystems Developer Community in 2019. And it is a good guide "Who to Follow" in 2020.

We're glad to present these people who have contributed a lot to our community in 2019. 

Let's take a closer look at the DC Wall of Fame 2019 and greet everyone with big applause! 👏🏼 

+ 5   0 2
0

replies

111

views

+ 5

rating

Top 3 most discussed questions are about ObjectScript.

Top viewed questions are about ODBC, JSON, CORS and Excel.

Top 6 voted questions are about @Otto Karlinger and Otto's fan club ) Do you think guys we need to cancel voting for questions?

@Robert Cemper!

Congrats for amazing 142 votes for answers this year! This is a tremendous help to InterSystems Community and maybe an unbeaten record! Thank you so much, Robert, and thank you very much, experts, who solved so many problems and helped developers this year!

Hi Developers!

This is the digest of new solutions and applications submitted to InterSystems OpenExchange in December 2019!

New applications in December 2019

ObjectScript-Math 

Math library for InterSystems ObjectScript

Author: @Peter Steiwer , OEX Profile

 

JSONExportManyToMany

Sample for %JSONExport against a class with Many to Many Relationship

Author: @Peter Steiwer , OEX Profile
 

InterSystems ObjectScript zpm-registry

Server-side hosting service for ObjectScript packages installable via ZPM client.

Author: @Evgeny Shvarov, OEX Profile

Publisher: InterSystems Corporation

 

SUDOKU

SUDOKU game written in InterSystems ObjectScript

Author: @Robert Cemper, OEX Profile

 

Portlet Samples

Sample DeepSee Portlets showing different ways to implement custom widgets

Author: @Peter Steiwer , OEX Profile
 

Advent of Code ObjectScript Docker Template

A simple template to craft Advent of Code with ObjectScript in InterSystems IRIS

Author: @Evgeny Shvarov, OEX Profile

 

Ingestion Speed Test
Shows how IRIS can ingest thousands or millions of records per second while allowing for queries on the same cluster. Works on a single IRIS instance or on an IRIS cluster on the cloud.

Author: @Amir Samary, OEX Profile

 

John Conway's Game of Life

With this class, you could simulate Game of Life world that John Conway invented in 1970. We can see how John Conway universe evolves in our terminal

Author: @Jose Tomas Salvador, OEX Profile

+ 2   0 1
0

replies

50

views

+ 2

rating

Hi Community!

This is the update on what are the new applications submitted on OpenExchange in June 2019!

New Applications

Example Backup Task published by @Sergey Mikhailenko

Sample database backup copying task with prior deletion of outdated copies

A more useful Object Dump published by @Robert Cemper

This small helper class allows you to dump an object to terminal or
e.g in background to some stream for later review.

Samples BI published by @Evgeny Shvarov on behalf of InterSystems

This is a technology example of InterSystems Business Analytics tool with Cubes, Pivots, MDX Queries and Dashboards. The Sample is  formerly known as "Holefoods "

Interjob communication Demo published by @Robert Cemper

It's internal variant of PIPE

Last reply 10 July 2019
+ 2   0 2
96

views

+ 2

rating