1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12
3 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Procedure
4 /*--------------------------------------------------------------------------
5 File
: process
/apmsbrun.p
6 Purpose
: Run programs which take a parameter except do it from the
9 Syntax
: the progress command line should have a
-param
"<program>,<parameters>"
11 Author
(s
) : Andrew McMillan
13 ------------------------------------------------------------------------*/
15 DEF VAR progname
AS CHAR NO-UNDO INITIAL "".
16 DEF VAR parameters
AS CHAR NO-UNDO INITIAL "".
18 /* _UIB-CODE-BLOCK-END
*/
22 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
24 /* ******************** Preprocessor Definitions
******************** */
26 &Scoped-define PROCEDURE-TYPE Procedure
27 &Scoped-define DB-AWARE no
31 /* _UIB-PREPROCESSOR-BLOCK-END
*/
36 /* *********************** Procedure Settings
************************ */
38 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
39 /* Settings for
THIS-PROCEDURE
43 Add Fields to
: Neither
44 Other Settings
: CODE-ONLY
COMPILE
46 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
48 /* ************************* Create Window
************************** */
50 &ANALYZE-SUSPEND _CREATE-WINDOW
51 /* DESIGN Window definition
(used by the UIB
)
52 CREATE WINDOW Procedure
ASSIGN
55 /* END WINDOW DEFINITION
*/
59 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB Procedure
60 /* ************************* Included-Libraries
*********************** */
62 /* _UIB-CODE-BLOCK-END
*/
69 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Procedure
72 /* *************************** Main Block
*************************** */
74 progname
= ENTRY(1, SESSION:PARAMETER).
75 IF INDEX(SESSION:PARAMETER,'
,'
) > 0 THEN DO:
76 parameters
= SUBSTRING( SESSION:PARAMETER, INDEX(SESSION:PARAMETER,'
,'
) + 1).
78 RUN VALUE( progname
) ( parameters
).
82 /* _UIB-CODE-BLOCK-END
*/