ABL2DB

tamhas

ProgressTalk.com Sponsor
Careless of me ... I have just uploaded 0.75, same DF. 0.75 includes your suggestions on \, < "", and ~~.
 

Stefan

Well-Known Member
Thanks - got it. Attempting to start it...

Grouping and aligning the input variables could lower the initial scare factor. Move the non-essentials away from the essentials and default them. xref / debuglist / lala list etc - just define one output directory and let the rest follow below it. If you want to tweak it its still possible, but only if you want to.

OK - filled some stuff in - and started it...

Code:
[14/09/06@23:56:58.131+0200] P-008232 T-008984 1 4GL SYSERROR       Unexpected Exception: Entry 3 is outside the range of list c:\tfs\ef71\1\work\bl,c:\tfs\ef71\1\work\i. (560)
[14/09/06@23:56:58.131+0200] P-008232 T-008984 1 4GL CALLSTACK      Initialize com.cintegrity.ABL2DB.Driver at line 74  (.\com\cintegrity\ABL2DB\Driver.cls)
[14/09/06@23:56:58.131+0200] P-008232 T-008984 1 4GL CALLSTACK      abl2db_launcher.p at line 94  (.\abl2db_launcher.p)
[14/09/06@23:56:58.131+0200] P-008232 T-008984 1 4GL APPL           End ABL2DB

The drive letter check is looping through the actual propath and then using chPropath (which contains my two entries) to report the error, which is pretty much guaranteed to error since chPropath is the propath provided in the launcher with the current propath bolted on the end. In this case the check is attempting to tell me that . (current directory which is in my actual propath) does not contain a required drive letter...

Code:
    if opsys = "win32"
    then do minWhich = 1 to num-entries(propath, "," ):
      if substring(entry( minWhich, propath, "," ) ,2 ,1 ) <> ":"
      then do:
        log-manager:write-message (substitute("Driver: Propath entry &1 does not contain required drive letter", entry(minWhich, chPropath, ",") )).
        undo, throw new Progress.Lang.AppError( "Aborting." ).
      end.
    end.
 

tamhas

ProgressTalk.com Sponsor
I'm not sure about the defaults as I think there are a lot of people who will have more than one source directory and so there is a virtue in illustrating how that should be handled. I will look at it. I am reluctant to force people into a particular structure. Are you suggesting a standard naming computed onto the source directory if those other variables are blank?

I will check into the propath issue a little later, but I am a bit surprised since it has been working fine at a couple of sites.
 

tamhas

ProgressTalk.com Sponsor
Oh, having taken a look at this, I see the issue, but I am not immediately sure what to do with it.

One can change chPropath to plain propath in the write-message and one will get a nice error message. I have done this in my code and I would suggest doing it in yours ... if we figure out what to do so that there is no error message.

My propath in PDSOE does not include current directory. I can see the use in non PDSOE contexts, e.g., to provide a director for the current user, but why would you do that in PDSOE?

More importantly, I suppose, there is the question of what else might be in there besides ".". It would be easy enough to add a test inside the do, before the if, to check if the current entry was equal to "." and skip the test, if so, but I am a little concerned about what might happen in the processing if "." remains in the propath. Certainly, the lack of drive letters has been a headache.

One could just check chPropath, but then again I worry about the processing if there is a missing drive letter in the base propath.

So, I guess the first question is to help me understand why "." is in the propath.

If you want to experiment, I would just add in the test for "." or change the check to be only on chPropath and then run it through to see what breaks. But, I am afraid that it will break.
 

tamhas

ProgressTalk.com Sponsor
You could try this: :)

