Hi Jos,

 

VDos works well for the conventional desktop model of DataPerfect, however
since 2004 DataPerfect has had a mode where it could process stuff from the
commandline, without direct interaction with the DP UI.

 

I have been using this for many years as a web database on Linux web
servers, with DOSEMU where I stuff the keystroke buffer when invoking
dosemu.bin to provide parameters to DP so after the DOSEMU's Autoexec has
loaded the keyboard buffer is played.

 

But let me explain the way DP works in this mode.

 

Normally, you run DP by executing "DP.exe" and then selecting a database or
"DP.exe DpTest.str" to start DP and open the DPTest database.  There have
always been a number of command line switches, however from about the end of
2004, a number of switches were added which allowed DP to be used from a
website as a CGI program, passing a myriad of useful session specific
commandline switches. 

 

The /EI switch allows DP to Import what is called  a transaction log.  DP
uses a vocabulary for creating transaction logs for exporting its data, and
reimporting it, for such things as backup transaction/audit logs etc. With
this T-Log you can create records, edit records, or delete records. A major
use is for creating logs of all the interactions users are performing in the
database which can then be imported for rebuilding a database as at a
particular date and time.  

 

This Transaction Log or Tlog, can however be used for other purposes. With
the DP commandline /EI switch a user can invoke DP to imports a specific
"Synthetic" transaction log file, e.g., "DP.EXE DPTest.str
/ie-c:\blah\blah\AHTY5J2B.LOG". The Transaction Log could do all the
database CRUD, and you could write all the needed instructions in the T-Log
file, however doing it this way would be a lot of hard work, and make
updating the program difficult. The T-Log import also has a problem is that
it occurs at a very low level, not adhering to the behaviours as specified
in the DP Panel design, so you would have to simulate all this in the
Transaction Log.   At the time the /EI switch was added a facility to also
specify a DataPerfect report to run at the end of the processing of a
transaction log.   So an alternative to doing all the (almost impossible)
processing in the T-LOG is to import data in the T-Log into a Parameters
table, so that data you want to work with is sent as field-data pairs, like
in the submission of a webform. You can then run a report using this data as
the values. 

 

An issue with this is that in a multi-user environment who owns the data in
the Parameters Table? So you need to tag each field-data pair with an
additional identifier. A second commandline switch /SID is for creating a
session ID, which can be retrieved by a DataPerfect report as a variable. So
you could say build a command line something like DP.EXE DPTest.str
/ie-c:\blah\blah\AHTY5J2B.LOG /SID-AHTY5J2B where AHTY5J2B was also the
identifier that you used to tag the data into the Parameters table, and then
running the report filtering the Parameters table data to be used with the
/SID value, and then after finishing the report, deleting all the field-data
pairs with that tag.

 

This allows multi-user CRUD within the database controlled by DataPerfect
inbuilt report writer. It is not solely for web work, you can use this
method of controlling DataPerfect from any programming language which can
shell out and execute another program.  It makes DP a very sophisticated,
yet simple and fast, backend DBMS, and you have all the richness of whatever
programming language(s) you use to drive it

 

For the output of DP, which can be JSON, XML, HTML, CSV  etc, since late
2004, in addition to sending DP report output to a file, it could be sent to
STDOUT, so for a website you could either capture the output to a file, and
use your middleware scripting to print it to STDOUT to send to the browser,
or you could directly let DP send to the browser.

 

To use this mode with VDos there needs to be a way of passing data to the
VDos to cause it to execute. Either by keystroke stuff and playing, or
alternatively as a command or series of commands to execute post Autoexec,
as well as possibly having VDos pass through the STDOUT (and perhaps
STDERR).

 

It would be nice to be able to do this on Windows machines which are
increasingly 64-bit rather than just 32-bit Linux machine,. Do you think
this would be possible?

 

Thanks

Brian

 

 

_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/cgi-bin/mailman/listinfo/dataperf

Reply via email to