
DEOS and migrating DQL scripts with Body.
DEOS and migrating DQL scripts with Body.
I have tried this out and have migrated a test V5.16 database to V8.5 and been able to bring the procedures across as well in a fairly automated manner, both DQL and body.
With a little jiggery-pokery to the DQL and body I have managed to get output in true DOS format. I think that this is an excellent addition to the capabilities of V8.5 as the migration doubters can now be shown that procedures do not have to be rewritten nor the layouts set up in the DFW way!
The one thing that I dont like about it is that I have written a procedure that finds out how many procedures there are, where they are and what their names are and then creates a new record in a form in the V8.5 database for each one with this information, but then I have to go through each record and click on a button which brings the DQL and body into the form Is there any way of (just once) automatically going through a form and clicking on a button and saving the amended record?
If I have to go and delete/amend some code afterwards that is fine because it would be a lot better than clicking my way through 1500 or so procedures.
Re:DEOS and migrating DQL scripts with Body.
Hi Pete.
I am getting the good old DFD feeling now ;-)
When I first started with DFD I played and got things working, and after a while I realised that I need to up the game and I thought: Hmmm… it must be like this surely? and then I tried and magically the DataEase team was a couple of steps ahead of me and it was just like that…
I am glad that we can offer the same experience to you now.
DEOS("@DFDDQLPrism","C:\MyApp\CUSTxAAA.DBM",MyDQLMemo,MyBodyMemo) -- Same as above, but set in PRISM memos. This is for processing i.e. inside DQL.
This is the solution you are looking for, with this you can do the complete unwinding of a DFD applications DQLs and save them into your new/migrated application ;-)
However…
Using Memo Functions in a DQL is a dark art ;-)
And this is why I will make a sample that show how to do this.
I can say that the clue is to run a loop outside the real script based on a DummyTable containing memos to use for temporary storage.
When you do Modify Records or Enter a Record the Memos dont exist in Memory so you cant manipulate them directly. As PRISM Memo Functions read directly into the memory structure we need to have them available before we start using them this goes for all Memo functions so this is a useful hack.
You simply create a DummyTable with one record and a couple of Memos on it (need one, but no more than one! Record stored).
For DummyTable ;
While/for whatever.
Retval := DEOS(@DFDDQLPrism,MyPathToDQLFile,DummyTable DummyMemo1,DummyTable DummyMemo2) .
endter a record in MyDQLs
DQLScript := DummyTable DummyMemo1 ;
DQLBody := DummyTable DummyMemo2 ;
Etc.
I will make the sample, but I get you get this gist ;-)