Kbase P76663: Automatically backup, switch and clear AI extents
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Unverified
GOAL:
Automatically backup, switch and clear AI extents
FACT(s) (Environment):
Windows 32 Intel
Progress 9.1x
FIX:
Run the following code:
FOR EACH _logging:
DISP _logging-aicurrext WITH FRAME f1 1 COLUMN.
FIND FIRST _filelist WHERE _filelist-ID - 3 = _logging-aicurrext.
/* may need to be changed, because the difference between _filelist-ID and _aicurrext in the VST depends on the structure of the database and can be different every time. */
DISP _filelist-ID _filelist-SIZE _filelist-Extend _filelist-LogicalSz
_filelist-BlkSize _filelist-Openmode _filelist-NAME _filelist-Misc
WITH FRAME f2 1 COLUMN.
END.
DEF VAR d2 AS INT. ASSIGN d2 = TIME.
DEF VAR d3 AS CHAR.
ASSIGN d3 = "COPY " + _filelist-NAME + " E:\PROGRESS\WRK" + STRING(d2) +
"_ai".
/* The directory where the ai copy will be written can be
different than " E:\PROGRESS\WRK" */
MESSAGE d3 VIEW-AS ALERT-BOX.
DEF VAR d4 AS CHAR.
ASSIGN d4 = "rfutil sports2000.db -C aimage EMPTY " + _filelist-NAME.
/* The db-name can obviously be different than sports2000.db */
MESSAGE d4 VIEW-AS ALERT-BOX.
OS-COMMAND SILENT rfutil sports2000.db -C aimage NEW.
/* The db-name can obviously be different than sports2000.db */
OS-COMMAND SILENT VALUE(d3).
OS-COMMAND SILENT VALUE(d4).
FOR EACH _logging:
DISP _logging-aicurrext WITH FRAME f3 1 COLUMN.
FIND FIRST _filelist WHERE _filelist-ID - 3 = _logging-aicurrext.
DISP _filelist-ID _filelist-SIZE _filelist-Extend _filelist-LogicalSz
_filelist-BlkSize _filelist-Openmode _filelist-NAME _filelist-Misc
WITH FRAME f4 1 COLUMN.
END.