Kbase P13813: How to create a script for a tablemove
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  17/02/2009 |
|
Status: Verified
GOAL:
How to create a script for a tablemove
GOAL:
How to create a list of tables for a tablemove batch file?
GOAL:
How to create a list of tables in the database
FACT(s) (Environment):
All Supported Operating Systems
Progress 9.1E
OpenEdge 10.x
OpenEdge Category: Database
FIX:
The following 4GL script will generate a template that contains a list of all the tables in the database with placeholders for the 'tablearea' and 'indexarea' (optional but recommended), in order to execute the tablemove command for multiple tables. Once this is generated, your favorite text editor can be used to replace the placeholder(s) with the relevant area names.
OUTPUT TO tblmove.bat.
DEF VAR mydb AS CHAR FORMAT "x(10)" INTITAL "yourdbname"
/* _file-number > 0, excludes Virtual System Tables,
_file-name BEGINS "SYS" excludes system tables from the listing */
FOR EACH _file WHERE _file-number > 0 AND
NOT _file-name BEGINS "SYS":
DISPLAY "CALL proutil" mydb "-C tablemove " _file-name "tablearea indexarea" WITH NO-LABELS NO-BOX WIDTH 126.
END.
OUTPUT CLOSE.
DISPLAY "tblmove file is ready for editing"