Rechercher

Article
· Juil 29, 2020 5m de lecture

SQL for ^ERROR Global

Standard error logs in IRIS / Caché / Ensemble are written global ^ERRORS.
As this piece dates back some decades back to previous millennium its structure
is far from the typical SQL storage structures.
The global is written by routine ^%ETN.int and the content becomes visible from
terminal command line by routine ^%ERN or in Mgmt Portal as Application Error Log.

It is just not available to SQL as there is no Class wrapped around.
For several reasons:

  • When it was designed it was good practice to have index like structures in the same globals as the data. If I say 'like', this means it is of no use for SQL.
  • As next the content of objects are going to deeper levels than the rest. As a consequence, the depth of subscripts (typically IdKey) varies from 3 to 11.

^ERRORS is independent in every namespace
It is structured by Day,SequenceByDay, Type, ItemName (Variable, OREF),Value
zrcc.ERRORStack covers this as SQL table.
Deeper content of the objects becomes visible by the included custom query.
The SQL procedure zrcc.ERRORStack_Dump(Day,Sequence) returns all available
content and presents subscripts and values as you see in global listing.

How to make best use of both components:

First:  find your day and sequence number using SQL

Example: SELECT * FROM zrcc.ERRORStack where item='$ZE'

    Day	 Seq	Stk Type	Item	Value
2020-07-02	1	 0	   V	  $ZE	<WRITE>zSend+204^%Net.HttpRequest.1
2020-07-07	1	 0	   V	  $ZE	<WRITE>zSend+204^%Net.HttpRequest.1
2020-07-15	1	 0	   V	  $ZE	<WRITE>zSend+204^%Net.HttpRequest.1
2020-07-20	1	 0	   V	  $ZE	<LOG ENTRY>
2020-07-26	1	 0	   V	  $ZE	<WRITE>zSend+204^%Net.HttpRequest.1

Then in SQL:     CALL zrcc.ERRORStack_Dump('2020-07-26',1)

Row count: 541 Performance: 0.026 seconds  6557 global references
Ref	                                Value

