Infrastructure at your Service

All posts by Cesare Cervini

Cesare Cervini



Cesare Cervini

A Graphical Overview of a Repository

By | Entreprise content management | No Comments

As the saying goes, “A Picture Is Worth A Thousands Words”. I’d add “And A Simple Graph Is Worth A Long, Abstruse List of Numbers”. And of words too, so let’s show off a little bit: Interested ? Then, please read on. It happens not so infrequently that we wish we could quickly plot a few numbers to have a look at their overall trend. The usual procedure is to output the numbers into a…

Read More
Cesare Cervini

A SQLite extension for gawk (part II)

By | Entreprise content management | No Comments

Welcome to part II of a three-part article on extending gawk with a SQLite binding. Part I is here. Part II is followed by Part III, which give some explanations for the code presented here and shows how to use the extension with a stress test. Here, I’ll list the source code of the extension and give instructions to compile and use it in gawk. Beware though that the code should be taken with several…

Read More
Cesare Cervini

An SQLite extension for gawk (part I)

By | Entreprise content management | No Comments

Quick: what is the most used database management system on our planet ? Oracle ? Wrong. SQL server ? Wrong again ! MySQL ? You’re almost there. It’s SQLite. Surprised ? I must confess that I was too. Actually, SQLite is special in that it is not the traditional 2-tiers client/server but one-tier and embedded, which means that it works as a library linked to an application. As such, it is used to fulfill the…

Read More
Cesare Cervini

Adding a timeout in monitoring probes

By | Entreprise content management | No Comments

A few months ago day, as I was writing the documentation for a monitoring probe, I suddenly realized that that probe, along with others I wrote during that time to monitor Documentum installations, had all a big, unexpected flaw. Indeed, it struck me that if it hang for some reason while running, it could stay there well after the next monitoring cycle had begun, which could too be affected by the same problem, and so…

Read More
Cesare Cervini

Using a database trigger to request a rendition

By | Entreprise content management | No Comments

Some time ago, a colleague asked around if someone knew a way to automatically request a rendition right after a document was checked in. This looked like a trigger to me and TBOs are here for that, right ? Sure but there was an additional condition: it should be set up by an administrator from the idql command-line tool as no programming was possible at that time on that system. Given that this tool, along…

Read More
Cesare Cervini

A SQLite extension for gawk (part III)

By | Entreprise content management | No Comments

Welcome to part III of a three-part article on extending gawk with a SQLite binding. Part I is here. Part II is here. In this final part, I’ll explain succinctly the code that was listed in part II. This part is best read while having Part II opened in another browser window. sqlite_gawk.c Line 48: All the operations on a database requires a handle that is initialized once the database is successfully opened. The handle…

Read More
Cesare Cervini

A password() function for dmgawk

By | Entreprise content management | No Comments

A few days ago, as I was preparing a dmawk script for a presentation, I stumbled against another unexpected error. The script was attempting to connect to a docbase by providing a docbase name, a user name and a password. But before that, it tested whether a password was provided as a command-line parameter (I know, this is not very secure but it was for demonstration purpose only); if not, it prompted for one using…

Read More
Cesare Cervini

An awk filter to truncate or wrap around tabular output

By | Entreprise content management | No Comments

In my previous blog “idql and its column output”, see link here, I provided a small awk filter to reflow the idql output’s columns by wrapping their content around. Later I came of thinking that it could be useful to be able to truncate the columns instead, in order to have an even compacter output. A shorter, denser table can certainly help is some cases, such as when a quick overview of a query’s result is…

Read More
Cesare Cervini

Adding a Documentum Extension to gawk, part II

By | Entreprise content management | No Comments

This is part II of the article “Adding a Documentum Extension to gawk”. You can find Part I here Before we can test the extension, we need a test program and some helper functions for comfort. Let’s prepare them. o  Move back to the dmgawk directory and edit DctmAPI.awk, the wrapper functions; $ cd ../../.. $ pwd /home/dmadmin/gawk $ vi DctmAPI.awk o  Cut and paste the lines below: @load “dctm” # provides high-level function to do Documentum…

Read More
Cesare Cervini

Adding a Documentum Extension to gawk, part I

By | Entreprise content management | No Comments

Recently, I was searching my NAS for some files which, to end this intolerable suspense, I did not find but on the other hand I did stumbled across a couple of interesting dmawk scripts I wrote for on customer more than 20 years ago. Some statements looked a bit odd, e.g. access to elements from multi-dimensional arrays such as “a[i1][i2]”, or “delete A” to empty an array (instead of the well-known awk idiom split(“”, A))….

Read More