-
Notifications
You must be signed in to change notification settings - Fork 5
/
cmsbuild.sh
171 lines (141 loc) · 5.58 KB
/
cmsbuild.sh
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
#!/bin/sh
# Make BREXX on CMS
# Exit if there is an error
set -e
# Get the latest gccbrx.cckd disk image
herccontrol "detach 09F0"
wget -nv https://github.com/adesutherland/CMS-370-GCCLIB/releases/download/v1.0.0/GCCLIB.zip
unzip GCCLIB.zip
cp GCCLIB/gccbrx.cckd ..
rm GCCLIB.zip
rm -r GCCLIB
herccontrol "attach 09F0 3350 gccbrx.cckd"
# IPL
herccontrol "ipl 141" -w "USER DSC LOGOFF AS AUTOLOG1"
herccontrol "/cp start c" -w "RDR"
herccontrol "/cp start d class a" -w "PUN"
# LOGON MAINTC
herccontrol "/cp disc" -w "^VM/370 Online"
herccontrol "/logon maintc maintc" -w "^CMS"
herccontrol "/" -w "^Ready;"
herccontrol "/purge rdr" -w "^Ready;"
herccontrol "/ACCESS 393 B" -w "^Ready;"
herccontrol "/ERASE * * B1" -w "^Ready;"
# Get Source
yata -c -f archive.yata
herccontrol -m >tmp; read mark <tmp; rm tmp
echo "USERID MAINTC\n:READ ARCHIVE YATA " > tmp
cat archive.yata >> tmp
netcat -q 0 localhost 3505 < tmp
rm tmp
herccontrol -w "HHCRD012I" -f $mark
herccontrol "/" -w "RDR FILE"
herccontrol "/yata -x -f READER -d b" -w "^Ready;"
# Get test suite
yata -c -d tests -f archive.yata
herccontrol -m >tmp; read mark <tmp; rm tmp
echo "USERID MAINTC\n:READ ARCHIVE YATA " > tmp
cat archive.yata >> tmp
netcat -q 0 localhost 3505 < tmp
rm tmp
herccontrol -w "HHCRD012I" -f $mark
herccontrol "/" -w "RDR FILE"
herccontrol "/yata -x -f READER -d b" -w "^Ready;"
# Get test tools
yata -c -d tools -f archive.yata
herccontrol -m >tmp; read mark <tmp; rm tmp
echo "USERID MAINTC\n:READ ARCHIVE YATA " > tmp
cat archive.yata >> tmp
netcat -q 0 localhost 3505 < tmp
rm tmp
herccontrol -w "HHCRD012I" -f $mark
herccontrol "/" -w "RDR FILE"
herccontrol "/yata -x -f READER -d b" -w "^Ready;"
# Fix Source Files
herccontrol "/COPYFILE * MACRO B (RECFM F LRECL 80" -w "^Ready"
herccontrol "/COPYFILE * COPY B (RECFM F LRECL 80" -w "^Ready"
herccontrol "/COPYFILE * ASSEMBLE B (RECFM F LRECL 80" -w "^Ready"
#herccontrol "/COPYFILE * EXEC B (RECFM F" -w "^Ready"
herccontrol "/RENAME NEWBREXX TMPFTYPE B NEWBREXX CONTROL B" -w "^Ready"
# Make source tape and vmarc
herccontrol "/cp disc" -w "^VM/370 Online"
herccontrol "/logon operator operator" -w "RECONNECTED AT"
hetinit -n -d brexxsrc.aws
herccontrol "devinit 480 io/brexxsrc.aws" -w "^HHCPN098I"
herccontrol "/attach 480 to maintc as 181" -w "TAPE 480 ATTACH"
herccontrol "devinit 00d io/brexxsrc.vmarc" -w "^HHCPN098I"
herccontrol "/cp disc" -w "^VM/370 Online"
herccontrol "/logon maintc maintc" -w "RECONNECTED"
herccontrol "/begin"
herccontrol "/tape dump * * b (noprint" -w "^Ready;"
herccontrol "/detach 181" -w "^Ready;"
herccontrol "/vmarc pack * * b (pun notrace" -w "^Ready;"
# Close and remove extra record from VMARC file
herccontrol "devinit 00d dummy" -w "^HHCPN098I"
truncate -s-80 brexxsrc.vmarc
# Put tools in the T drive
herccontrol "/COPYFILE BRXASM EXEC B = = T (REPLACE" -w "^Ready"
herccontrol "/ERASE BRXASM EXEC B" -w "^Ready"
herccontrol "/COPYFILE BRXBUILD EXEC B = = T (REPLACE" -w "^Ready"
herccontrol "/ERASE BRXBUILD EXEC B" -w "^Ready"
herccontrol "/COPYFILE BRXCOMP EXEC B = = T (REPLACE" -w "^Ready"
herccontrol "/ERASE BRXCOMP EXEC B" -w "^Ready"
herccontrol "/COPYFILE BRXCOMPD EXEC B = = T (REPLACE" -w "^Ready"
herccontrol "/ERASE BRXCOMPD EXEC B" -w "^Ready"
herccontrol "/COPYFILE BRXGEN EXEC B = = T (REPLACE" -w "^Ready"
herccontrol "/ERASE BRXGEN EXEC B" -w "^Ready"
herccontrol "/COPYFILE BRXSRCH EXEC B = = T (REPLACE" -w "^Ready"
herccontrol "/ERASE BRXSRCH EXEC B" -w "^Ready"
herccontrol "/COPYFILE BRXSRCHD EXEC B = = T (REPLACE" -w "^Ready"
herccontrol "/ERASE BRXSRCHD EXEC B" -w "^Ready"
herccontrol "/COPYFILE BRXSRCHT EXEC B = = T (REPLACE" -w "^Ready"
herccontrol "/ERASE BRXSRCHT EXEC B" -w "^Ready"
herccontrol "/COPYFILE TOOLDISK MEMO B = = T (REPLACE" -w "^Ready"
herccontrol "/ERASE TOOLDISK MEMO B" -w "^Ready"
herccontrol "/COPYFILE NEWBREXX CONTROL B = = A (REPLACE" -w "^Ready"
herccontrol "/ERASE NEWBREXX CONTROL B" -w "^Ready"
herccontrol "/ipl cms" -w "^CMS"
herccontrol "/" -w "^Ready;"
herccontrol "/BRXBUILD" -w "^Ready;" -t 240
herccontrol "/ipl cms" -w "^CMS"
herccontrol "/" -w "^Ready;"
herccontrol "/BRXSRCH" -w "^Ready;"
herccontrol "/BRXGEN" -w "^Ready;"
herccontrol "/ipl cms" -w "^CMS"
herccontrol "/" -w "^Ready;"
# Make binary tape and vmarc
herccontrol "/cp disc" -w "^VM/370 Online"
herccontrol "/logon operator operator" -w "RECONNECTED AT"
hetinit -n -d brexxbin.aws
herccontrol "devinit 480 io/brexxbin.aws" -w "^HHCPN098I"
herccontrol "/attach 480 to maintc as 181" -w "TAPE 480 ATTACH"
herccontrol "devinit 00d io/brexxbin.vmarc" -w "^HHCPN098I"
herccontrol "/cp disc" -w "^VM/370 Online"
herccontrol "/logon maintc maintc" -w "RECONNECTED AT"
herccontrol "/begin"
herccontrol "/access 193 e" -w "^Ready"
herccontrol "/copyfile brexx * a = = e" -w "^Ready"
herccontrol "/copyfile brexxd * a = = e" -w "^Ready"
herccontrol "/tape dump * * e" -w "^Ready"
herccontrol "/detach 181" -w "^Ready;"
herccontrol "/vmarc pack * * e (pun" -w "^Ready;"
# Close and remove extra record from VMARC file
herccontrol "devinit 00d dummy" -w "^HHCPN098I"
truncate -s-80 brexxbin.vmarc
# LOGOFF
herccontrol "/logoff" -w "^VM/370 Online"
# REBUILD CMS
herccontrol "/logon maint cpcms" -w "^CMS"
herccontrol "/" -w "^Ready"
herccontrol "/NEWBREXX" -w "^Ready"
herccontrol "/define storage 16m" -w "CP ENTERED"
herccontrol "/ipl 190 clear" -w "^CMS"
herccontrol "/savesys cms" -w "^CMS"
herccontrol "/" -w "^Ready;"
herccontrol "/logoff" -w "^VM/370 Online"
# Test suite
# herccontrol "/runtest_" -w "^Ready;"
# SHUTDOWN
herccontrol "/logon operator operator" -w "RECONNECTED AT"
herccontrol "/shutdown" -w "^HHCCP011I"
herccontrol "detach 09F0"