2020-07-26,1,"*STACK",0,"V","Routine")	zSend+204^%Net.HttpRequest.1
2020-07-26,1,"*STACK",1,"I")	1^S^^^0^
2020-07-26,1,"*STACK",1,"L")	1 SIGN ON
2020-07-26,1,"*STACK",1,"S")	
2020-07-26,1,"*STACK",1,"T")	SIGN ON
2020-07-26,1,"*STACK",1,"V","%dsTrackingKeys","N","""Analyzer""")	6
2020-07-26,1,"*STACK",1,"V","%dsTrackingKeys","N","""Architect""")	7
2020-07-26,1,"*STACK",1,"V","%dsTrackingKeys","N","""DashboardViewer""")	8
2020-07-26,1,"*STACK",1,"V","%dsTrackingKeys","N","""ResultSet""")	9
2020-07-26,1,"*STACK",1,"V","%objcn")	2
2020-07-26,1,"*STACK",3,"V","Task")	<OBJECT REFERENCE>[1@%SYS.Task]
2020-07-26,1,"*STACK",3,"V","Task","OREF",1)	142
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,0)	3671
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,1)	+----------------- general information ---------------
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,2)	| oref value: 1
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,3)	| class name: %SYS.Task
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,4)	| %%OID: $lb("13","%SYS.Task")
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,5)	| reference count: 5
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,6)	+----------------- attribute values ------------------
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,7)	| %Concurrency =
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,8)	4 <Set>
- - - 
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,53)	| EmailOutput =
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,54)	0
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,55)	| EndDate =
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,56)	""
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,57)	| Error =
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,58)	"<WRITE>zSend+204^%Net.HttpRequest.1"
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,59)	| Expires =
- - -
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,111)	| Status =
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,112)	"0 "_$lb($lb(5002,"POST to Server Failed",,,,,,,,$lb(,"%SYS",$lb("$^zSend+204^%Net.HttpRequest.1 +1","$^zPost+1^%Net.HttpRequest.1 +1","$^zSendData+20^FT.Collector.1 +1","$^zTransfer+12^FT.Collector.1 +1","$^zOnTask+3^%SYS.Task.FeatureTracker.1 +1","D^zRunTask+74^%SYS.TaskSuper.1 +1","$^zRunTask+54^%SYS.TaskSuper.1 +1","D^zRun+26^%SYS.TaskSuper.1 +1"))),$lb(6085,"ISC.FeatureTracker.SSL.Config","SSL/TLS error in SSL_connect(), SSL_ERROR_SSL: protocol error, error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed",,,,,,,$lb(,"%SYS",$lb("e^zSend+303^%Net.HttpRequest.1^1","e^zPost+1^%Net.HttpRequest.1^1","e^zSendData+20^FT.Collector.1^1","e^zTransfer+12^FT.Collector.1^1","e^zOnTask+3^%SYS.Task.FeatureTracker.1^1","e^zRunTask+74^%SYS.TaskSuper.1^1","d^zRunTask+54^%SYS.TaskSuper.1^1","e^zRun+26^%SYS.TaskSuper.1^1","d^^^0"))))/* ERROR #5002: Cache error: POST to Server Failed- ERROR #6085: Unable to write to socket with SSL/TLS configuration 'ISC.FeatureTracker.SSL.Config', error reported 'SSL/TLS error in SSL_connect(), SSL_ERROR_SSL: protocol error, error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed' */
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,113)	| SuspendOnError =
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,114)	0
2020-07-26,1,"*STACK",3,"V","Task","OREF",1,115)	| Suspended =
- - -
2020-07-26,1,"*STACK",6,"V","Status1")	1
2020-07-26,1,"*STACK",6,"V","Task")	<OBJECT REFERENCE>[1@%SYS.Task]
2020-07-26,1,"*STACK",6,"V","Task","OREF",1)	142
2020-07-26,1,"*STACK",6,"V","Task","OREF",1,0)	3671
2020-07-26,1,"*STACK",6,"V","Task","OREF",1,1)	+----------------- general information ---------------
2020-07-26,1,"*STACK",6,"V","Task","OREF",1,2)	| oref value: 1
2020-07-26,1,"*STACK",6,"V","Task","OREF",1,3)	| class name: %SYS.Task
2020-07-26,1,"*STACK",6,"V","Task","OREF",1,4)	| %%OID: $lb("13","%SYS.Task")
2020-07-26,1,"*STACK",6,"V","Task","OREF",1,5)	| reference count: 5
2020-07-26,1,"*STACK",6,"V","Task","OREF",1,6)	+----------------- attribute values ------------------
2020-07-26,1,"*STACK",6,"V","Task","OREF",1,7)	| %Concurrency =
2020-07-26,1,"*STACK",6,"V","Task","OREF",1,8)	4 <Set>
2020-07-26,1,"*STACK",6,"V","Task","OREF",1,9)	| DailyEndTime =
2020-07-26,1,"*STACK",6,"V","Task","OREF",1,10)	0
2020-07-26,1,"*STACK",6,"V","Task","OREF",1,11)	| DailyFrequency =
2020-07-26,1,"*STACK",6,"V","Task","OREF",1,12)	0
2020-07-26,1,"*STACK",6,"V","Task","OREF",1,13)	| DailyFrequencyTime =
2020-07-26,1,"*STACK",6,"V","Task","OREF",1,14)	""
2020-07-26,1,"*STACK",6,"V","Task","OREF",1,15)	| DailyIncrement =
2020-07-26,1,"*STACK",6,"V","Task","OREF",1,16)	""
2020-07-26,1,"*STACK",6,"V","Task","OREF",1,17)	| DailyStartTime =
- - - 
2020-07-26,1,"*STACK",12,"V","%00000","N","""JournalState""")	12
2020-07-26,1,"*STACK",13,"I")	13^Z^ETNERRB^%ETN^0
2020-07-26,1,"*STACK",13,"L")	13 ERROR TRAP S $ZTRAP="ETNERRB^%ETN"
2020-07-26,1,"*STACK",13,"S")	S $ZTRAP="ETNERRB^%ETN"
2020-07-26,1,"*STACK",13,"T")	ERROR TRAP

541 row(s) affected

GitHub

16 Comments
Discussion (16)2
Connectez-vous ou inscrivez-vous pour continuer
Discussion
· Juil 28, 2020

Why migrate from Caché to IRIS

