Added capital works blank section. Synced calling screen.
[capital-apms-progress.git] / process / one-off / dumpall.p
blob4f3ec2b02bed5a6a52e52f96af4d8e413551f31f
1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12
2 &ANALYZE-RESUME
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 */
14 &ANALYZE-RESUME
17 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
19 /* ******************** Preprocessor Definitions ******************** */
21 &Scoped-define PROCEDURE-TYPE Procedure
25 /* _UIB-PREPROCESSOR-BLOCK-END */
26 &ANALYZE-RESUME
30 /* *********************** Procedure Settings ************************ */
32 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
33 /* Settings for THIS-PROCEDURE
34 Type: Procedure
35 Allow:
36 Frames: 0
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
47 HEIGHT = .4
48 WIDTH = 40.
49 /* END WINDOW DEFINITION */
51 &ANALYZE-RESUME
56 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Procedure
59 /* *************************** Main Block *************************** */
60 DEF VAR dump-dir AS CHAR NO-UNDO.
61 RUN get-dump-dir.
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" ).
68 OUTPUT CLOSE.
70 /* _UIB-CODE-BLOCK-END */
71 &ANALYZE-RESUME
74 /* ********************** Internal Procedures *********************** */
76 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-dump-dir Procedure
77 PROCEDURE get-dump-dir :
78 /*------------------------------------------------------------------------------
79 Purpose:
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 */
86 END PROCEDURE.
88 /* _UIB-CODE-BLOCK-END */
89 &ANALYZE-RESUME