Code:
  method public void Initialize():
    define variable minWhich as integer no-undo.
    define variable mchEntry as character no-undo.
   
    if num-entries(chSourceDirectoryList, "/") > num-entries(chSourceDirectoryList, "~\")
    then
      assign
          chSeparator = "/"
          chAntiSeparator = "~\"
          .
    else
      assign
          chSeparator = "~\"
          chAntiSeparator = "/"
          .
    if chPropath > "" then propath = chPropath + "," + propath.
   
    if opsys = "win32"
    then do minWhich = 1 to num-entries(propath, "," ):
      mchEntry = entry( minWhich, propath, "," ).
      if mchEntry = "."
      then log-manager:write-message ( "Driver: Do you *really* need Current Directory ['.'] in the Propath.  Might cause trouble." ).
      else if substring( mchEntry ,2 ,1 ) <> ":"
      then do:
        log-manager:write-message (substitute("Driver: Propath entry &1 does not contain required drive letter", mchEntry )).
        undo, throw new Progress.Lang.AppError( "Aborting." ).        
      end.
    end.
  end method.
 

Stefan

Well-Known Member
I am starting abl2db from a shortcut (and not using pdsoe yet) - the default propath (from progress.ini) starts with a dot:

PROPATH=.,C:\Progress\oe11.2\gui,C:\Progress\oe11.2,C:\Progress\oe11.2\bin

A simply solution is - if the propath entry is dot - to change it to the working directory:

Code:
if mchEntry = "." then do:
  file-info:file-name = ".".
  mchEntry = file-info:full-pathname.
end.
if substring( mchEntry, 2, 1 ) <> ":" then do:

And yes - when initially ignored all compilations failed - will retry and post back.
 

Stefan

Well-Known Member
Still the same result as yesterday:

Code:
[14/09/07@22:37:43.715+0200] P-007304 T-001536 1 4GL APPL           Start CompileDirectory Tree
[14/09/07@22:37:43.733+0200] P-007304 T-001536 1 4GL APPL           End CompileDirectory Tree with 24 exceptions

The exceptions report (assuming CompileExceptions.txt) is the correct log:

Code:
Start CompileDirectoryTree
CompileDirectoryTree: Source direectory c:\tfs\ef71\1\work\bl not in Source Directory List for c:\tfs\ef71\1\work\bl\assets\ifallgen\gdpr_cald.p

I have set the chSourceDirectory list (c:\tfs\ef71\1\work\bl\assets\ifallgen) to a subtree of the entire source base (c:\tfs\ef71\1\work\bl which is in the propath).
 

tamhas

ProgressTalk.com Sponsor
OK, I get why it was there ... whether or not it is a good thing. There are two interesting questions here.

One is what your code will actually produce. The irritating thing I discovered was that full-pathname might or might not include the drive letter depending on whether the propath contained the drive letter. But, I don't know what happens if the leading component do and some component doesn't.

The other is that your code gets it past the test, but doesn't actually fix the problem if having "." in the propath is going to cause issues.
 

tamhas

ProgressTalk.com Sponsor
I'm not sure I quite understand what settings you are using and what the error means.
 

Stefan

Well-Known Member
Changed chSourceDirectory list to higher level - first step compiling is taking longer - but crashing with an alert-box:

---------------------------
Error
---------------------------
Data length 1260 too large for a data item (XREF-XML). (13812)
Out of memory for XREF-XML. (13815)
SYSTEM ERROR: -s exceeded. Raising STOP condition and attempting to write stack trace to file 'procore'. Consider increasing -s startup parameter. (5635)

---------------------------
OK
---------------------------

Hopefully the first message is a result of the second (-s) - which we need to have at a higher value. Restarting with adjusted parameters.
 

tamhas

ProgressTalk.com Sponsor
Sounds like it. I'll be around for a bit less than an hour more tonight is you get farther.

One does sort of have to be complete about the compile set. We have run into that elsewhere with code that accesses stuff in DLC. One really has to then extract the code from the PLs and put it into its own directory in the SourceDirectoryList so that there is a complete analysis set.

If you have files or anything to send, you can send them to thomas@cintegrity.com
 

Stefan

Well-Known Member
Yep :) Getting there - compile run finished:

