-------
TABLE 4-4 (continued)
RECORD TYPE 5.
loOl^ L 73 J4 Ji'iSSV 399 c,«i 999999999999999999 99999 9999 999999 999999999999999999999999
1141
1141
1141
1141
1141
1141
1141
1141
1141
1141
1141
11 A 1
IS i
1141
1141
1141
U41
1141
1141
1141
1141
1141
1141
1141
1141
1141
1141
1141
1141
1141
114 I
idOio loCIO
130 9
180 9
180 9
20310
20310
22514
22512
£4CCii»t1t;ii7j04Ul ij6il tie. 11 1 ^t C =9999999999999999999999999999999999999999999
54J01PHJ11 73J4J112oliOkli.l4C 180
£4CCl!>ri01i73040i C611 Cl 1 1 ii! C 99
54CC15ri01173U4UJ.i26ilOlJ.112G 10
1601^ 2 73C402 22ii2 ^512
24&10 24810
S40Ci5hG117.iO<«02 06110211140 225
£400l>HOii7JJ4J^l26110211l4J 248
54CCii»HUil73U4G 8 293 8
3ii> 7 315 7
540Ci5HOii730403 C611U2U14G 293
5 400 15H Oil 730403 1261 102 11 140 315
*40C15h011730403 C611C111120 8
c t* r f\ i *iu n i i 7 ~4.i AM '4 1 5 /. i i /i i 11 i "y i \ ~j
Z ILUA Pn Uii/jUHUJI«COllUil,ll£U r
16012 2 730404 010 010
014 014
540C15HU11730404 C611021114C 0
e40C15HOii730*04l26U0211140 0
;4CC11>HU11730404 C6110111120 10
f 40 Ci Ml Cii 7^04041201 id 11.120 14
160i1201i01JLll20 16
1601/ 2 730*06 22516 22516
22512 22514
54CClbHOii73U406 C6110211140 225
i40Cii>HUil7304G6126ilC211140 225
54CCi5HOii7->0406 06110111120 16
£40C15H 01 1730406 12611 01 11 120 12
16012 2 7^U4U7 203 tt HU117304U7126llC111120 10
1601^ 2 73C4C8 4520 4518
4514 4514 .
540Cif>HGU73040£ C6liC211140 45
S4GC15HOil73C406i26110211140 45
180
99
10
22510
27012
225
248
12
10
293 8
33b 7
293
315
8
010
016
0
0
10
14
338 8
24818
0
270
8
16
22516
22518
225
225
16
14
203 6
2312
203
23
8
10
4518
4516
45
45
180 180
99 99
9 9
22510
27012
225 225
270 270
10 10
12 12
315 8
338 7
293 315
338 338
8 8
010
016
0 0
0 0
10 10
16 16
338 8
24818
338 338
248 248
8 8
18 18
22518
22518
225 225
225 225
16 18
18 18
203 5
2312
203 203
23 23
6 5
12 12
4518
4516
45 45
45 45
180
99
9
22510
27012
225
270
10
12
315 8
338 7
315
338
8
010
016
0
0
10
16
338 8
24820
338
248
8
20
22518
22518
225
225
18
18
203 5
2312
203
23
5
12
4516
4516
45
45
203 203
99 99
10 10
22510
27012
225 248
270 270
10 10
12 10
315 8
0 7
315 315
0 0
8 8
012
016
0 23
0 0
12 12
16 16
338 8
24820
338 338
248 225
8 6
20 18
22517
20316
225 225
203 203
17 17
16 14
183 5
4514
180 180
45 45
5 5
14 14
4516
4514
45 45
<»5 68
225
99
14
24810
27010
248
293
10
10
315 8
0 8
315
0
8
o
2312
016
23
0
12
16
338 6
22518
315
225
6
16
22517
20314
225
203
17
10
180 5
4514
180
45
2
18
4516
6812
45
68
225 225
99 99
12 12
24810
29310
248 225
293 293
8 8
8 8
315 8
0 8
315 315
0 0
8 8
81 n
1U
2312
016
23 23
0 0
12 12
14 12
315 6
22516
315 293
203 203
8 10
14 10
22517
20310
225 225
203 203
14 12
8 8
180 2
4518
45 45
45 45
5 5
20 20
4516
6812
68 68
68 68
225
99
12
248 8
293 8
225
293
7
8
315 8
0 8
315
C
7
i n
1U
2312
014
0
0
12
10
315 8
20314
293
225
14
14
22514
203 8
225
203
12
8
45 5
4520
45
45
8
20
6814
6818
68
68
22512
158
225
10
12
225 8
293 8
225
293
7
8
315 8
010
315
0
7
1 f\
1LJ
2312
012
0
0
12
10
29310
20310
270
225
14
14
22512
203 8
225
203
12
8
45 5
4520
45
45
10
20
6814
6818
68
68
22512
^.
225 7
293 8
315 7
010
012
010
29314
22514
22512
203 8
45 8
4520
6814
6818
15810
22512
225 7
293 8
315 7
010
012
010
27014
22514
22512
203 8
4510
4520
6814
6818
-------
V. MISCELLANEOUS OPERATIONAL INFORMATION
A. SYSTEMS AND CPU TIMES
The PREPROCESSOR and the CONVERSION programs were executed and de-
bugged on an IBM 360/65 machine. Both programs require two tape drives for
simultaneous processing of Input and output data.
For the PREPROCESSOR, the IBM ASSEMBLER used, requires approximately
100 K and 15 seconds to compile the program. The program then will sort
1500 records and output them 1n 5 to 10 seconds while using less than 10 K
of memory.
For the CONVERSION program, the compiler requires 100 K and about
15 seconds of CPU time. The compiled program will run under 50 K bytes of
core and process 1500 records 1n about 20 seconds.
B. PROGRAM MESSAGES
No diagnostic messages are written by the PREPROCESSOR program.
Specific problems that may be encountered in the normal execution
of the CONVERSION program are signalled by the presence of program messages.
These diagnostics are briefly discussed below.
If the CONVERSION program cannot process a record, 1t writes a mes-
sage identifying the problem followed by a printout of the input Illinois
record. The various diagnostics are: (1) 'SITE NOT LOCATED.1; (2) 'POLLU-
TANT XX NOT CODED FOR.', which occurs only in record type 3 and means that
although the pollutant had a place reserved for it (because of the nature
of record type 3), no corresponding information on method, units, and deci-
mal place was coded; (3) 'POLLUTANT CODE XX NOT FOUND.', meaning that the
pollutant code xx is not present in the list of pollutants and in subroutine
PLUTNT; (4) 'METHOD CHANGE ERROR. POINTER EXCEEDS NO. OF CHANGES.1, which
means a method change was Incorrectly encoded. After writing the problem
record, the program reads a new record and resumes processing.
5-1
-------
VI. REFERENCES
1. Fair, D. H., Morgan, 6. B., and timer, C. E., SAROAD System Descri p-
ffpn and Data Coding Manual, U.S. Department of Health, Education and
Welfare, National Air Pollution Control Administration (Publication
No. APTD 68-8), Cincinnati, Ohio (August 1968).
2. Users Manual: SAROAD (Storage and^Retrieval of Aerometric Data), U.S.
Environmental Protection Agency, Office of Air Programs (Publication
No. APTD-0663), Research Triangle Park, N.C. (July 1971).
3. Personal Communications-, Illinois Environmental Protection Agency,
Division of A1r Pollution Control, Springfield, Illinois (July 1973).
4. Fair, D. H., Clements, J. B., and Morgan, G. B., SAROAD Parameter
Coding Manual, U.S. Environmental Protection Agency, Office of Air
Programs (Publication No. APTD-0633), Research Triangle Park, N.C.
(July 1971).
6-1
-------
APPENDIX A
SOURCE LISTING OF PREPROCESSOR PROGRAM
STMT SOURCE STATEMENT
1 CONVERT
2
3 +
4+
5
6
7
8
9
10
11 +
12 +
13+
14 +
15+
16
17 BGIN
18 +
19+BGIN
20+
21 +
22 +
23 RECURSE
24+RECURSE
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 * FINI
COMP
PLUS
*
BLANK
S150
SAVE REGISrgft'S
START
SAVE (14,12)
OS OH
STM 14,12,1?U3)
BALK 5,0
USING *,5
ST 13,SAVE13
LA 13,SAVEAREA
LA 8,TAIL
OPEN (WDCB3,(OUTPUT))
0,4 ALIGN LIST TO FJLLHORD
l,*+8 LOAD REG1 W/LIST ADDR.
ALIU43) OPTION BYTE
AL3(WDCB3) OCR ADDRESS
19 ISSUE OPEN SVC
CNOP
BAL
DC
DC
SVC
LA 4.WDCB3
OPEN (RDCBJ
0,4 ALIGN LIST TO FJLLUQRO
l,*+8 LOAD REGl M/UST AODR.
AH (128 I OPTION BYTE
AL3(RDCB) DCS ADDRESS
19 ISSUE OPEN SVC
ROCB,INPUT
1,RDCB LOAD PARAMETER REG 1
0,INPUT LOAD PARAMETER REG 0
15,48(0,1) LOAD GET ROUTINE ADD«
TO GET ROUTINE
CNOP
BAL
DC
DC
SVC
GET
LA
LA
L
BALR 14,15 LINK
CLC TAIL,REC=
8NE RECURSE
MVC WHEAD,HEAD
LA 6,HEAD+16
LA 7.HHEAD+16
CLI T4IL,X«F3'
BE THREE
RECORD TYPE IS 1,2, OR 5.
CLI 0(R6),X«40«
BE BLANK
UNPK 0(6 ,R7),0(3,R6I
01 5(R7),X«FO«
MVN SIGN.2CR6)
CLI SIGN,X'D«
BNE PLUS
MVI 0(R7),X'60'
A R6.B3
A R7,SIX
B S150
BYTE CONTAINS A BLANK.
MVC 0(2,R7).NINES
A R6.0NE
A R7,TWO
CR 6,8
BL COMP
MVC 0(17,R7).NINES
MVC WTAIL,TAIL
SHED RECORD. PUT IT IN OJTPJT
F01FEB73 fl/23/73
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT.
CNVT
CNVT
CHANGF SIGN CDDE
MOVE SIGN BITS
CHECK FOR MINUS
TO F
INSERT A
SIGN
CNVT
CNVT
FILL ri ITH
BUFFER rflTH
PUT ROUTINF,
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
A-l
-------
STMT SOURCE STATEMENT
F01FEB73 8/23/73
THREE
8LNK3
T150
*
FIN
56 FILL
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 C2
100
101
102 +
103 +
104+
105+
106+
107
108+
109+
110+
F9«
LR 1,4
LA 0,OUTPUT
L 15,48(0,1)
BALR 14,15
B RECURSE
RECORD TYPE«3.
CLI 0(R6),X«40«
BE BLNK3
MVC 0(1,R7),0(R6)
B T150
MVI 0(R7),X'
A R6,ONE
A R7,ONE
CR 6,3
BL THREE
MVI WTAIL
B FILL
END OF TAPE
CLI REC=,X«F5'
BE C5
CLOSE (RDCB,REREAD)
CNOP 0,4 ALIGN LIST TO FJLLWORD
BAL l,*+8 LOAD REG1 W/LIST ADDR
DC ALK144) OPTION BYTE
DC AL3CRCCB) DCB ADDRESS
SVC 20 ISSUE CLOSE SVC
CLI REC=,X«F3«
BNE C2
CLOSE (WOCB3,LEAVE)
CNOP 0,4 ALIGN LIST TO FULLWORD
BAL l,*+8 LOAD REG1 W/LIST ADDR
DC ALK176) OPTION BYTE
DC AL3(WDCB3) DCB ADDRESS
SVC 20 ISSUE CLOSE SVC
OPEN (WOCB2,(OUTPUT)I
CNOP 0,4 ALIGN LIST TO FJLLWORD
BAL l,*+8 LOAD REG1 W/LIST ADDR.
DC ALK143I OPTION BYTE
DC AL3(WDCB2) DCB ADDRESS
SVC 19 ISSUE OPEN SVC
LA 4,WOCB2
MVI REC=»X«F2«
B BGIN
CLI REC*,X«F2«
BNE Cl
CLOSE (WDCB2,LEAVE)
CNOP 0,4 ALIGN LIST TO FJLLWORD
BAL l,*+8 LOAD REG! W/LIST ADDR
DC ALK176) OPTION BYTF
DC AL3(WDCB2) DCB ADDRESS
SVC 20 ISSUE CLOSE SVC
OPEN (WDCB1,(OJTPUT))
CNOP 0,4 ALIGN LIST TO FJLLWORD
BAL i,*+8 LOAD REG1 W/LIST AO'DR.
DC ALH143) OPTION BYTE
INSERT WDCB ADDRESS IN Rl
LOAD OUTPUT ADDRESS IN RO
LOAD PUT PC1JTINE ADDRESS
LINK TO PUT ROUTINE
MOVE NUMBER.
INSERT A NISE.
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT.
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
A-2
-------
STMT SOURCE STATEMENT
F01FEB73 8/23/73
111+
112+
113
11*
115
116 Cl
117+
118+C1
119+
120+
121 +
122
123+
1 2*+
125+
126+
127+
128
129
130
131 C5
132 +
133+C5
134 +
135 +
136+
137 +
138+
139
140
141 +
142 +
143 +
144 INPUT
145 HEAD
146
147 TAIL
148 OUTPUT
149 WHEAO
150
151 WTAIL3
152
153 WTAIL
154 KEC=
155 SAVE13
156 SAVEAREA
157 ONE
158 TWO
159 83
160 SIX
161 NINES
162 SIGN
163 R6
164 R7
165 ROC8
DC AL3(WDC81) OCB ADDRESS
SVC 19 ISSUE OPEN SVC
LA 4,WDCBi
MVI REC-»X«F1«
B BGIN
CLOSE (WDCB1, LEAVE)
CNOP Ot4 ALIGN LIST TO FJLLWORO
BAL lt*+8 LOAD REG1 W/LIST ADDR
DC ALK176) OPTION 8YTE
DC AL3(WOC81) CCR ADDRESS
SVC 20 ISSUE CLOSE SVC
OPEN (HDCB5, (OUTPUT))
CNOP Ot4 ALIGN LIST TO FULLWflRD
BAL l,*+8 LOAD REG1 W/LIST ADDR.
DC ALU143) OPTION BYTE
DC AL3(WDCB5) OCB ADDRESS
SVC 19 ISSUE OPEN SVC
LA 4,WOCB5
MVI REC=,X'F5«
B BGIN
CLOSE (RDCB,,MDCB5)
CNOP 0,4 ALIGN LIST TO FJLLWORD
BAL 1,*+12 LOAD R?Gl W/LIST ADDR
DC ALKO) OPTION BYTE
DC AL3(RDCB) DCS ADDRESS
DC ALK128J OPTION BYTE
DC AL3(WOCB5) DCB ADDRESS
SVC 20 ISSUE CLOSE SVC
L 13.SAVE13
RETURN (14,12) ,,RC=0
LM 14,12,12(13) RESTORE THE REGISTFRS
LA 15,0(0,3) LOAD RETURN CODE
BR 14 RETURN
OS 00
OS ZL16
OS 133Z
OS Z
OS OD
OS ZL16
DS 133Z
OS Z
DS 149Z
DS Z
DC X«F3«
DS F '
DS 18F
DC XL4«1«
DC XL4«2»
DC XL4»3«
DC XL4»b»
DC 17X'F9«
DC X«0'
ECU 6
EQU 7
DCB DONAME = READ,MACRF=GM,DSORG=PS, EODAO
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
FIN
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
CNVT
A-3
-------
iTMT SOURCE STATEMENT
F01FF.B73 8/23/73
167**
168**
169*ROCB
171**
173*
174*
176**
178*
179*
180*
181*
182*
184**
186*
187*
188*
189*
191**
193*
194*
195*
196*
198**
200*
201*
202*
203*
204*
205*
206*
207*
208*
210**
212*
213*
214*
215*
216*
217*
218*
219 WDCB1
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
OC
DC
OC
DC
OC
DC
OC
DC
DC
DC
OC
DC
DC
OCB
DATA CONTROL BLOCK
OF'O" ORIGIN ON K OR 0 BOUNDARY
DIRECT ACCESS DEVICE
BL16»0» FDAD»DVTBL
AtO) KEYLE,OEVT,TRBAL
COMMON ACCESS METHOD TNTPPFACF
ALKO) BUFNO
AL3U) BUFCB
AL2(0) BUFL
BL2'0100000000000000«
A(l) IQbAO
OSORG
FOUNDATION EXTENSION
BLi'OOOODOOO' BFTEK, BFLNt HIAKCHY
AL3(FIN) EODAD
BL1« 00000000* RECFM
AL3(0) EXLST
FOUNDATION BLOCK
CLa'READ1 ODNAME
BLPOOOOOOIO1 OFLGS
BLl'OOOOOOOO* IFLG
BL2'OIOIOOJOOOOOOOOOI MACR
BSAM-BPAM-QSAM INTERFACE
BL1' 00003000* RERl
AL3U) CHECK, GERR, PFRR
A(l) SYNAD
H«0» CIND1, CIND2
AL2(0) BLKSIZE
F«0' WCPO, WCPL, OFFSR, OFFSW
A(l) IOBA
ALKO) NCP
AL3(1) EOBR, EfJBAD
OSAM INTERFACE
Ad) RECAD
H«0» OSWS
AL2(0) LRECL
BL11 00000000' EROPT
AL311I CNTRL
F«0« PRECL
A(l) EOB
DDNAME=WRITEl,MACRFaPMtDSORG=PStPECFM»Fflfl.ppCL=300
CNVT
A-4
-------
STMT SOURCE STATEMENT
DATA CONTROL BLOCK
DC OF'O' ORIGIN ON WORD BOUNDARY
DIRECT ACCESS DEVICE INTERFACE
F01FEB73 8/23/73
221+*
222+*
223+WDC61
225+*
227+
228+
230+*
232 +
233+
234+
235 +
236+
238 + *
240+
241 +
242 +
243 +
245+*
247 +
248+
249+
250+
252 + *
254+
255+
256+
257+
258+
259 +
260+
261 +
262 +
264+*
266 +
267 +
268 +
269+
270+
271 +
272+
273 WDCB2
DC BL16«0» FDAD,DVT8L
DC A<0) KEYLE,DEVT,TRBAL
COMMON ACCESS METHOD
DC ALKO) BUFNO
DC AL3(1) BUFCB
DC AL2(0) BUFL
DC BL2' 01 00000000000000' DSORG
DC A(i) ICBAD
FOUNDATION EXTENSION
DC BLl'OOOOOOOO' BFTEK, BFl N, HI ARCHY
DC AL3(1) FODAO
DC BLl'10010000» RECFM
DC AL3(0) EXLST
FOUNDATION BLOCK
DC CLS'WKITEi' DDNAME
DC BL1« 00000010* OFLGS
DC BLl'00003000' IFLG
DC BL2'OOJ030000iaiOOT3' MACR
aSAM-BPAM-QSAM INTERFACE
DC BLl'OOOOOOOO' RER1
DC AL3(l) CHECK, GERR, PERR
DC A(l) SYNAD
DC H'0« CIND1, CIND2
DC AL2(0) BLKSIZE
DC F'O' WCPO, WCPL, OFFSR,
DC A(l» IOBA
DC ALKD) NCP
DC AL3(1) E08R, E09AO
USAM INTERFACE
DC Ad) RECAD
DC H'O' QSWS
DC AL2(300) LRECL
DC BLl'OOOOOOOO' EROPT
DC AL3U) CNTRL
DC F'O' PRECL
DC Ad) EQB
DCS ODNAME=WRITE2»MACRF=
PM,OSORG=PS, RECFM*FB,LRECL=300
CNVT
A-5
-------
iTMT SOURCE STATEMENT
DATA CONTROL BLOCK
DC OF*0* ORIGIN ON WORD BOUNDARY
279** DIRECT ACCESS DEVICE INTERFACE
FOIFE873 8/23/73
275**
276**
277*WPCB2
281*
282*
284**
286*
287*
288*
289*
290*
292**
294*
295*
296*
297*
299**
3C1*
302*
303*
304*
306**
3C8*
309*
310*
311*
312*
313*
314*
315*
316*
318**
320*
321*
322*
323*
324*
325*
326*
327 WOC63
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DCB
8L16'0' FOAD.OVTBL
A(0) KEYLE.DEVT,TR8AL
COMMON ACCESS METHOD
ALKO) BUFNO
AL311) BUFCB
AL2IO) BUFL
BL2'0100000000000000'
All) IOBAD
DSORG
FOUNDATION EXTENSION
8L1»00000000'
AL3(1) EODAD
BL1«10010000'
PXLST
BFTEKtBFLN.HIARCHY
RECFM
FOUNDATION BLOCK
CL8'WRITE2' ODNAME
BLl'00000010' OFLGS
BLl'OOOOOOOO' IFLG
BL2*0000000001010000' MACR
BSAM-BPAM-QSAM INTERFACE
BL1'30333330' RER1
AL3U) CHECK, GEKfl, PEKR
A(l) SYNAD
H'O' CINDl, CIND2
AL2(0) BLKSIZE
F'O' WCPO, WCPL, OFFSRf OFFSrf
A(l) IOBA
ALKOI NCP
AL3(1) EOBRi F.OBAD
OS AM INTERFACE
AUJ RECAD
H*0* QSWS
AL2(300) LRECL
BL1«00000000' EROPT
AL3(1) CNTRL
F'O' PRECL
Allli ECB
DDNAMF=WRITE3,MACRF= PM,DSORG"
PS,RECPM-FB,LPECL*150
CNVT
A-6
-------
STMT SOURCE STATEMENT
DATA C'JNTROt BLOCK
DC OF«0« ORIGIN UN WORD BOUNDARY
333+* DIRECT ACCESS DEVICE INTERFACE
F01FEB73 8/23/73
329+*
330+*
331+WDCB3
335+
336+
338+*
340+
342 +
343 +
344 +
346+*
348 +
349+
350+
351 +
353+*
355 +
356+
357+
358+
360+*
362 +
363+
364 +
365 +
366+
367 +
368 +
369+
370+
372+*
374 +
375 +
376+
377+
378+
379+
380+
381 WOCB5
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DCB
BL16*0» FDADtDVTBL
A<0) KEYLEtDEVT,TRBAL
COMMON ACCESS METHOD INTERFACE.
ALi(O) BUFNO
AL3(U BUFC8
AL2(0) BUFL
BL2'0100000000000000*
Ad) I OB AD
DSORG
FOUNDATION EXTENSION
BLl'OOOOOOOO1 BFTEK, BF|_N,HIARCHY
AL3U) EODAD
BLl'100100001 RECFM
AL3(0) EXLST
FOUNDATION BLOCK
CL8»WRITE3» DDNAME
BLPOOOOOOIO1 OFLGS
bLl'00000000' IFLG
BL2«0000000001010000« MACP.
3SAM-BPAM-QSAM INTERFACE
BLl'OOOOOOJO' RER1
AL3(1) CHECK, GERR, PERR
Ad) SYNAD
H»0« CIND1, CIND2
AL2<0) BLKSIZP .
F'O' rfCPO, rtCPL, DFFSR, OFFSW
Ad.) IQBA
ALKO) NCP
AL3(1) EOBR, EOBAD
OS AM INTERFACE
Ad) RECAD
H*0« QSWS
AL2(150) LRECL
BLl'OOOOOOOO* 6ROPT
AL3d) CNTkL
F*0« PRECL
Ad) EOB
ODNAME*WRITE5,MACRF«PM,DSORG=PSf
CNVT
A-7
-------
STMT SOURCE STATEMENT
DATA CONTROL BLOCK
Of«0« ORIGIN ON WORD BOUNDARY
F01FE873 8/23/73
383**
384**
385*WDCB5
387**
389*
390*
392**
394*
395*
396*
397*
398+
400**
402*
4C3*
404*
405*
407**
409*
410*
411*
412*
414**
416*
417*
418*
419*
420*
421*
422*
423*
424*
426**
428*
429*
430*
431*
432*
433*
434*
435
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC'
DC
DC
END
DIRECT ACCESS DEVICE INTERFACE
BL16«0I FDAO.DVTBL
A(0) KEYLEtDEVT,TRBAL
COMMON ACCESS METHOD INTERFACE
ALliO) BUFNO
AL3(lt BUFCB
AL2(0) BJFL
BL2«0100000')00300033'
A(l) IOBAD
DSnRG
FOUNDATION EXTENSION
tJLl* 00003000' BFTEKiBFLNtHIARCHY
AL3I1) EODAD
BL1*10010000' RECFM
AL3(0) EXLST
FOUNDATION BLOCK
CL8'WRITE5« ODNAMF
BLl'OOOOOOU' OFLGS
BLl'OOOOOOOO1 IFLG
BL2«0000000001010000' MACR
BSAM-BPAM-USAM INTERFACE
BLl'OOOOOOOO1 RER1
AL3<1» CHECK, GEHR, PERR
A(U SYNAD
H*0« CINDl, CIND2
AL2(0) BLKSIZE
F«0« WCPO, rtCPL, OFFSRt OFFSW
A(l) I DBA
ALl(O) NCP .
AL3(1) EOBR, EOBAO
QSAM INTERFACE
Ad) RECAD
H»0« QSWS
AL2(300) LRECL . .
BLl'OOOOOOOO1 EROPT
AL3(1» CNTRL
F«0« PRECL
A(i) E08
CONVERT
CMVT
A-8
-------
APPENDIX B
SOURCE LISTING OF CONVERSION PROGRAM
LEVEL 21 MAIN j DATE « 73242 18/09/15
C ILGE3* ILLINOIS GEOGRAPHIC CODE. _ _ • MAIM
"C ILPLUT= ILLINOI S PHLLGUTANT Cf)DE. r MAIM
c ILSITE= ILLINOIS SITE cong. M«TM
~C"5TArJ
C b<
CJMMON/lfJ/ INPuTfnuT,OIAG, OPTION MA T\|
_ C3MMQN/HEAU/ ILG^Otl LPLUT , I LSI TF ,ST ARS I t AGPPOJ , INT , DAT gy MATM
I STKTHK,PPAM",MPTH,UNIT ,bPLnc,SINn,PPMIND, ERR A'TM
_
UP TION=i MA TM
CALL REC3 Mfl T\J
CALL_ (
-------
1 LEVEL
i
! c
c
c
c
c
5
10
20
21
22
23
24
28
29
21 REC3 DATE • 73242
SUBROUTINE REC3 . . '
24 HOUR SAMPLE.
IMPLICIT INTEGER; CA-Z) i
L3GICAL ERR
COMMON/10/ I NPUT, OUT ,DIAG, OPTION
COMMON/HEAD/ I LGEO, I LPLUT, I LSI TE , STARS 1 1 AGPROJ t INT , DAT E»
I STRTHR»PPAM,METH,UNIT|DPLOC,SIND,PRMIND,ERR
DIMENSION LPRMC4) ,LMETH(4)j,LUNIT<4),LDP<4) ,VAL(*I
DIMENSION OATA(fi) ,PLINO(8)
DATA NITEMS/8/
NITEMS MUST. AGREE WITH DIMENSION OF POLUT, DATA, PL INO
DATA. PLIN3/ 1 ,0 ,3,2 ,4*0/
PLIND GIVES THE .INDEX OF THE POLLUTANT IN THE LIST IN
THE MUO SUBROUTINE. ,
P3LLUTANTS IN ORDER ARE PART,H2S »COH,S02,ORG,PH, PB, F
IMT«7 1
ILPLUT=0 !
ASSIGN 23 TO N01
ASSIGN 39 TO N02 ;
ASSIGN 10 TO N03
IF(OPTION.EQ.O) GO TO 10
ASSIGN 21 TO N01
ASSIGN 35 TO NQ2 !
ASSIGN 45 TO NG3
M*1TE(D!AG,5)
FORMAT(» RECORD TYPE 3.»)
CDNTINUE . :
READUNPUT,20,END=50) I LGEO, I LSI TE , DAT E, OAT A
FDRMAT(I6,2X,I2,I6,33I4)
G3 TO NG1,(21,23)
CDNTINUE
W*ITE(C)IAG,22) I L3E 0,1 LSI TE ,DAT-E ,DATA
FDRMAT(10X,I6,I5,<)I10)
CDNTINUE
CALL HEADER
IF (. NOT. ERR) GO TP 28
WUTE(DIAG,24) I LGE 0,1 LPLUT, USI T? , OAT F, OAT A
F3RMATC 3« ,110,215 ,110, 10X,8IIO/(5X, 12110) )
GD TO 10
CDNTINUE
J=0
03 40 1=1, NI TEMS
IF«DATA(I).EQ.99g9) GD TO 40
J=J+1
PSMIND=PLIND(I)
IF (PRMIND.GT.O) GO TO 31
ttt ITE(DIAG,29) I
FDRHATC* POLLUTANT* ,13,* NOT CODED FOR.*)
i
_ . -
B-2
i
t*9w ' ^9 rI5 •/' '~*.i-
L "' REC3' '
RECS
11 llcl
• wl-
'EC3
REC3
: Ull
i ," , . ,.,
>FC3
»FC3
! JFC? !
JF"
Jcca
: .;^3
"el
'FC3 .
"FC3
2e"
' CC3
^cr3
"c3
'^C3
llcl
1 1 5I?"
i 'EC3
; "»FC3
,
-------
'.'''• ' : ".' ' ' 1
LEVEL 21 REC3 DATE « 73242
GD T3 10
31 CONTINUE
CALL HUD '•
18/09/15
*£C3
R5C3
IF (ERR) GO TO 10 *EC3
VAL(JJ«OATA(I) »F.C3
LPRM(J)*PRAM
LKETHtI9tA3tIitI6fl2t4(!5.f2I2tIlt I4M
REC3
»FC3
REC3
RFC3
RFC 3
GD TO N02,C35,39J < **C3
35 CDNTINUE ^CC3
W* ITE(DIASt37) STARSI ,AGPROJflNT,OATEtSTftTHR,(LPRM(J), P?T3
1 LMETH(J) ,LUNIT(J) ,LOP(J) ,VAL(J),J»1,4) »PC3
37 FDRMAT(5X,«2«,I9,A3,I1 ,16,12,4(15,212,11,14)1
39 CDNTINUE
J=0
40 CDNTINUE
IF(J.GT.O) rtRITE (DUT,33) STARSI , AGPROJ, INT , DAT E,ST RTHR,
1 (LPRM(I) ,LMEH(I ) , LUNIT(I) ,LDP( I) , * ALC I) , 1= 1, J J
GD TO N03,(10,45)
45 CDNTINUE
IFU.GT.O) WRI TE (DIAG,37) STARSI ,AGPROJ , INT , DATE, STRTHR,
1 (LPKM(I ) ,LMETH(I)f LUNIT(I) ,LDP( I ) ,«/ AL( I), 1 = 1, J I
GD TO 10
50 CDNTINUE
EXO FILE OUT
RETURN
»FC3
Mil
"^3
"FC3
5EC3.
'FC3
?FC3
PFC3
REC3
EMD
B-3 -
-------
LEVEL
21
REC2
DAT€
•
73242
' 'IB/109/15
SUBROUTINE REC2 • REC2
HOURLY DATA. 'RFC2
IMPLICIT INTEGER (A-Z) REC2
LOGICAL ERR '• "
C3MMON/IO/ INPUTtOUT,D!A6,OPTION ' ' '>;...
COMMON/HEAD/ ILGEO,1LPLUT,I LSITE,STARS I»AGPROJ,INT tOAT E, " REC2
1 STRTHR ,PRAM,METH,UNIT,DPLOCtSINDfPRMlND, ERR
DI MEN SUN DATA(24) •
DATA HOUR12/12/ RF.C2
ASSIGN 10 TO N02
IFUPTION.EQ.O) GO TO 1 0
ASSIGN 35 TO N02
5
10
20
C
24
28
M*ITE (DIAGtS)
FORMAT( '1RECORD TYPE 2.M
CONTINUE
READ (INPUT, 20, ENO-40) I LGE 0,1 LPLUT , I LS ITE, DATE, DAT A
F3RMAT(I6,2I2,I6,47(2X,I4))
CALL HEADER.
GET SAROAO CODE FOR POLLOUTANT.
CALL PLUTNT
IF (.NOT.ERRj GO TO 28
miTE
-------
LEVEL 21 REC1 DATF. » 73242 18/09/15
1
j.c .
5
10
C
20
C
24
28
30
35
30
37
40
SUBROUTINE REC1
2 HOUR SAMPLES.
IMPLICIT INTEGER (A-2)
LOGICAL ERR
COMMON/10/ INPUT, OUT ,01 AG, OPTION
C3MrtON/HEAD/ I LGFO ,1 LPLUT, I LSI TE , STARS I , AGP«OJ , INT, DAT E,
1 STRTHR,PRAM,METH,UNmDPLOC,SINn,PR"1IND, ERR
DIMENSION DATAU2)
ASSIGN 10 TO N02
IF(OPTION.EU.O) GO TO 10
ASSIGN 35 TO N02
rt*ITE (&IAG,5)
F3RMAT( «1RECORO TYPE I.1)
C3NTINUE
RfcADl INPUT, 20, tND»40) I LGE 0,1 LPLUT , I LS I TE, DATE, DAT A
PICK UP THE EVEN VALUES OF DATA.
F3ftMATU6,2t2,l6,23(6x,I4M
CALL HEADER
GET SAR3AD CODE POR POLLUTANT.
CALL PLUTNT
IF (.NOT.EKR) GO TO 28
**ITEOIAG,24) I LSE 0, 1 LPLUT, I LSI TE, DATE, DAT A
F3RMATC l« ,110, 215, 110, 10X ,8 I10/(5X, 121101 )
G3 TO 10
CDNTINUc
m ITE(3UJ,30) STARSI ,AGPROJ ,1 NT, DATE ,ST RTHR, PRAM, M ETH,
1 UNI T,DPLCC , DATA
F3RMAT( «1( ,19, A3, 11 ,16,12,15,212,11,1214)
G3 TO NG2,(10,35)
C3NT1NUE
W^ ITE(JIAG,36) IL3P.O, I LPLUT, ILSlTE»DATE"t DATA
F3RMAT(1 OX, I 10,215,1317)
WR ITE(OIAG,37) STARST , AGPROJ,! NT ,OATE,ST RTH«, PRAM, METH,
1 UNI T,DPLOC ,DATA
FJKMAT(5X,«1« fI9.t A 3,11 ,16 , 1 2 ,15 ,2 12 , 11 ,1214 1
G3 TO 10
C3NTINUE
END FILE GUT
RE TURN
E>JD
REC1
«Ef 1
RPC1
3"l
"pr}
'PCI
9 PC I
REC1
RPC1
* EC 1
JFCI
»EC1
'PCI
RFCl
»PCl
Jpri
OPC1
9PC1
?pr{
"Ft. i
'PCI
"PCI
'PCI
'PC!
'PCI
B-5
-------
LEVEL 21 REC5 DATE • 73242 18/09/15
SUBROUTINE REC5 »EC5'
"C"METEOROLOGICAL DATA. REC5
IMPLICIT INTEGER (A-ZI RCC5 "
LOGICAL ERR
COMMON/10/ INPUT,DUT,DIAG,OPTION HF.C5
C3MMON/HEAD/ ILGEO,! LPLUT, I LSI TE ,STARS I, AGPROJ f INT ,"OAT Et
1 STRTHR,PRAM,METH,UNIT,DPLCC,SINO,l»RMINDf ERR
DIMENSION DIR(24) ,SPEED(24)
DATA HOUR12/12/ RFC5
INT=1 R«=C5
ILPLUT=0 R*C5
ASSIGN 80 TO NQ1 RFC5
ASSIGN 10 TO N02 "»FC5
IF (OPTION. EQ.O) GO TO 10
ASSIGN bO TO N01
PEC 5
ASSIGN 90 TO N02
ITE(DIAG,5) RFC5
5
10
FDRMAT( •
CDNTINUE
1RECORD
TYPE
5.
•)
»FC5
RFC5
READ(lNPUT,2C,ENn = 100) I LGEO,I LSTTE,DAT F, ( 01 R( I) ,S PEEO( I), I»l, 24) RFC 5
20 FDRMAT(I6,2X,I2,I6,24( 14 ,1 2J )
CALL HEADER
IF(.NOT.ERR) GO TO 28
24
28
C
,
30
40
50
6J
70
80
»rt ITE(DIAG,24) I L3F 0, 1 LPLUT , I LSI TF ,DAT F, (OIR( 1), SPEED! I), 1 = 1, 24)
FDRMAT( • 5« ,110,215 ,110, 10X,1 61 5/(5X, 24 15))
GO TO 10
CDNTINUE
WIND DIRECTION.
P*MIND=5
CALL MUD
DD 30 1=1,24
IF (OIR( I ).Eil.999) DIP(I)=0,
IF (DIRU J.E0.5DD) DIP(T).=9999
CDNTINUE
*\ ITE(OUT,40) STAPSI , AGPROJ , I NT, OATF, STRTHR, PRAM, M ETH,
1 UNIT,DPLOC ,(DIR(I) ,1=1,12) , STARS I , AGPROJ, INT, DAT E, HO JR 12,
2 PRAM,METH,UNIT,DPLOC, (DI P( I) , I* 13, 24)
C"JDMAT/(t|< Jo A^ T1 TA T7 15 212 11 12T4))
GO TO NO 1,1 5 0,80)
CDNTINUE
«\ ITE(OIAti,60) ILSECM LSI TE .DATE , (DI R( I),SPEFD{ I ), 1=1, 241
FDKMAT(10X,I6,2X,I2,TS,12(I4,I2)/28X,12(I4, 12) )
«(RITE(DIAG,70) STAR SI , AGPROJ, I NT , OAT E, STRTHR, PRAM, METH,
1 ONI T, DP LOG ,(DIR( I) ,1 = 1,12) ,STAR<; I , AGPROJ, INT, DATE, HOUR 12,
2 PRAM,METH,UNIT,DPLOC,(DI«( I), I = 13, 24)
CDNTINUE
RFC 5
9FC5
»FC5
RFC 5
RFC5
llcl
PEC 5
RFC5
5cC5
»FC5
RFC5
p p** c
"FC5
PFC5
RFC 5
RPC5
RFC5
RFC5
RFC5
R«=C5
PROCESS SPEED. PARAMETERS. RFC5
B-6
-------
i LEVEL 21 REC5 DATE* 73242 18/09/15
PR MI NO «4 ' . . ' RFC 5
CALL MUD QFC5
•ft ITE(OUT,40) STARSI ,AGPROJ ,1 NT, DATE,STRTHR, PRAM, METH, UNIT, RFC5
1 DPLOC,(
2 PRAM, ME
SPEEDd ) ,I«1 ,12) , STARSI
TH,UNIT,DPLOC,(SPEEDU)
, AGPROJ, INT, DATE, HOUR 12,
,1*13,24)
GO TO N02,(10,90)
90 CDNTINUE
« ITE(DIAG,7U)
1 OPLOC,(
2 PRAM, ME
GD TO 10
STARSI ,AGPRDJ,I NT, DATE,
SPFEDd ),! = !, 12) , STARSI
TH,UNIT,DPLOC,(SPEED(I)
STRTHR, PRAM, METH, UN IT,
, AGPROJ, INT, DAT E, HOUR 12,
,1=13,24)
RFC5
»FC5
RFC5
REC5
RFC 5
'lees
100 CDNTINUE RFC 5
END FILE OUT
RE TURN RFC5
END
B-7
-------
» LEVEL 2
1 . HEADER DATE
» 73242 18/09/15
SUBROUTINE HEADER
IMPLICIT INTEGER (A-Z)
LOGICAL ERR
COMMON/10/ INPUT, nUT,DIAG, OPTION
C3MMON/HEAD/ I LGFfl ,1 LPLUT, I LSI TF .STARS I , AGPROJ , INT , DAT E,
1
01
C LI
E8
STRTHR,PRAM,METH,UNIT,DPLOC,SIND,PRMIND, ERR
MENSION LCTABL (2, 163) ,AGNPRJ( 163) ,L1 (2,5*) ,L2( 2, 54), L3( 2, 2)
, L2, L3 ARE DUMMY ARRAYS USED TO INITIALIZE LCTABL.
UI VALENCE
-------
r LEVEL 21
HEADER
DATE * 73242
18/09/15
04TA L2/09904550,143760005, 09032331,142133302*09302333,142100003,HFQ?
L09006001,146060002, 01001001,141143001, 05702001,140480001*HFOT
i 00106502,146440002, 09002003,142100003, 00106503,146440001* HFD*
^ M* ^ r «* ^ ^ w TT ^ ^ w v * ~ •/ • W W\* W^ T V ' W »*•»»• T » • to » w «* ^ w^ T * »» w •• v ^ «» T • ^» fc • «» *r
I 09006001,146060002, 01001001,141143001, 05702001,140480001*
2 00106502,146440002, 09002003,142100003, 00106503,146440003*
3 05801501,141740004, 05801503,141740003, 358*01534, 141740002*
4 06502001,146170001, 08412050,147280003, 01403001*140880001,
5 06001002,140160004, 06002501,14218*0002,'0600400 1,142960006*.
6 06004003,142960005, 06004005,142963007, 36004336,142960008,
T 060040U7,14^960009,
8 06004010,14 ,_
~9 06042801,141500002,
1 08204501,142120002,
2 064.01506,145060004,
3 01604501,141240001,
06004008
06001501
06700501
08204550
06011561
,142960010,
,147763002,
*UT*>Z900£*
,142120009,
,148521)007*7
00603004,140583 ,
142960011,
148520007,
36004009,
36311503,
38231031,
03901501,
06011503,
30603005,140683
140320001,
140840001,
148520007,
HEP*
HF.D*
20 F3RMAT(( SI T£ NOT LOCATED.*)
= .TKUE.
Rb
30 CONTINUE
!iTARSI=LCTABL(2,SIND>
AGPROJ=AGNPRJ(SIND)
=. FALSE.
RtTURN
END
HFn?
B-d
-------
G LEVEL 21
PLUTNT
DATE » 73242
18/09/15
SUBROUTINE PLCTNT
PLUT
c
c
c
c
c
c
c
c
c
c
c
c
10
20
30
C
c
4J
C
PLUTNT FINOS THE SAROAD COOP FOR A GIVEN ILPLUT. THEN IN THE
MUD SECTION, IT DETERMINES THE METHOD, UNITS, AND DECIMAL PLACE.
IMPLICIT INTEGER (A-Z)
LOGICAL ERR
COMMON/10/ INPUT,OUT,DIAG, OPTION
CDMMON /HEAD/ I LGEO ,1 LPLUT, I LSI TE , STARS I , AGPROJ , INT , DAT E,
i STRTHR, PRAM, METH ,UNIT ,DPLCC,S I NO, PRMIND, ERR
DIMENSION M( 163, 7) ,U(163 ,7) ,0(163,7) , PLTABL (2, 7)
M •» METHOD, U = UNITS, D * DECIMAL PLACE.
1ST DIMENSION OF M,U, AND D MUST = NO. OF SITES. 2ND DIMENSION
= NO. OF POLLUTANTS.
POLLUTANT ORDER IS PART, S02 ,COH ,WS ,WD, CARBON MONOXIDE, AND TOX .
DIMENSION CHNGES (5, 1)
CHNGES IS AN ARRAY FOR SITES WHICH CHANGE FHFIR dAYS. 2ND
DIMENSION = NO. OP CHANGES 1ST DIMENSION CONTAINS METHOD, UNITS,
DP, DATE, AND A POINTER TO THP NEXT CHANGE FOR THAT SITE AND
POLLUTANT CODE IP THERE IS ONE.
DATA NPOLS, NCHNGS/ 7,0/
NPOLS MUST = DIMENSION OF PLTABL. NCHNGS = DIMENSION DP CHNGES.
DATA M/163*9i, 4*11,91,2*13,12*91,3*13,8*91,3*11,48*91,16*11,
i 5*91,4*13,41*11,4*13,2*11,4*13,6*11,
2 163*81, 489*11 ,163*14/
DATA U/ 163*1, 163*7, 163*9, 163*12, 163*1*, 163*7, 163*7/
DATA D/ 163*0, 163*3, 163*2, 163*0, 1S3*0, 163*2, 163*3/
DATA PLTABL/ 42,11101, 32,42401, 10,11201, 81,61101,
1 82,61102, 50,42101, 53,44101/
FIND SAROAD CUD1: FOR ILPLUT.
D3 10 PRMIND=1,NPOLS
IFULPLUT.EU.PLTABLd ,PRMIND») GO TO 30
CDNTINUE
W* ITE(DIAG,20) ILPLUT
FDRMAT(« POLLUTANT COOE',I3,« NOT FOUND.' »
RETURN
CDNTINUE
IF(bRK) RETURN
NO* COMr S THE DIRTY WORK.
ENTRY MUD'
METH=M( SIND, PRMIND)
CHECK FOR METHOD CHANSF.
IF(METH.GT.O) GO TO 80
PT=-METH
CDNTINUE
IF (DATE.LT.CHNGES(4,PT) ) 50 TQ 70
METHOD HAS CHANGED AGAIN.
PT=€HNGES(5,PT)
PLUT
PLUT ' i
PLUT
PLUT
PLUT
«>l UT
PLUT !
PLUT
PLUT
PLUT
PLUT
PLUT
PLUT
Pt UT
PLUT i
PLUT '
[PLUT ;
PI UT
°LUT j
PLUT ;
PLUT
PLUT
PLUT
P| UT
PLUT
PLUt
PLUT
|PLU'T
iPLUT
PL UT
PLUT
PLUT
PLUT
of UT
PLUT
PLUT
PLUT
PTTJT
PLUT
PL UT
PLUT
PLUT
PLUT
PLUT
PLUT
PLUT
B-10
-------
,G LEVEL 21
PLUTNT
DATE » 73242
18/09/15
IF(PT.LT.NCHNGS) 30 TO 40
PLUT
W* ITE (OIAGtSO)
50 F3RMAT(« METHOD CHANGF ERROP. POINTER EXCEEOS NO. OF CHANGES,')
E
-------
APPENDIX C
JCL REQUIREMENTS
The following JCL statements applied when programs PREPROCESSOR and
CONVERSION were compiled and executed for the test sample case. Since JCL
1s strongly dependent on both machine and facility, all necessary changes
should be exercised where appropriate by consultation with the systems
people at any new facility.
C-l. ASSEMBLE-AND-GO FOR THE PREPROCESSOR PROGRAM
JCL statements used 1n the test case are given below:
// Job Card
// EXEC ASMFC6
//ASM.SYSIN DD *
[Source Deck]
//G0.READ DD DSN=ILLIN0IS,UNIT=2400,
// V0L=SER=PH4875
//G0.WRITE1 DD DSN=ILLF3,UNIT=2400,
// V0L=SER=PH3022,LABEL=(3,SL),
// DCB=(BLKSIZE=3000,DEN=2)
//G0.WRITE2 DD DSN=ILLF2,UNIT=2400,
// V0L=REF=*.WRITE1,LABEL=(2,SL),
// DCB=(BLKSIZE=3000,DEN=2)
//G0.WRITES DD DSN=ILLF1,UNIT=2400,
// V0L=*EF**.WRITE1,LABEL" (l.SL),
// DCB=(BLKSIZE=3000,DEN=2)
//G0.WRITE4 DD DSN=ILLF4,UNIT=2400,
// V0L=REF=*.WRITE1,LABEL=(4,SL),
// DCB=(BLKSIZE=3000,DEN=2)
/*
C-l
-------
C-2. COMPILE-AND-GO FOR THE CONVERSION PROGRAM
The following JCL statements are used:
// Job Card
// EXEC F0RTGCG
//F0RT.SYSIN DD *
[Source Deck]
//G0.FT10F001 DD DSN=ILLF1,UNIT=2400,
// V0L=SER=PH3022
//G0.FT10F002 DD DSN=ILLF2,UNIT=2400,
// V0L=REF=*.FT10F001,LABEL=(2,SL)
//G0.FT10F003 DD DSN=ILLF3,UNIT*2400,
// V0L=REF=*.FT10F001,LABEL=(3,SL)
//G0.FT10F004 DD DSN=ILLF4,UNIT=2400,
// V0L=REF=*.FT10F001,LABEL=(4,SL)
//GJ5.FT20F001 DD UNIT=2400,V0L=SER=PH1618,
// LABEL=(1 ,NL),DCB=(LRECL=80,DEN=2,BLKSIZE=3200)
//G0.FT20F002 DD UNIT=2400,V0L=REF=*.FT20F001,
// LABEL=(2,NL),DCB=(LRECL=80,DEN=2,BLKSIZE=3200)
//G0.FT20F003 DD UNIT=2400,V0L=REF=*.FT20F001,
// LABEL=(3,NL),DCB=(LRECL=80,DEN=2,BLKSIZE=3200)
//G0.FT20F004 DD UNIT=2400,V0L=REF=*.FT20F001,
// LABEL=(4,NL),DCB=(LRECL=80,DEN=2,BLKSIZE=3200)
/*
The program reads the preprocessed tape on unit 10, hence FT10FOOX.
Unit 20 describes the output tape files, hence FT20FOOX. It is imperative
that consistency in the JCL between the CONVERSION'S FT10FOOX and the PRE-
PROCESSOR'S WRITEX be maintained, since they refer to one and the same set
of files.
C-2
-------
APPENDIX D
PROGRAM ADDITIONS AND MODIFICATIONS
In keeping with the need to have the program flexible enough to ac-
commodate minor revisions 1n format and/or additional data Items, this ap-
pendix describes the changes necessary to effect some of the anticipated
revisions. The changes include site addition, pollutant addition, coding
a new pollutant in record type No. 3, and coding a change in method data.
Generally, only three subroutines in CONVERSION are affected. These
are REC3, HEADER and PLUTNT. The PREPROCESSOR 1s not affected.
D-l. SITE ADDITIONS
There are two arrays in subroutine HEADER that need to be expanded.
The first is LCTABL which is a 2XNSITES array where NSITES is the total
number of sites. It contains the Illinois geographic and site codes for
all of the sites and the corresponding SAROAD codes for state, area, and
site. These values are paired as follows:
1st value = 100* (Illinois geographic code) + Illinois site
code
2nd value = the corresponding nine digit SAROAD code for
state, area, and site.
To add sites, change the dimensions of LCTABL so that the second di-
mension agrees with the new number of sites. In addition, the dimension of
a dummy variable L3, which is equivalent to the last part of the LCTABL
array, must be increased by the number of new sites (see example). The new
pairs of numbers (Illinois codes and SAROAD codes) should then be placed at
the end of the DATA statement for LCTABL.
AGNPROJ is an array containing the agency/project information. Its
dimension must also equal NSITES. New site information should go on at the
end of the DATA statement for AGNPROJ in the position corresponding to the
site position in LCTABL.
D-l
-------
The value of NSITES 1n subroutine HEADER must agree with the new num-
ber of sites. i
For site additions, three variables 1n subroutine PLUTNT are affected.
These are arrays M, U, and D, and stand for method, units, and decimal place,
respectively. Each of these arrays 1s an NSITESXNPOLS dlmensionsal array
where NSITES is again the number of sites and NPOLS 1s the number of pollu-
tants.
In each array, all (i.e., the total #) of sites vs the first pollutant
are listed, then all of the sites again vs the second pollutant, and so on,
until all of the pollutants are exhausted. For example, with four sites
and two pollutants, the data for methods would be listed in the order
M(l,l), M(2,l), M(3,l), M(4,l), M(l,2), M(292), M(3,2), M(4,2), and sim-
ilarly for the arrays U and D. Adding a site means adding 3*NPOLS pieces
of data, one at the end of each pollutant section in each of the method,
un.its, and decimal point variables.
To add a site, the first dimension of each array must be changed to
agree with the new number of sites. Next, since there are NPOLS columns,
data must be added to each column for each new site. In the DATA statement
for these arrays, each pollutant column is separated by a space from ad-
jacent columns. The ordering of the pollutant species is as follows:
particulates, S02, COH, WS, WD, CO, TOX.
As an example, suppose we wish to add a new site with characteristics
as listed in Table D-l. In HEADER, the relevant changes are listed below:
Old Card New Card
DIMENSION LCTABL(2,162), DIMENSION LCTABL(2,163),
AGNPROJ(2,162_), L3(2,T) AGNPROJ(2,163_), L3(2,F)
DATA NSITES/162/ DATA NSITES/163/
DATA L3/05801505, 141740005/ DATA L3/05801505, 14740005, 00206507,
146080024/
D-2
-------
TABLE D-l
SAMPLE CODES OF NEW SITE TO BE INCLUDED
Geo. Code
072065
I EPA
Site
07
Format
Location
Peoria
Pollutant
COH
SO,
Site Code
Prefix 4
6080 024
Agency/
Project
F 01
SAROAD
Paramel
11201
42401
Format
81
11
Units
09
07
Decimal
Point
2
3
co
-------
Old Card
New Card
DATA AGNPROJ/
continuation cards
'G01',3*'F017
DATA AGNPROJ/
l\
\} continuation cards
** i
4^
5 'J05',5*'F01',4*'G01','FOT,'GO!',
4*'F017
In the subroutine PLUTNT, the relevant changes are:
Old Card
DIMENSION M(162,7), U(162.,7),
New Card
DIMENSION M(163_,7), U(163_,7),
D(163_,7)
DATA M/l63*91,4*11,91,2*13,12*91,
3*13,8*91,3*11,48*91,16*11,5*91,
4*13,41*11,4*13,2*11,4*13,6*11,
163*81,489*11,163*14/
DATA U/163*l,163*7,163*9,163*12,
163*14,163*7,163*7/
DATA 0/163*0,163*3,163*2,163*0,
DATA M/l 62*91 ,4*1 1 ,91 ,2*1 3,1 2*91 ,
3*1 3,8*91 ,3*1 1 ,48*91 ,16*11 ,5*91 ,
4*1 3 ,41 *1 1 ,4*1 3 ,2*1 1 ,4*1 3 ,5*1 1 ,
162*81 ,486*1 1,1 62*1 4/
DATA U/162*l, 162*7, 162*9,162*12,
162*14,16j[*7,16j[*7/ ~~
DATA 0/162*0,162*3,162*2,162*0,
162*0,1 62*2, 162.*~3/
Notice that although the added site only samples two pollutants, place-
holding codes for the other pollutants must be added so that future data
Hems will be aligned properly.
D-2. POLLUTANT ADDITIONS
For pollutant additions, subroutine PLUTNT is affected. First, the
variable NPOLS, which stands for the number of pollutants, must be changed
to agree with the new number. The arrays, M, U, and D, which were described
in the previous section, must have their second dimension changed to equal
NPOLS. Next, a new column of data containing NSITES pieces of information
corresponding to each added pollutant must be added to each of the arrays
M, U, and D.
PLTABL is an array dimensioned 2XNPOLS, and contains first an Illinois
pollutant code, and then a corresponding SAROAD pollutant code in pairs.
D-4
-------
Its second dimension must equal NPOLS. The additional pairs (of Illinois
and SAROAD codes) must go to the end of the DATA statement for PLTABL.
As an example, suppose there currently exist six pollutants, and a
seventh, TOX, is to be incorporated. The following Information 1s ex-
tracted from the SAROAD manual [4]:
Illinois Pollutant Code = 53
SAROAD parameter code = 44101
Method code =14
Units code = 7
Decimal places for all sites meaning TOX - 3
The necessary changes in PLUTNT are:
Old Card New Card
DIMENSION M(163,6),U(163,6),0(163,6), DIMENSION M(163,7),U(163,7),U(163,7),
PLTABL (2,6_) ."" ~ ~ PLTABL (2,7.)
DATA NPOLS, NCHNGS/6_,0/ DATA NPOLS,NCHNGS/,7,0/
DATA M/163*91...... ,489*11/ DATA M/163*91 489*11,163*14/
DATA U/163*!,....,163*7/ DATA U/l63*1 163*7,163*77
DATA 0/163*0......163*2/ DATA 0/163*0,.....163*2.163*3/
DATA PLTABL/42,11101,32,42401, DATA PLTABL/42,11101,32,42401,50,
50,42101/ 42101.53,44101/
Even though all sites do not measure TOX, dummy values must be placed
in the seventh column for proper data alignment.
D-3. CODING A POLLUTANT IN RECORD TYPE 3
Subroutines REC3 and PLUTNT are affected.
Record type 3 can contain several pollutants on a single record. There
are no pollutant codes given because the location of data in the record de-
termines which pollutant 1s associated with it. The subroutine PLUTNT de-
termines the correct SAROAD codes for the pollutant, method, and decimal
place. However, some of the pollutants possible in record 3 have not been
D-5
-------
coded Into the tables in PLUTNT because there was no Information available
on them and they were not expected to appear on any Input tapes. Should
one appear without additional coding, the program will write an error mes-
sage. To code for this previously unused pollutant, the subroutine PLUTNT
must be changed as described In the last section. In addition, the array
PLIND 1n SUBROUTINE REC3 must be modified. PLIND gives the Index of a rec-
ord type 3 pollutant in the 11st 1n PLUTNT. This eliminates the requirement
of PLUTNT locating the pollutant 1n Its tables. If one of the pollutants 1n
record 3 is added to the arrays 1n PLUTNT, then the corresponding item in
PLIND should be changed to Identify the pollutant index.
D-4. CODING A CHANGE IN METHOD
Subroutine PLUTNT must be modified to accommodate a change in methods
code.
CHNGES is a 5XNCHNGS array which contains method change information.
NCHNGS equals the second dimension of CHNGES. The first dimension contains
(1) method, (2) units, (3) decimal point, (4) date of change to new method
(set to 999999 if this is the last change for this site and pollutant), and
(5) a pointer to the next change for the particular site and pollutant if
there is one. The second dimension initially had a dummy value of one.
To code a change in method, the dimension of CHNGES must be increased
to accommodate the change. If this is the first change for this si-te-
pollutant combination, then two columns must be provided for in CHNGES.
The first column will contain five pieces of information: (1) the first
method, (2) the first units, (3) the first decimal place locater, (4) the
date of change to the new method, and (5) the index of the column in
CHNGES which provides the second method, units, and decimal place informa-
tion. The fourth element of this second column should be set to 999999 so
that there will be no doubt that this is the final change. The program
will compare this number with the date of the sample to see if the sample
was taken after this change date. The second column's fifth element, the
pointer to the further changes, can be set to anything, but to insure
proper correspondence of data values, ought to be set to a finite value.
D-6
-------
The array M will Indicate that a change 1n method has occurred. In-
stead of the method code for the site-pollutant 1n question, the negative
of the Index of the column 1n the CHNGES array should be present.
If this 1s not the first change for this site-pollutant, Increase the
dimension of CHNGES by one. Put the date of change Into CHNGES(4,I) where
l_ 1s the Index of what previously had been the last change for that site-
pollutant. In CHNGES(5,1), which 1s the pointer value, put the Index of
CHNGES which pinpoints the final change. Then at the column of CHNGES
pointed to by this Index (which should equal the dimension of CHNGES unless
more than one site-pollutant combination 1s being changed) place the values
for method, units, and decimal place. Also, put in 999999 for the date and
anything for the pointer. To insure proper allocation of data within the
array, all elements in the array should be properly accounted.
As an example of coding a change in method, suppose that site 01 in
DePue (006030,140680001) changed its method for measuring particulates from
91 to 77 on January 1, 1973 and that this is the first change ever to be
coded. Then the set of old and new DATA statements will appear as follows:
Old Statement New Statement
DATA NCHNGS/0_ DATA NCHNGS/2/
DATA M/163*91 DATA M/99*91 ,£[,,63*91
DIMENSION CHNGES(5,1).... DIMENSION CHNGES(5,2)....
DATA CHNGES/91,1,0,730101,2,77,1,
0.999999.0/
NCHNGS must now agree with the dimension of CHNGES. The -1 at the
100th place in the array M 1s the negative of the pointer to the first
method. It points to the first column of CHNGES. The DATA statement for
CHNGES gives the methods, units, decimal places, dates, and pointers to ad-
ditional changes for that site and pollutant code. The value 2 at
CHNGES(5,1) 1s the pointer to the new method, units and decimal place which
goes in the second column of CHNGES. CHNGES(4,2) gives the date of a fur-
ther change. Since there 1s no additional change, the date = 999999. The
second pointer is set to 0_, but is not used. Later, on March 1, 1973, site
D-7
-------
No. 8 at Argo High School (016006,141540001) change their method for S02
from 91 to 13:
Old Statement
DATA NCHNGS/2/
DATA M/99*91,-1,63*91,4*11,91,
2*13 ~~
DIMENSION CHNGES(5,2_)
DATA CHNGES/91,1,0,730101,2,77,1,
0.999999.0/
New Statement
DATA NCHNGS/4/
DATA M/99*91,-1,63*91,4*11,^3,
2*13
ff I W $ * • • •
DIMENSION CHNGES(5,4J
DATA CHNGES/91,1,0,730101,2,77,1,
0,999999,0,91,7.3,730301,4,13,7,
3,999999,0/
Again, NCHNGS agrees with the dimension of CHNGES, the second column (the
S02 column) of M_ has a negative number to point to the third column in
CHNGES where the Information is stored. The third column points to the
fourth column for information following March 1, 1973. The array CHNGES
1s completely filled even though the last pointer 1s not used.
Finally, suppose DePue site No. 1 changes Its particulate sampling
method again from 77 to 11 on July 4, 1973. The coding 1s as follows:
Old Statement
DATA NCHNGS/4/
DIMENSION CHNGES(5,4_)
DATA CHNGES/91,1,0,730101,2,77,1,
0.999999.0.91.7,3.730301,4,13.7.
3,999999,O/
New Statement
DATA NCHNGS/5/
DIMENSION CHNGES(5,5_)
DATA CHNGES/91,1,0,730101,2,77,1.
0.730704.5,91,7,3,730301,4,13,7,3,
999999,0,Tl ,1,0,999999,0/
NCHNGS is now five (5) since only one additional column was needed.
Since this same site-pollutant combination had already changed its method
once, the M, array needed no further change. CHNGES(4,2) had to be changed
to the correct date (730704) and CHNGES(5,2) now points to the fifth column
where the final data 1s placed.
Each pollutant-site combination 1s different so if the same site
changes two different pollutant sampling methods, these have to appear
separately and independently 1n CHNGES.
0-8
-------
APPENDIX E
OPTIONAL OUTPUT FROM CONVERSION PROGRAM
In addition to the tape output, the CONVERSION program will provide
output showing first an unconverted Illinois record and then the same rec-
ord in SAROAD format. This 1s written to the diagnostic output file.
The MAIN routine controls this option through a variable called
OPTION. If it is set to 0, no record-by-record account 1s placed 1n the
diagnostic file and only unprocessable records appear there. If OPTION
is set equal to anything but 0, the additional output 1s written. The
variable DIAG in the MAIN routine specifies the unit number for the de-
vice where the optional output and the other diagnostic messages will be
printed.
Samples of these printed output for record types 3, 2, 1, and 5 are
illustrated in Table 4-4.
E-l
-------
TECHNICAL REPORT DATA
(Please read Instructions on the reverse before completing}
1. REPORT NO.
EPA-4SO/3-74-019
3. RECIPIENT'S ACCESSIOI*NO.
4. TITLE AND SUBTITLE
Computer Programs For The Conversion Of Illinois State
Air Quality Data To The Saroad Format
S. REPORT DATE
December 1973
6. PERFORMING ORGANIZATION CODE
7. AUTHOR(S)
Paul Swartz, Khee M. Chng, Dr. Richard D. Siegel
8. PERFORMING ORGANIZATION REPORT NO.
9. PERFORMING ORG MMIZATION NAME AND ADDRESS
Walden Research Corporation
359 Allston Street
Cambridge, Massachusetts 02139
10. PROGRAM ELEMENT NO.
2AE132
11. CONTRACT/GRANT NO.
68-02-0049
12. SPONSORING AGENCY NAME AND ADDRESS
Environmental Protection Agency
Research Triangle Park, North Carolina 27711
13. TYPE OF REPORT AND PERIOD COVERED
Final
14. SPONSORING AGENCY CODE
15. SUPPLEMENTARY NOTES
16. ABSTRACT
This report describes two computer programs that are used to convert State of
Illinois air quality data to the SAROAD format. The first program (the PREPROCESSOR)
preprocesses the Illinois data on tape and writes out an output tape for the main
program (the CONVERSION). The PREPROCESSOR is written in ASSEMBLY to facilitate the
"unpacking" of some of the data records which are in packed.decimal format. The
CONVERSION is written in FORTRAN IV and does all the necessary conversion to the
SAROAD format. »
17.
KEY WORDS AND DOCUMENT ANALYSIS
DESCRIPTORS
b.lDENTIFIERS/OPEN ENDED TERMS
c. COSATI Field/Group
Preprocessor
Conversion
Program
JCL
Assembly
Routine
18. DISTRIBUTION STATEMENT
Release Unlimited
19. SECURITY CLASS (ThisReport)
Unclassified
21. NO. OF PAGES
39
20. SECURITY CLASS (Thispage)
Unclassified
22. PRICE
EPA Form .2220-1 (9-73)
E-2
-------
INSTRUCTIONS
1. REPORT NUMBER
Insert the EPA report number as it appears on the cover of the publication.
2. LEAVE BLANK
3. RECIPIENTS ACCESSION NUMBER
Reserved for use by each report recipient.
4. TITLE AND SUBTITLE
Title should indicate clearly and briefly the subject coverage of the report, and be displayed prominently. Set subtitle, if used, in smaller
type or otherwise subordinate it to main title. When a report is prepared in more than one volume, repeat the primary title, add volume
: ..mber „! d include subtitle for the specific title.
5. REPORT DATE
Each report shall carry a date indicating at least month and year. Indicate the basis on which it was selected (e.g., date of issue, date of
approvcl, date of preparation, etc.).
6. PERFORMING ORGANIZATION CODE
Leave blank.
7. AUTHOR(S)
Give name(s) in conventional order (John R. Doe, J. Robert Doe, etc.). List author's affiliation if it differs from the performing organi-
zation.
8. PERFORMING ORGANIZATION REPORT NUMBER
Insert if performing organization wishes to assign this number.
9. PERFORMING ORGANIZATION NAME AND ADDRESS
Give name, street, city, state, and ZIP code. List no more than two levels of an organizational hircarchy.
10. PROGRAM ELEMENT NUMBER
Use the program element number under which the report was prepared. Subordinate numbers may be included in parentheses.
11. CONTRACT/GRANT NUMBER
Insert contract or grant number under which report was prepared.
12. SPONSORING AGENCY NAME AND ADDRESS
Include ZIP code.
13. TYPE OF REPORT AND PERIOD COVERED
Indicate interim final, etc., and if applicable, dates covered.
14. SPONSORING AGENCY CODE
Leave blank.
15. SUPPLEMENTARY NpTES
Enter information not included elsewhere but useful, such as: Prepared in cooperation with, Translation of, Presented at conference of,
To be published in, Supersedes, Supplements, etc.
16. ABSTRACT
Include a brief (200 words or less} factual summary of the most significant information contained in the report. If the report contains a
significant bibliography or literature survey, mention it here.
17. KEY WORDS AND DOCUMENT ANALYSIS
(a) DESCRIPTORS • Select from the Thesaurus of Engineering and Scientific Terms the proper authorized terms that identify the major
concept of the research and are sufficiently specific and precise to be used as index entries for cataloging.
(b) IDENTIFIERS AND OPEN-ENDED TERMS - Use identifiers for project names, code names, equipment designators, etc. Use open-
ended terms written in descriptor form for those subjects for which no descriptor exists.
(c) COSAT1 HELD GROUP - Field and group assignments are to be taken from the 1965 COSATI Subject Category List. Since the ma-
jority of documents are multidisciplinary in nature, the Primary Field/Group assignment(s) will be specific discipline, area of human
endeavor, or type of physical object. The application(s) will be cross-referenced with secondary Field/Group assignments that will follow
the primary posting(s).
18. DISTRIBUTION STATEMENT
Denote releasability to the public or limitation for reasons other than security for example "Release Unlimited." Cite any availability to
the public, with address and price.
19. &20. SECURITY CLASSIFICATION
DO NOT submit classified reports to the National Technical Information service.
21. NUMBER OF PAGES
Insert the total number of pages, including this one and unnumbered pages, but exclude distribution list, if any.
22. PRICE
Insert the price set by the National Technical Information Service or the Government Printing Office, if known.
EPA Form 2220-1 (9-73) (Reverse)
-------