midrange.com code scratchpad |
Name:
CL program to start MYSQL
|
Scriptlanguage:
Plain Text
|
Tabwidth:
4
|
Date:
01/04/2010 08:31:49 pm
|
IP:
Logged
|
|
Description:
This is intended to be used with the subsystem created by the following program: http://code.midrange.com/aa6f8aed17.html
|
Code:
- PGM
-
- DCL VAR(&USER) TYPE(*CHAR) LEN(20) VALUE('mysql')
- DCL VAR(&USERZ) TYPE(*CHAR) LEN(28)
- DCL VAR(&NULL) TYPE(*CHAR) LEN(1) VALUE(x'00')
- DCL VAR(&BASE) TYPE(*CHAR) LEN(100)
- DCL VAR(&PGMZ) TYPE(*CHAR) LEN(116)
-
- RTVDTAARA DTAARA(MYSQLBASE (1 100)) +
- RTNVAR(&BASE)
- CHGCURDIR DIR(&BASE)
-
- CHGVAR VAR(&USERZ) VALUE('--user=' *CAT &USER *TCAT &NULL)
- CHGVAR VAR(&PGMZ) VALUE(&BASE *TCAT +
- '/bin/mysqld_safe' *TCAT &NULL)
-
- CALL PGM(QSYS/QP2SHELL) PARM(&PGMZ &USERZ)
-
- ENDPGM
-
|
|
|