Back in the mid-1990s I worked for a legal services firm named RSI (or more correctly, Reproduction Services Incorporated). I was the Applications Development Manager, responsible for managing development for both internal software and custom applications for clients.
At the time RSI was one of the prime records collection for the law firms representing the tobacco industry. We collected mainly health records on plaintiffs in the many lawsuits against big tobacco that were all the rage. Which meant managing thousands of pages of scanned documents.
We also worked with other clients on document management and several off-the-shelf software products. These products included Summation, Trial Director, and Concordance. As part of my job I also conducted training for clients in the use of these products (for a time I was a certified Summation instructor).
As I said, we did custom applications for clients. Concordance included a scripting language (Concordance Programming Language, or CPL) that allowed for even greater flexibility from that product. In going through some old drives I came across a CPL script that I had saved off for some reason. Here’s a part of that script:
main()
{
int hConv; /* Handle to Conversation */
int NULL;
text hszService; /* Service Name Handle */
text hszTopic; /* Topic Name Handle */
text hszDocName;
int db, i, Rec;
/* Make sure the database is open. */
if (db.documents >= 0)
{
/* Initialize the strings used to communicate with the DDE program. */
hszService = "DOCDIR";
hszTopic = "DDIMAGE";
/* Try to connect, do a WinExec() if it isn't running. */
/* It will run DOCDIR if it is in the path. */
if ((hConv = ddeConnect(hszService,hszTopic)) == NULL)
{
/* No connection, execute the display program, it may not be running. */
/* Then try to connect to the server a second time. */
spawn("d:\progra~1\Docdir\Docdir.exe", "");
sleep(3000);
hConv = ddeConnect(hszService, hszTopic);
}
/* Message("switch", 1); */
switch(db.type[isfield(db, "REC")]) {
case 'P':
case 'T':
hszDocName = "[SHOWIMAGE(" + db->DOCPREFIX + "-0001" + ")]";
beep(450,5);
break;
case 'N':
hszDocName = "[SHOWIMAGE( " + rep("0",5-len(trim(str(db->REC)))) + str(db->REC) + "-0001" + ")]";
break;
default: beep(450,5);
break;
}
i = ddeExec(hConv, hszDocName );
}
return(hConv);
}
You can see the strong C influence as well as the use of an early Windows inter-process messaging protocol called Dynamic Data Exchange. The use of a C-style scripting language was a little unusual at the time (in my experience anyway).
In hindsight I wish I had saved more examples of CPL. Note to self: make sure to keep examples of current projects.