Code:
[14/09/07@22:51:40.878+0200] P-007912 T-004764 1 4GL -- Logging level set to = 2
[14/09/07@22:51:40.878+0200] P-007912 T-004764 1 4GL -- No entry types are activated
[14/09/07@22:51:40.878+0200] P-007912 T-004764 1 4GL -- Logging level set to = 3
[14/09/07@22:51:40.878+0200] P-007912 T-004764 1 4GL APPL           Start ABL2DB Test
[14/09/07@22:51:41.156+0200] P-007912 T-004764 1 4GL APPL           Start CompileDirectory Tree
[14/09/07@23:55:29.183+0200] P-007912 T-004764 1 4GL APPL           End CompileDirectory Tree with 16 exceptions
[14/09/07@23:55:29.242+0200] P-007912 T-004764 1 4GL APPL           Start BuildSchema
[14/09/07@23:55:29.243+0200] P-007912 T-004764 1 4GL APPL           End BuildSchema with 0 exceptions
[14/09/07@23:55:29.269+0200] P-007912 T-004764 1 4GL APPL           Start BuildDiskFiles
[14/09/07@23:55:37.536+0200] P-007912 T-004764 1 4GL APPL           End BuildDiskFiles with 0 exceptions
[14/09/07@23:55:37.571+0200] P-007912 T-004764 1 4GL APPL           Start BuildSubUnits
[14/09/07@23:55:43.775+0200] P-007912 T-004764 1 4GL APPL           End BuildSubUnits with 2393 exceptions
[14/09/07@23:55:43.806+0200] P-007912 T-004764 1 4GL APPL           Start BuildBlocks
[14/09/07@23:55:45.415+0200] P-007912 T-004764 1 4GL APPL           End BuildBlocks with 2393 exceptions
[14/09/07@23:55:45.447+0200] P-007912 T-004764 1 4GL APPL           Start of BuildRunLinks
[14/09/07@23:55:47.119+0200] P-007912 T-004764 1 4GL APPL           End of BuildRunLinks with 2393 exceptions
[14/09/07@23:55:47.163+0200] P-007912 T-004764 1 4GL APPL           Start BuildTableLinks
[14/09/07@23:55:48.840+0200] P-007912 T-004764 1 4GL APPL           End of BuildTableLinks with 2393 exceptions
[14/09/07@23:55:48.858+0200] P-007912 T-004764 1 4GL APPL           Start of GetDescriptions
[14/09/07@23:55:51.050+0200] P-007912 T-004764 1 4GL APPL           End of GetDescriptions with 0 exceptions
[14/09/07@23:55:51.071+0200] P-007912 T-004764 1 4GL APPL           Start of BuildMenu
[14/09/07@23:55:51.071+0200] P-007912 T-004764 1 4GL APPL           BuildMenu ERROR: MenuFile '' not found or not writeable
[14/09/07@23:55:51.085+0200] P-007912 T-004764 1 4GL -- (Procedure: 'BuildMenu com.cintegrity.ABL2DB.BuildMenu' Line:47) Invalid or inappropriate handle value given to DELETE OBJECT or DELETE PROCEDURE statement. (5425)
[14/09/07@23:55:51.085+0200] P-007912 T-004764 1 4GL APPL           BuildMenu: Unable to initialize.
[14/09/07@23:55:51.085+0200] P-007912 T-004764 1 4GL APPL           End ABL2DB

Most of the compile exceptions are a result of missing database aliases. Whenever programs need to access _file they use an <database>sh alias.

I am not sure why BuildSubUnits is failing, the exception file is full of:

Code:
Exception list for build subunits of c:\tfs\ef71\1\work\bl
BuildSubUnits: DiskFile not found for c:\tfs\ef71\1\work\bl\assets\ifallgen\gdpr_cald.p
BuildSubUnits: DiskFile not found for c:\tfs\ef71\1\work\bl\assets\ifallgen\gdpr_calm.p
...

Will have a quick dig into the code to see what it is trying to find.
 

Stefan

Well-Known Member
Aha DiskFile is not a file on disk but a table. The analysis database is pretty much empty so far... This seems to be related to my attempt at putting something reasonable into the launcher again:

Code:
define variable chDataBaseList            as character no-undo initial "exactcs,edis".
define variable chDataBaseConnectParams   as character no-undo initial "-S 47110|-S 47111".
define variable chSchemaDirectory         as character no-undo initial "".
define variable chSchemaFileList          as character no-undo initial "".
define variable chSourceDirectoryList     as character no-undo initial "c:\tfs\ef71\1\work\bl". /* <- this was c:\tfs\ef71\1\work\bl\assets\ifallgen to build a subsection */

