Proparse's documentation assumes that you are using
the 4GL API to the DLL provided in
proparse.p
and proparse.i
.
If not, then use
proparse/api/proparse.p
as your reference to the actual parameters and function names for the DLL.
If you are using Proparse from something other than the 4GL, then you may want to use Proparse's built-in method for scanning a text file to load in the schema.
The function schemaOldLoad
(no arguments, no return value) is
not documented or listed in proparse.p
. Calling it will cause
Proparse to read schema from a text file named proparse.schema
.
The file proparse.schema
must be in your working directory
for Proparse to find it.
In case you find a need to call it from Progress, here is the API:
PROCEDURE schemaOldLoad EXTERNAL "proparse.dll" CDECL PERSISTENT: END.
Here is a pair of programs to write proparse.schema
:
/* schemaolddump1.p Dumps the schema to "proparse.schema" in your working directory. Assumes that the alias DICTDB already exists. */ DEFINE VARIABLE dictdb_orig AS CHARACTER NO-UNDO. DEFINE VARIABLE program2 AS CHARACTER NO-UNDO. DEFINE VARIABLE dbnum AS INTEGER NO-UNDO. DEFINE VARIABLE i1 AS INTEGER NO-UNDO. OUTPUT TO "proparse.schema":U. ASSIGN program2 = REPLACE(PROGRAM-NAME(1), "schemaolddump1.p", "schemaolddump2.p"). ASSIGN dictdb_orig = LDBNAME("dictdb":U). REPEAT dbnum = 1 TO NUM-DBS: IF DBTYPE(dbnum) <> "PROGRESS":U THEN NEXT. DELETE ALIAS DICTDB. CREATE ALIAS DICTDB FOR DATABASE VALUE(LDBNAME(dbnum)). PUT UNFORMATTED ":: ":U LDBNAME(dbnum)SKIP. RUN VALUE(program2). END. DELETE ALIAS dictdb. CREATE ALIAS dictdb FOR DATABASE VALUE(dictdb_orig). /* Now dump the meta-schema as "dictdb" */ PUT UNFORMATTED ":: dictdb":U SKIP. FOR EACH DICTDB._file WHERE _file._tbl-type <> "T":U NO-LOCK BY _file._file-name: PUT UNFORMATTED ": ":U _file._file-name SKIP. END. OUTPUT CLOSE.
/* schemaolddump2.p Dumps the schema for DICTDB */ FOR EACH DICTDB._file WHERE _file._tbl-type = "T":U NO-LOCK BY _file._file-name: PUT UNFORMATTED ": " _file._file-name SKIP. END.