-
Notifications
You must be signed in to change notification settings - Fork 19
/
QSHPATHC.CLLE
78 lines (64 loc) · 3.38 KB
/
QSHPATHC.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
PGM PARM(&PKGPATH &PATHLOC)
DCL VAR(&PATHLOC) TYPE(*CHAR) LEN(10)
DCL VAR(&PATHLOCTMP) TYPE(*CHAR) LEN(10)
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))
/* If PATHLOC = *DTAARA, get PATHLOCTMP from data area - 1.0.9 */
IF COND(&PATHLOC *EQ *DTAARA) THEN(DO)
RTVDTAARA DTAARA(QSHONI/QSHPATHLOC *ALL) +
RTNVAR(&PATHLOCTMP)
ENDDO
/* If PATHLOC NOT *DTAARA, get PATHLOCTMP from passed in parm - 1.0.9 */
IF COND(&PATHLOC *NE *DTAARA) THEN(DO)
CHGVAR VAR(&PATHLOCTMP) VALUE(&PATHLOC)
ENDDO
/* Decide if we're using *BEGIN or *END option. In case of */
/* bad data in the data area setting, we default to *BEGIN */
IF COND(&PATHLOCTMP *NE *END) THEN(DO)
CHGVAR VAR(&PATHLOCTMP) VALUE('*BEGIN')
ENDDO
/* Set up PASE classpath for PASE at Beginning ot End of Path */
/* Always put open source path at beginning if not *END. */
IF COND(&PATHLOCTMP *NE *END) THEN(DO)
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/loca/sbin')
ENDDO
IF COND(&PATHLOCTMP *EQ *END) THEN(DO)
CHGVAR VAR(&PASEPATH) +
VALUE('/QOpenSys/usr/bin:/usr/ccs/bin:/QOpe+
nSys/usr/bin/X11:/usr/sbin:.:/usr/bin:/QOpe+
nSys/usr/local/bin:/usr/local/bin:/usr/loca+
/sbin:' |< &PKGPATH)
ENDDO
ADDENVVAR ENVVAR(PASE_PATH) VALUE(&PASEPATH) +
LEVEL(*JOB) REPLACE(*YES)
/* Set general PATH for PASE at Beginning or End of Path - 1.0.9 */
/* Always put open source path at beginning if not *END. */
IF COND(&PATHLOCTMP *NE *END) THEN(DO)
CHGVAR VAR(&PATH) VALUE(&PKGPATH |< +
':/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/+
usr/bin/X11:/usr/sbin:.:/usr/bin')
ENDDO
IF COND(&PATHLOCTMP *EQ *END) THEN(DO)
CHGVAR VAR(&PATH) +
VALUE('/QOpenSys/usr/bin:/usr/ccs/bin:/QOpe+
nSys/usr/bin/X11:/usr/sbin:.:/usr/bin:' +
|< &PKGPATH)
ENDDO
ADDENVVAR ENVVAR(PATH) VALUE(&PATH) LEVEL(*JOB) +
REPLACE(*YES)
SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('Path:' +
|> &PKGPATH |> 'added to' |> &PATHLOCTMP |> +
'of 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