I'm working with clients planning migrate from Caché to IRIS and I want to summary advantages to go to IRIS. I think is:

  1. IntegratedML - AutoML - Agile machine learning
  2. IAM - InterSystems API Manager
  3. Interoperability
  4. Advanced Reports (JReport)
  5. Cloud Manager/Docker and DevOps support
  6. ZPM - Package manager
  7. Native API - Node.js, Python, Java and .NET interoperability
  8. Core based license x user based license
  9. InterSystems Support and new features
  10. Improved management and monitoring features

Can you help me to think or detail these 10 topics?

12 Comments
Discussion (12)5
Connectez-vous ou inscrivez-vous pour continuer
Article
· Juil 27, 2020 2m de lecture

ZPMshow, a helper for tired fingers

The offer of ZPM is growing daily and the short names and
acronyms of the offer are sometimes hard to understand and
also hard to type with my lazy fingers.

So I decided to have

  • a listing with the descriptions from the repository,
  • split in short junks to avoid backscroll,
  • controlled forward / backward scrolling,
  • the option to select my packages by number,
  • to install or uninstall with limited typing.

It runs with do ^zpmshow

A snapshot from the screen:

USER>d ^zpmshow

1 analyzethis 1.1.4 -- not github --
2 apps.rest 1.0.0 -- no descripition --
3 bitmap-adoption 1.0.3 Bitmaps for nonstandard IDs
4 blocksexplorer 2.2.1 -- not github --
5 bondar-nav 1.0.1 -- no descripition --
6 cache-fast-json 1.0.3 produce pretty JSON output for
Cache + Ensemble
7 classexplorer 1.21.3 -- no description --
8 contest-rest-template 1.0.3 -- no description --
9 csvgen 1.1.6 -- no description --
10 declarative-os 1.0.2 -- no description --
11 delete-helper 1.0.1 -- no description --
12 document-template 1.0.0 -- not github --
13 dsw 2.1.51 -- no description --
14 ecp-job 1.0.1 Multi-Line in Terminal Command
15 excel-light 1.0.0 Light weight Excel download

action (i[nstall),u[ninstall],n[ext],b[back],q[quit]):i package number: 6
6 cache-fast-json 1.0.3 produce pretty JSON output for
Cache + Ensemble
OK (y,n): y
zpm install cache-fast-json

[cache-fast-json] Reload START
[cache-fast-json] Reload SUCCESS
[cache-fast-json] Module object refreshed.
[cache-fast-json] Validate START
[cache-fast-json] Validate SUCCESS
[cache-fast-json] Compile START
[cache-fast-json] Compile SUCCESS
[cache-fast-json] Activate START
[cache-fast-json] Configure START
[cache-fast-json] Configure SUCCESS
[cache-fast-json] Activate SUCCESS

1 analyzethis 1.1.4 -- not github --
2 apps.rest 1.0.0 -- no description --
3 bitmap-adoption 1.0.3 Bitmaps for nonstandard IDs
4 blocksexplorer 2.2.1 -- not github --
5 bondar-nav 1.0.1 -- no description --
6 cache-fast-json 1.0.3 produce pretty JSON output for
Cache + Ensemble
7 classexplorer 1.21.3 -- no description --
8 contest-rest-template 1.0.3 -- no description --
9 csvgen 1.1.6 -- no description --
10 declarative-os 1.0.2 -- no description --
11 delete-helper 1.0.1 -- no description --

 

GitHub

Video

Discussion (0)1
Connectez-vous ou inscrivez-vous pour continuer
Question
· Juil 24, 2020

Examples of trigger

 

Hello people!

I am Brazilian and I am starting to work with the latest version of CACHE, and I would like to know where I can see an example of a TRIGGER, I would like to validate the fields before writing the actual data in the database.

in advance, thank you very much! and sorry for any mistake in concordance in english

7 Comments
Discussion (7)4
Connectez-vous ou inscrivez-vous pour continuer
Article
· Juil 21, 2020 1m de lecture

Snapshot to JSON

This is a sample to use %JSON.Adaptor class available in IRIS to produce a snapshot of your object.

The sample consists of 2 classes that are variations of what was known in Caché/SAMPLES as Sample.Person.
Be aware that the possibilities are limited by %JSON.Adapter and how you make use of it.

Once in place, you create some test data by Populate().
You select an object and take a snapshot.
You apply changes to your object and take another snapshot.
And see the difference.

BINGO!

GitHub

Discussion (0)1
Connectez-vous ou inscrivez-vous pour continuer