Hi Michael,

I have replied by email. Thank you for the offer.

Yours

Nigel

That's very cool and a very useful way of handling security and access to specific CALLS in the REST dispatch class. Impressed

Hi

In Cache/Ensemble/IRIS there is a %NOLOCK clause that you can use in an Insert, Update or Delete. But that disables locking in these oerations.

According to the documentation for TSQL the following documentation exists for LOCK TABLE:

Lock Table

Enables the current user to lock a table.

LOCK TABLE tablename IN {SHARE | EXCLUSIVE} MODE [WAIT  numsecs | NOWAIT]

The LOCK TABLE
statement locks all of the records in the specified table. You can lock a table in SHARE MODE or in EXCLUSIVE MODE. The optional WAIT clause specifies the number of seconds to wait in attempting to acquire the table lock. The LOCK TABLE statement immediately releases any prior lock held by the current user on the specified table.

LOCK TABLE
is only meaningful within a transaction. It locks the table for the duration of the current transaction. When not in a transaction, LOCK TABLE performs no operation.

Specify tablename as described in Table References. LOCK TABLE supports locking a single table; it does not support locking multiple tables.

LOCK TABLE supports SHARE and EXCLUSIVE modes; it does not support WRITE mode.

LOCK TABLE does not support the WITH HOLD clause.

WAIT time is specified as an integer number of seconds; LOCK TABLE does not support WAIT time specified as clock time.

The Documentation on Table Names reads a follows:

Table References

InterSystems TSQL supports table references with the InterSystems IRIS® data platform SQL format:

schema.table

The only mandatory table reference component is table. If the schema is omitted, TSQL uses the default schema name.

Other forms of Transact-SQL may use table references with up to four components, separated by dots: server.database.owner.table. Here is how a Transact-SQL table reference is processed:

  • The server. component, if present, is ignored.
  • If the database. component is present and the owner. component is omitted, database is mapped to the schema name. Therefore, database..table maps to schema.table. This conversion is not performed if the database name is 'master'.
  • If the owner. component is present, it is mapped to the schema name.

For the purposes of name translation, a field name has the field suffix removed while translation is performed and then replaced afterwards.

 

Temporary Tables

InterSystems TSQL supports #tablename temporary tables. A #tablename
temporary table is visible to the current procedure of the current process. It is also visible to any procedure called from the current procedure. #tablename syntax is only supported in TSQL procedures (class methods projected as procedures with language tsql).

A temporary table is defined by using CREATE TABLE with a table name starting with "#". The temporary table is created at runtime. A #tablename
table definition goes out of scope when you exit the procedure. All temporary table definitions go out of scope when the connection is dropped. You can also explicitly delete a temporary table using DROP TABLE.

However, if a temporary table is referenced by an active result set, the temporary table may become invisible to the process, but the data and definition are retained until the result set goes out of scope.

A #tablename
temporary table is visible both to the creating procedure and to any procedures called from that procedure. Temporary tables are visible to nested procedure calls. It is not necessary to declare the temporary table in the called procedure. If the called procedure also creates a temporary table with the same name, InterSystems IRIS uses the most recently created table definition. Because a temporary table is defined using an ObjectScript local variable, the creation, modification, and deletion of these tables are not journaled transaction events; rolling back the transaction has no effect on these operations.

 

System Tables

System tables exist per InterSystems IRIS namespace.

Systypes

Partially supported.

Nigel

Hi

I think that there is a 'DOS CSV' file format that dows use COMMAS but I am not sure how you would specify it. In Excel, it is one of the options when exporting a spreadsheet to a delimited text file.

Nigel

Hi

May I ask what O/S you are running your live production on? One of the curious things I discovered where Ubuntu (and other Linux products)  differ from Windows is in the way that an Ensemble production will shutdown (and notionally restart). This is especially true if the queues are very long.

