-
Notifications
You must be signed in to change notification settings - Fork 0
/
oppathc.clle
48 lines (37 loc) · 1.99 KB
/
oppathc.clle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*------------------------------------------------------------*/
/* @@LIBRARY: RSOPNUTIL */
/* @@FILE: SOURCE */
/* @@MEMBER: OPPATHC */
/* @@TYPE: CLLE */
/* @@TEXT: Set Open Source Package Path Environment Variables */
/*------------------------------------------------------------*/
PGM PARM(&PKGPATH)
DCL VAR(&PKGPATH) TYPE(*CHAR) LEN(255)
DCL VAR(&PASEPATH) TYPE(*CHAR) LEN(1024)
DCL VAR(&PATH) TYPE(*CHAR) LEN(1024)
MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(ERRORS))
/* Set up PASE classpath for PASE */
CHGVAR VAR(&PASEPATH) VALUE(&PKGPATH |< +
':/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/+
usr/bin/X11:/usr/sbin:.:/usr/bin:/QOpenSys/+
usr/local/bin:/usr/local/bin:/usr/local/sbi+
n')
ADDENVVAR ENVVAR(PASE_PATH) VALUE(&PASEPATH) +
LEVEL(*JOB) REPLACE(*YES)
/* Set general PATH for PASE */
CHGVAR VAR(&PATH) VALUE(&PKGPATH |< +
':/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/+
usr/bin/X11:/usr/sbin:.:/usr/bin')
ADDENVVAR ENVVAR(PATH) VALUE(&PATH) LEVEL(*JOB) +
REPLACE(*YES)
SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('Path:' +
|> &PKGPATH |> 'added to PATH and +
PASE_PATH environment variables') +
MSGTYPE(*COMP)
RETURN
ERRORS:
SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('Errors +
occurred while setting open source +
package path. See the job log') +
MSGTYPE(*ESCAPE)
ENDPGM