1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12
3 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Procedure
4 /*--------------------------------------------------------------------------
5 File
: Dump all tables and definitions
6 Purpose
: Used to re-create the database from scratch
8 Syntax
: RUN process
/dumpall.p
10 Author
(s
) : Andrew McMillan
11 ------------------------------------------------------------------------*/
13 /* _UIB-CODE-BLOCK-END
*/
17 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
19 /* ******************** Preprocessor Definitions
******************** */
21 &Scoped-define PROCEDURE-TYPE Procedure
25 /* _UIB-PREPROCESSOR-BLOCK-END
*/
30 /* *********************** Procedure Settings
************************ */
32 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
33 /* Settings for
THIS-PROCEDURE
37 Add Fields to
: Neither
38 Other Settings
: CODE-ONLY
COMPILE
40 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
42 /* ************************* Create Window
************************** */
44 &ANALYZE-SUSPEND _CREATE-WINDOW
45 /* DESIGN Window definition
(used by the UIB
)
46 CREATE WINDOW Procedure
ASSIGN
49 /* END WINDOW DEFINITION
*/
56 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Procedure
59 /* *************************** Main Block
*************************** */
60 DEF VAR dump-dir
AS CHAR NO-UNDO.
64 OUTPUT TO VALUE( dump-dir
+ "/dumpout.log" ) .
65 RUN prodict
/dump_d.r
( "ALL", dump-dir
, ?
).
66 RUN prodict
/dump_df.r
( "ALL", dump-dir
+ "/all.df", ?
).
67 RUN prodict
/dump_fd.r
( "ALL", dump-dir
+ "/all.fd" ).
70 /* _UIB-CODE-BLOCK-END
*/
74 /* ********************** Internal Procedures
*********************** */
76 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-dump-dir Procedure
77 PROCEDURE get-dump-dir
:
78 /*------------------------------------------------------------------------------
80 ------------------------------------------------------------------------------*/
82 dump-dir
= OS-GETENV("DUMPDIR").
83 IF dump-dir
<> "" AND dump-dir
<> ?
THEN RETURN.
/* used env value
*/
85 dump-dir
= "/DUMP".
/* basic default value
*/
88 /* _UIB-CODE-BLOCK-END
*/