On Windows, I was used to setting the Timeout to 60 seconds and sometimes even less and so when I had to develop and deploy an application on Ubuntu I got very confused when we attempted to shut down the production (using 60 seconds) and the whole server would freeze and become unresponsive. At the time I knew nothing about Ubuntu (or Linux in general) and it was only when I got the Ubuntu expert to show me how I could monitor the system during Shutdown and what amazed me is that Ensemble spawned off 10's of jobs (up to 100) which I assumed it had down to try and clear the queues before shutting down and all of these extra processes consumed resources, CPU time and memory and of course the machine ground to a halt. The trick. Give the production at least 120 seconds and maybe even 180 seconds to shut down and you will find that it behaves perfectly correctly.

Yours

Nigel

Hi

I would expect the content type to be 'application/json'? (I assume the responseType is the contentType? In every HTTP Operation I have worked with that used json that was the content type).

The character set must be set to UTF-8 unless you need to use the Latin character set in which case use Latin. Bear in mind, both the server and the client must be consistent in declaring what they are sending and what they are expecting to receive.

I found the following article on Angular and HTTP (or Interceptors as they are called after Angular 5)

HttpHeaders

We add HTTP Headers using the HttpHeaders helper class. It is passed as one of the arguments to the GET, POST, PUT, DELETE, PATCH & OPTIONS request.

To use HttpHeaders in your app, you must import it into your component or service

Then create an instance of the class

And then call the httpClient.get method passing the headers as the argument

Note that httpHeaders are immutable. i.e every method on HttpHeaders object does not modify it but returns a new HttpHeaders object.

The httpHeaders class has several methods using which you can manipulate the headers.

set

set(name: string, value: string | string[]): HttpHeaders

The Sets method returns a new instance after modifying the given header. If the header already exists, its value is replaced with the given value in the returned object.

httpHeaders are immutable

The HTTP headers are immutable. The following example does not work as each set method returns a new header and does not update the original header.

To workaround, you can use the code as follows

You can also use the following code

append

append(name: string, value: string | string[]): HttpHeaders

The append method appends a new value to the existing set of values for a header and returns a new instance. The append method does not check if the value exists.

The above results in content-type header in the request header as content-type: application/json,application/x-www-form-urlencoded

has

has(name: string): boolean

Returns true if the given header with the name already exists in the HttpHeaders. The following code checks if the content-type header present in the request header. If not it adds it.

Hi

I  checked and it is in the WRC Internal Distributions under 'Components' and the following releases are available for 2018.1. 4:

 

Yours

Nigel

I thought I knew most of the of the debugging tricks in Caché, Ensemble and IRIS, and I have used the sql shell but had not used it the csp shell and I though I have found debugging basic csp pages using a log global and JS popup messages ( simplistic but they worked). However, when it came to Zen bebugging was a nightmare. I could view the page source and inspect the Dom but the sleepless nights I had with hgroups and vgroups and the inheritance of CSS styles could not explain why, on a form containing 15 text boxes, drop-down mists and some check boxes with all my captions neatly aligned left and my data entry controls aligned left in the second inner vgroup (page has outer vgroup, then an hgroup for my heading, and then two vgroups for my captions and data controls) and on one row out of 15, the caption was indented by 5 Characters of the data control would be rightalligned. For absolutely no obvious reason at all. I used the inspector to nest through every page element, the css in play, and the various in-line, align="left" (or equivalent) and I could spend days trying to work out why this one element was misbehaving. I spent more time debugging stupid things like this than I had spent in total in writing all of the Class Zen Get and Set methods, the sql queries to populate lists, getting the correct syntax for selected item vs identifier item and the menus and all the graphics and style sheets put  together. I never did find an easy way to debug these layout issues and I wonder if you had any tricks for resolving these silly layout issues that literally cost me days in testing?

Nigel

The changes are good and will

Allov DC members to create a more 3D picture of of themselves and what they do. 

Nice changes to the way articles are handled.