define variable chRunDirectoryList        as character no-undo initial "c:\temp\abl2db\work\run".
define variable chXrefDirectoryList       as character no-undo initial "c:\temp\abl2db\work\xrf".
define variable chListDirectoryList       as character no-undo initial "c:\temp\abl2db\work\lst".
define variable chDebugDirectoryList      as character no-undo initial "c:\temp\abl2db\work\debug".
define variable chReportDestination       as character no-undo initial "c:\temp\abl2db\work\rpt".
define variable chPropath                 as character no-undo initial "c:\tfs\ef71\1\work\bl,c:\tfs\ef71\1\work\i".
define variable chMenuFile                as character no-undo initial "".
define variable chMenuItemFile            as character no-undo initial "".
define variable chFunctionalUnitFile      as character initial "".
define variable chPrimaryLog              as character initial "c:\temp\abl2db\ABL2DB.lg".
 

tamhas

ProgressTalk.com Sponsor
Yes, DiskFile is the *table* of the source files.

So, does the last post mean that you have corrected the launch parameters and it is now running again and we will see what it produces or ... something else?

It must be very late there!
 

Stefan

Well-Known Member
The parameters in my last post are what let everything compile (in an hour). DiskFile contains 2116 records - all which seem to be includes only. And all seem to be from chSourceDirectoryList.

Adding my include directory to the chSourceDirectoryList and restarting. I think the notion of separating propath and source list is tripping me up.

edit - restarted - which instantly fails:

Code:
Driver: Unexpected Exception: Entry 2 is outside the range of list c:\temp\abl2db\work\run. (560)

Adding an 'i' directory to the output parameters (which will never contain anything).
 
Last edited:

tamhas

ProgressTalk.com Sponsor
Well, I'm not sure I'm following how your code is laid out. The source list and propath distinction is simple. The propath at the start is the propath needed to make ABL2DB itself run ... not the application. The source list is the list of directories containing the source of the application ... the entire source, otherwise you will be getting errors about links outside of the scanned area. For the compile phase, the source list is prepended to the starting propath because that is necessary to compile. For the other phases, this is not necessary. Nowhere in here does one end up with the propath which one would use to run the application, e.g., one in which the run directory was in front of the source directory. But, the directories on the source list should correspond to what you would put in the runtime propath if you include source in that propath.

If you have all your .is in a separate directory tree ... it never ceases to amaze me how people organize their code ... then, yes, you will need that directory in the source list so that it will be scanned and you will have to have a corresponding entry in the run, xref, etc. directories so that there is a match. I haven't tried just repeating the same directory N times, but I see no reason why that would not work. I have considered allowing only a single target, but that greatly complicates the lookup.
 

Stefan

Well-Known Member
If you have all your .is in a separate directory tree ... it never ceases to amaze me how people organize their code ... then, yes, you will need that directory in the source list so that it will be scanned and you will have to have a corresponding entry in the run, xref, etc. directories so that there is a match. I haven't tried just repeating the same directory N times, but I see no reason why that would not work. I have considered allowing only a single target, but that greatly complicates the lookup.

No need to be amazed. The includes in the i directory are includes that are common to server and client sources. The bl directory is only the server business logic directory. There are more.

I have already duplicated the run etc directories
- BuildDisk files is now throwing exceptions for files that were already there - which is ok.
- BuildSubUnits is still throwing exceptions for DiskFiles:

Code:
Exception list for build subunits of c:\tfs\ef71\1\work\bl,c:\tfs\ef71\1\work\i
BuildSubUnits: DiskFile not found for c:\tfs\ef71\1\work\bl\assets\ifallgen\gdpr_cald.p
BuildSubUnits: DiskFile not found for c:\tfs\ef71\1\work\bl\assets\ifallgen\gdpr_calm.p

I will delete the analysis database and restart.
 

tamhas

ProgressTalk.com Sponsor
One of the things which I sure it says on the site, but appears to need to be bold faced, is that one must start with a fresh copy for each pass. One *can* cheat on this a bit by commenting out steps in the Process block of Driver.cls. I.e., during initial development, I would start with AnalysisEmp copied to Analysis and go through N steps and stop. Then, I would copy Analysis to AnalysisSav and change the comments to run only the N+1 step. If that failed, I would restore AnalysisSav to Analysis and try again. Periodically, I would start from scratch with a copy of AnalysisEmp and run all the way to the current N. You shouldn't have to do that much, but it is worth trying if you are having trouble with a given step since it allows one to examine how things have gone so far.
 
Top