1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12
3 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Method-Library
4 /*--------------------------------------------------------------------------
15 ------------------------------------------------------------------------*/
17 DEF VAR sec-mgr
AS HANDLE NO-UNDO.
18 DEF VAR sys-mgr
AS HANDLE NO-UNDO.
20 &IF DEFINED(UIB_Is_Running) NE 0 &THEN
21 DEF VAR uib-operational-mode
AS LOGICAL INITIAL Yes
NO-UNDO.
23 DEF VAR uib-operational-mode
AS LOGICAL INITIAL No
NO-UNDO.
28 &GLOBAL-DEFINE SYS-MGR
30 /* _UIB-CODE-BLOCK-END
*/
34 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
36 /* ******************** Preprocessor Definitions
******************** */
40 /* _UIB-PREPROCESSOR-BLOCK-END
*/
45 /* *********************** Procedure Settings
************************ */
47 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
48 /* Settings for
THIS-PROCEDURE
52 Add Fields to
: Neither
53 Other Settings
: INCLUDE-ONLY
55 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
57 /* ************************* Create Window
************************** */
59 &ANALYZE-SUSPEND _CREATE-WINDOW
60 /* DESIGN Window definition
(used by the UIB
)
61 CREATE WINDOW Method-Library
ASSIGN
64 /* END WINDOW DEFINITION
*/
70 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB Method-Library
71 /* ************************* Included-Libraries
*********************** */
73 /* _UIB-CODE-BLOCK-END
*/
78 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Method-Library
81 /* *************************** Main Block
*************************** */
83 /* _UIB-CODE-BLOCK-END
*/
87 /* ********************** Internal Procedures
*********************** */
89 &IF DEFINED(EXCLUDE-get-sys-mgr) = 0 &THEN
91 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-sys-mgr Method-Library
92 PROCEDURE get-sys-mgr
:
93 /*------------------------------------------------------------------------------
95 ------------------------------------------------------------------------------*/
96 DEF VAR wh
AS HANDLE NO-UNDO.
97 DEF VAR i
AS INT NO-UNDO INITIAL 0.
99 wh
= SESSION:FIRST-PROCEDURE.
101 DO WHILE VALID-HANDLE(wh
):
103 IF INDEX( wh
:FILE-NAME, "uib" ) <> 0 THEN uib-operational-mode
= Yes.
104 IF LOOKUP( 'apms-system-manager'
:U
, wh
:INTERNAL-ENTRIES ) > 0 THEN DO:
108 wh
= wh
:NEXT-SIBLING.
111 IF NOT VALID-HANDLE( sys-mgr
) THEN RUN start-sys-mgr.
117 /* _UIB-CODE-BLOCK-END
*/
122 &IF DEFINED(EXCLUDE-start-sys-mgr) = 0 &THEN
124 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE start-sys-mgr Method-Library
125 PROCEDURE start-sys-mgr
:
126 /*------------------------------------------------------------------------------
127 Purpose
: Start the system manager.
130 ------------------------------------------------------------------------------*/
131 DEF VAR sys-mgr-name
AS CHAR NO-UNDO.
133 IF VALID-HANDLE( sys-mgr
) THEN RETURN.
134 sys-mgr-name
= SEARCH( "sysmgr.r" ).
135 IF sys-mgr-name
= ?
THEN sys-mgr-name
= SEARCH( "sysmgr.w" ).
137 RUN VALUE( sys-mgr-name
) PERSISTENT SET sys-mgr.
138 IF uib-operational-mode
THEN RUN dispatch
IN sys-mgr
( 'set-uib-modus-operandi'
:U
).
139 RUN dispatch
IN sys-mgr
( 'Initialize'
:U
).
145 /* _UIB-CODE-BLOCK-END
*/