p4com_main_03.21.11_log.txt

Author: Abt Associates, Inc.

Created: 1/31/2008

Updated: 3/22/2011

Purpose: This is a log file from running the SAS program which calculates commercial

fishing benefits associated with the proposed 316(b) existing facilities regulation;

1 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: Copyright (c) 2002-2008 by SAS Institute Inc., Cary, NC, USA.

NOTE: SAS (r) Proprietary Software 9.2 (TS2M0)

Licensed to ABT ASSOCIATES INC, Site 70068845.

NOTE: This session is executing on the XP_PRO platform.

NOTE: SAS initialization used:

real time 0.60 seconds

cpu time 0.24 seconds

1 *Author: Matthew LaPenta & Kathryn Sayles & Ryan Stapler, Abt Associates

Inc.;

2 *Created: 1/31/2008;

3 *Updated: 3/22/2011;

4 *Purpose: This is a log file from running the SAS program which

calculates commercial

4 ! fishing benefits associated with the proposed 316(b) existing facilities

regulation;

5

6 *!! Benefits are reported in $1,000.

7

8 *The location of the input and output files is here;

9 %let d=h; *(C or H drive);

10 %let mainloc=&d.:\ERD\TYCHE Contract\Assignments\WA 2-15 (316b

Benefits & SP Study)\Task 5

10 ! - Benefits Analytic Support\IE_032111\Com\;

11 %let inloc=&mainloc.Inputs\;

12 %let outloc=&mainloc.Outputs\;

13

14 %let ie_year_1=2017; *(define maximum year to be included in the IM

only tech, early

14 ! compliance year run);

15 %let ie_year_2=2018; *(define mininum year to be included in CT tech

run);

16

17 libname outloc "&outloc";

NOTE: Libref OUTLOC was successfully assigned as follows:

Engine: V9

Physical Name: h:\ERD\TYCHE Contract\Assignments\WA 2-15 (316b Benefits & SP

Study)\Task 5 -

Benefits Analytic Support\IE_032111\Com\Outputs

18

19 *The name of the input file is;

20 %let input=Com_Inputs_03.21.11.xls;

21 %let input2=IE_outputs_22MAR11.xls;

22 *rec_bottomline.sas7bdat;

23 *The name of the output files are;

24 %let output=P2.08 ComBenOutputs_&sysdate..xls;

25 %let tables=P2.08 ComBenTables_&sysdate..xls;

26 %let SumTables=P2.08 ComBenTablesSum_&sysdate..xls;

27 *%let printout=&outloc.Com Ben Tables &sysdate..rtf;

28 %let printout3=&outloc.Com Ben Tables &sysdate..csv;

Page 1
p4com_main_03.21.11_log.txt

29 *assumptions;

30 %let t0=2012; *(define when time zero is);

31 %let yrsc=50; *(define number of compliance years);

32

33 %let Elast_saltwater=-1.89;

34 %let Elast_shrimp=-.63;

35 %let Elast_crabs=-1.31;

36 %let ieunits=1;

2 The SAS System 12:35

Tuesday, March 22, 2011

37 %let firsttable=8;

38 %let capdefinition=reduction;

39 %macro cyr;

40 cydata.tmn1 as cyr_base,

41 cydata.tmn1 as cyr_tmn1,

42 cydata.tmn2 as cyr_tmn2,

43 cydata.tmn3 as cyr_tmn3,

44 cydata.tmn4 as cyr_tmn4

45 %mend;

46 *select option controls below;

47 %macro optionmac0(var);

48 if &var=1 then do;

49 *define abbreviated option names;

50

51 if option_name="option.tmn1" then

option="tmn1";

52 else if option_name="option.tmn2"

then option="tmn2";

53 else if option_name="option.tmn3"

then option="tmn3";

54 else if

option_name="option.tmn4" then option="tmn4";

55 end;

56 if &var=2 then do;

57 *SELECT baseline option;

58 if option_name ="option.tmn1";

59

60 end;

61

62 %mend;

63 %macro optionmac00;

64 %step5schedule(baseline,cyr_base);

65 %step5schedule(tmn1x,cyr_tmn1);

66 %step5schedule(tmn2x,cyr_tmn2);

67 %step5schedule(tmn3x,cyr_tmn3);

68 %step5schedule(tmn4x,cyr_tmn4);

69 data Step5idata;

70 length option $50.0;

71 set s8i_baseline s8i_baseline_0 s8i_tmn1x s8i_tmn1x_0 s8i_tmn2x

s8i_tmn2x_0 s8i_tmn3x

71 ! s8i_tmn3x_0 s8i_tmn4x s8i_tmn4x_0

72 ;

73 run;

74 %mend;

75 %macro optionmac11;

76 %step6schedule(baseline,cyr_base);

77 %step6schedule(tmn1x,cyr_tmn1);

78 %step6schedule(tmn2x,cyr_tmn2);

79 %step6schedule(tmn3x,cyr_tmn3);

80 %step6schedule(tmn4x,cyr_tmn4);

81 data Step5tdata;

82 length option $50.0;

Page 2
p4com_main_03.21.11_log.txt

83 set s8t_baseline s8t_baseline_0 s8t_tmn1x s8t_tmn1x_0 s8t_tmn2x

s8t_tmn2x_0 s8t_tmn3x

83 ! s8t_tmn3x_0 s8t_tmn4x s8t_tmn4x_0

84 ;

85 run;

86 %mend;

87

88 *select benfits schedule (st5) and IE data option (st4);

3 The SAS System 12:35

Tuesday, March 22, 2011

89 %macro optionmac1;

90 case

91 when st5.option="baseline" and

st4.option="baseline" then "baseline"

92 when st5.option="baseline_0" and

st4.option="baseline" then "baseline_0"

93

94

95 when st5.option="tmn1x"

and st4.option="tmn1" then "tmn1"

96 when st5.option="tmn1x_0" and

st4.option="tmn1" then "tmn1_0"

97

98 when st5.option="tmn2x"

and st4.option="tmn2" then "tmn2"

99 when st5.option="tmn2x_0" and

st4.option="tmn2" then "tmn2_0"

100

101 when st5.option="tmn3x"

and st4.option="tmn3" then "tmn3"

102 when st5.option="tmn3x_0" and

st4.option="tmn3" then "tmn3_0"

103

104 when st5.option="tmn4x"

and st4.option="tmn4" then "tmn4"

105 when st5.option="tmn4x_0" and

st4.option="tmn4" then "tmn4_0"

106

107 else "delete"

108 end as optionname

109 %mend;

110 %macro optionmac2; *select option, IE variabble, IE variable percentage

factor;

111 %undiscsurplus(baseline,reduction,rpercent);

112 %undiscsurplus(tmn1,reduction,rpercent);

113 %undiscsurplus(tmn2,reduction,rpercent);

114 %undiscsurplus(tmn3,reduction,rpercent);

115 %undiscsurplus(tmn4,reduction,rpercent);

116 %mend;

117 %macro optionmac2a; *select option, IE variable, IE variable percentage

factor;

118 if optionname in("baseline","tmn1","tmn2","tmn3","tmn4");

119 if optionname="baseline" then sortx=1;

120 else if optionname="tmn1" then sortx=2;

121 else if optionname="tmn2" then sortx=3;

122 else if optionname="tmn3" then sortx=4;

123 else if optionname="tmn4" then sortx=5;

124

125 %mend;

126

127 %macro optionmac3; *perform macro for each option for which a regional

table is presented;

Page 3
p4com_main_03.21.11_log.txt

128

129 /*%summarybyoption(baseline,NE1,NE1); */

130

131 /*%summarybyoption(baseline,NE2,NE2); */

132 %summarybyoption(baseline_0,tmn1_0,tmn1_0);

133

134 /*%summarybyoption(baseline,MN4,MN4); */

135 %summarybyoption(baseline_0,tmn2_0,tmn2_0);

136

137 %summarybyoption(baseline_0,tmn3_0,tmn3_0);

138

139 %summarybyoption(baseline_0,tmn4_0,tmn4_0);

140 %mend;

141 %macro optionmac4;

142 if option="baseline" then do;

sort1=1; option="baseline"; end;

4 The SAS System 12:35

Tuesday, March 22, 2011

143 else if option="tmn1" then do; sort1=2;

option="tmn1"; end;

144 else if option="tmn2" then do; sort1=3;

option="tmn2"; end;

145 else if option="tmn3" then do; sort1=4;

option="tmn3"; end;

146 else if option="tmn4" then do; sort1=5;

option="tmn4"; end;

147 %mend optionmac4;

148

149 %let speciesoptions=baseline^tmn1^tmn2^tmn3^tmn4;

150 %let titleoptions=baseline^tmn1^tmn2^tmn3^tmn4;

151 %let regionoptions=tmn1_0^tmn2_0^tmn3_0^tmn4_0;

152 %let speciesnum=5; * (all options incl. baseline) select number of

species-tables per

152 ! region (number in speciesoptions list above);

153 %let rnum=4; * (all options minus baseline) select number

of region-summary-tables per

153 ! region (number in regionoptions list above);

154 %let nby=9; * (sum of two above) select number of tables

for each region , sum of

154 ! speciesnum and rnum;

155

156 %let natoptions=baseline_0^tmn1_0^tmn2_0^tmn3_0^tmn4_0;*list options

presented in national

156 ! tables;

157 %let natnum=5; *number of national tables in

natoptions list;

158

159 *list regional table titles;

160 %let TableTitles=

161 baseline^tmn1^tmn2^tmn3^tmn4;

162

163 *list national table titles;

164 %let nattitles=

165 Baseline Elimination (w/o Consumer Surplus)

166 tmn1^tmn2^tmn3^tmn4;

167

168 *This is a macro that can be used to import data from excel;

169 %macro import(infile,insheet,out);

170 PROC IMPORT OUT= WORK.&out

171 DATAFILE= "&infile"

172 DBMS=EXCEL REPLACE;

173 SHEET="&insheet.$";

Page 4
p4com_main_03.21.11_log.txt

174 GETNAMES=YES;

175 MIXED=NO;

176 SCANTEXT=YES;

177 USEDATE=YES;

178 SCANTIME=YES;

179 RUN;

180 %mend;

181 *This is a macro that can be used to export data to excel;

182 %macro export(datafile,outfile,sheet);

183 PROC EXPORT DATA= &datafile

184 OUTFILE= &outfile

185 DBMS=EXCEL replace;

186 SHEET=&sheet;

187 RUN;

188 %mend;

189

190 * 1 Get data on Business as Usual (BAU) scenario for gross

revenues and prices

191 Region/Species-Specific Prices and Quantities are

assumed;

192 * 1a import landings data;

5 The SAS System 12:35

Tuesday, March 22, 2011

193 %import(&inloc.&input,Landings_all,p1);

NOTE: WORK.P1 data set was successfully created.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 1.65 seconds

cpu time 0.48 seconds

194

195 * 1b drop subtotal rows, define region variable;

196 data p2 dropped;

197 set p1;

198 if year~=.;

199 *define the north atlantic region;

200 if

201 state="Massachusetts" |

202 state="Connecticut" |

203 state="Rhode Island" |

204 state="New Hampshire" |

205 state="Maine"

206 then Region="NA";

207 *define the mid-atlantic region;

208 else if

209 state="New York" |

210 state="New Jersey" |

211 state="Maryland" |

212 state="Delaware" |

213 state="Virginia"

214 then Region="MA";

215 *define the california region;

216 else if state="California"

217 then Region="CA";

218 *define the gulf of mexico region;

219 else if state="Florida West Coast" |

220 state="Alabama" |

221 state="Mississippi" |

222 state="Louisiana" |

223 state="Texas"

224 then region="GM";

Page 5
p4com_main_03.21.11_log.txt

225 *define the great lakes region;

226 else if state="Michigan" |

227 state="Ohio" |

228 state="Minnesota" |

229 state="Wisconsin"

230 then region="GL";

231 *define the south atlantic region;

232 else if state="North Carolina" |

233 state="South Carolina" |

234 state="Georgia" |

235 state="Florida East Coast"

236 then region="SA";

237 else output dropped; *the data set, dropped, contains data

from states not considered;

238 if region~=" " then output p2; *here we output the landings

and price data that we will

238 ! use;

6 The SAS System 12:35

Tuesday, March 22, 2011

239 run;

NOTE: There were 9611 observations read from the data set WORK.P1.

NOTE: The data set WORK.P2 has 7241 observations and 7 variables.

NOTE: The data set WORK.DROPPED has 1398 observations and 7 variables.

NOTE: DATA statement used (Total process time):

real time 0.06 seconds

cpu time 0.01 seconds

240

241 * 1c import cpi data to adjust prices to 2008$;

242 %import(&inloc.&input,CPI.2002.2009,cpi);

NOTE: WORK.CPI data set was successfully created.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 2.23 seconds

cpu time 0.15 seconds

243

244 * 1d join cpi data and landings data, adjust prices to

2008$;

245 proc sql;

246 create table p3 as select

247 p2.region,

248 p2.state,

249 p2.year,

250 p2.species as AFSSpecies, /*species as defined in landings

data*/

251 p2.pounds,

252 p2.dollars,

253 cpi.oneis2009,

254 p2.dollars*cpi.oneis2009 as adjusteddollars /*here prices

are adjusted to 2008$*/

255 from p2 as p2 left join cpi on

256 p2.year=cpi.year;

NOTE: Table WORK.P3 created, with 7241 rows and 8 columns.

257 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.04 seconds

cpu time 0.03 seconds

Page 6
p4com_main_03.21.11_log.txt

258

259 * 1e import mapping of various species definitions;

260 %import(&inloc.&input,SpeciesValueMap,smap);

NOTE: WORK.SMAP data set was successfully created.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 1.28 seconds

cpu time 0.17 seconds

261

262 * 1f join species map with landings data

7 The SAS System 12:35

Tuesday, March 22, 2011

263 (the landings data species definitions are mapped to

the I&E species definitions);

264 proc sql;

265 create table p4 as select

266 s.*,

267 p.*

268 from smap as s left join p3 as p

269 on s.valspecies=p.AFSSpecies;

NOTE: Table WORK.P4 created, with 3349 rows and 15 columns.

270 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.06 seconds

cpu time 0.03 seconds

271

272 * 1g drop species that are double counted;

273 proc sort data=p4 out=p5; by year region state AFSSpecies; run;

NOTE: There were 3349 observations read from the data set WORK.P4.

NOTE: The data set WORK.P5 has 3349 observations and 15 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

274 data p6 temp;

275 set p5;

276 by year region state AFSSpecies;

277 if first.AFSSpecies then output p6; *keep one of each

species type;

278 else output temp; *output double-couted species;

279 run;

NOTE: There were 3349 observations read from the data set WORK.P5.

NOTE: The data set WORK.P6 has 2574 observations and 15 variables.

NOTE: The data set WORK.TEMP has 775 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

280

281 * 1h generate dataset of pounds of harvest, BAU gross

revenues,

Page 7
p4com_main_03.21.11_log.txt

282 and BAU prices, by region and species;

283 proc sql;

284 create table p7 as select

285 region label="Region Abbreviation",

286 cfspecies label="Commercial Fishing Species Market Group",

287 sum(pounds)/5 as pounds format=comma30.0 label="average

annual lbs",

288 sum(adjusteddollars)/5 as dollars2008 format=dollar30.0

label="average annual 2009$",

289 sum(adjusteddollars)/sum(pounds) as price2008

format=dollar30.2 label="average dockside

289 ! price 2009$"

290 from p6 where afsspecies~=" " group by region,cfspecies;

NOTE: Table WORK.P7 created, with 156 rows and 5 columns.

8 The SAS System 12:35

Tuesday, March 22, 2011

291 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.04 seconds

cpu time 0.01 seconds

292

293 * 1i generate dataset of pounds of harvest, BAU gross

revenues,

294 and BAU prices, by region for Species without

Specific data: cfspecies = "blank";

295 proc sql;

296 create table p8 as select

297 region label="Region Abbreviation",

298 "blank" as cfspecies format=$50. label="Commercial Fishing

Species Market Group",

299 sum(pounds)/5 as pounds format=comma30.0 label="average

annual lbs",

300 sum(adjusteddollars)/5 as dollars2008 format=dollar30.0

label="average annual 2009$",

301 sum(adjusteddollars)/sum(pounds) as price2008

format=dollar30.2 label="average dockside

301 ! price 2009$"

302 from p6 where afsspecies~=" " group by region;

NOTE: Table WORK.P8 created, with 6 rows and 5 columns.

303 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

304

305 * 1j generate final dataset of pounds of harvest, BAU

gross revenues,

306 and BAU prices, by region and species;

307 data step1data;

308 set p7 p8;

309 run;

NOTE: There were 156 observations read from the data set WORK.P7.

NOTE: There were 6 observations read from the data set WORK.P8.

NOTE: The data set WORK.STEP1DATA has 162 observations and 5 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

Page 8
p4com_main_03.21.11_log.txt

cpu time 0.01 seconds

310

311 * 2 Get NB Ratio data and join it with the revnenue/price data;

312 *The NB ratio is the ratio by which the change in

gross revenue can be multiplied to

313 obtain the change in producer surplus;

314

315 * 2a Import data;

316 %import(&inloc.&input,NBRatio,r1);

NOTE: WORK.R1 data set was successfully created.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 1.65 seconds

cpu time 0.42 seconds

9 The SAS System 12:35

Tuesday, March 22, 2011

317

318 * 2b drop unneeded vars;

319 data r2 (keep=region species_econ ABT_NB_Ratio);

320 set r1;

321 if lossmode~='imp&ent'; *we dont need data for I&E combined;

322 if species_econ="other.com" then

species_econ="other.com.species";

323 if species_econ="dungeness" then

species_econ="dungeness.crab";

324 run;

NOTE: There were 1806 observations read from the data set WORK.R1.

NOTE: The data set WORK.R2 has 1146 observations and 3 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

325

326 * 2c change 'other' species to a consistent name;

327 proc sort data=r2 out=r2a; by region species_econ ABT_NB_Ratio; run;

NOTE: There were 1146 observations read from the data set WORK.R2.

NOTE: The data set WORK.R2A has 1146 observations and 3 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

328 data r2b;

329 set r2a;

330 by region species_econ ABT_NB_Ratio;

331 if region="calif" and species_econ="non.ris.com" and

first.species_econ then

331 ! species_econ="other.com.species";

332 if region="northatlantic" and

species_econ="non.ris.com" and first.species_econ then

332 ! species_econ="other.com.species";

333 if region="southatlantic" and

species_econ="non.ris.com" and first.species_econ then

333 ! species_econ="other.com.species";

334 if region="gulfmexico" and

Page 9
p4com_main_03.21.11_log.txt

species_econ="non.ris.com" and first.species_econ then

334 ! species_econ="other.com.species";

335

336 run;

NOTE: There were 1146 observations read from the data set WORK.R2A.

NOTE: The data set WORK.R2B has 1146 observations and 3 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

337

338 * 2d sort data and drop duplicate observations;

339 proc sort data=r2b out=r3; by region species_econ ABT_NB_Ratio; run;

10 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: There were 1146 observations read from the data set WORK.R2B.

NOTE: The data set WORK.R3 has 1146 observations and 3 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

340 data r4 error1; *in this data step, we want to keep only unique

species-NBRatio

340 ! observations;

341 set r3;

342 by region species_econ ABT_NB_Ratio;

343 if first.ABT_NB_Ratio then rat=1;

344 if first.species_econ then spe=1;

345 if first.region then reg=1;

346 *(A) drop duplicate obervations;

347 if rat=1 and spe~=1 and species_econ="anchovies" and

region="calif" then delete;

348 *(B) Look for duplicate obervations that need to be

dropped;

349 else if rat=1 and spe~=1 then do;

350 put "r4 data setp error caused by region:"

region "and species: " species_econ;

351 output error1;

352 end;

353 if rat=1 and spe=1 then output r4;

354 else if rat=1 | spe=1 then output error1;

355 run;

NOTE: There were 1146 observations read from the data set WORK.R3.

NOTE: The data set WORK.R4 has 114 observations and 6 variables.

NOTE: The data set WORK.ERROR1 has 0 observations and 6 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

356

357 * 2e drop extra variables;

358 data r5 (keep=re region species_econ ABT_NB_Ratio);

359 set r4;

360 length re $3.;

361 *recode the region variable;

362 if region="calif" then re="CA";

Page 10
p4com_main_03.21.11_log.txt

363 else if region="greatlakes" then re="GL";

364 else if region="gulfmexico" then re="GM";

365 else if region="midatlantic" then re="MA";

366 else if region="northatlantic" then re="NA";

367 else if region="southatlantic" then re="SA";

368 else put "data step generating r5 has an error";

369 label re="Region Abbreviation"

370 region="region (short)"

371 species_econ="I&E Species Name"

WARNING: Apparent symbolic reference E not resolved.

372 ABT_NB_Ratio="Net Benefits Ratio";

373 run;

NOTE: There were 114 observations read from the data set WORK.R4.

11 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: The data set WORK.R5 has 114 observations and 4 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

374

375 * 2f get map between "I&E species" and "Commercial

Fishery Species";

376 proc sort data=smap out=smap2; by cfspecies iespecies; run;

NOTE: There were 200 observations read from the data set WORK.SMAP.

NOTE: The data set WORK.SMAP2 has 200 observations and 7 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

377 data smap3;

378 set smap2;

379 by cfspecies iespecies;

380 if first.iespecies;

381 run;

NOTE: There were 200 observations read from the data set WORK.SMAP2.

NOTE: The data set WORK.SMAP3 has 85 observations and 7 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

382

383 * 2g Add "Commercial Fishery Species" variable to NB

Ratio data;

384 proc sql;

385 create table r6 as select

386 r5.re,

387 r5.region,

388 smap3.cfspecies label="Commercial Fishing Species Market

Group",

389 r5.species_econ,

390 r5.ABT_NB_Ratio

391 from r5 left join smap3 on

392 r5.species_econ=smap3.iespecies

393 order by re,cfspecies,species_econ;

NOTE: Table WORK.R6 created, with 114 rows and 5 columns.

Page 11
p4com_main_03.21.11_log.txt

394 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

395

396 * 2h drop observations without "Commercial Fishery

Species" ;

397 data step2data;

398 set r6;

12 The SAS System 12:35

Tuesday, March 22, 2011

399 if cfspecies~=" ";

400 *Use generic price for GL sculpins because landings data are

not available;

401 if re="GL" and species_econ="sculpins" then

cfspecies="blank";

402 run;

NOTE: There were 114 observations read from the data set WORK.R6.

NOTE: The data set WORK.STEP2DATA has 114 observations and 5 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

403

404

405 * 3 Combine Price and Ratio Data;

406 * 3a Combine Price and Ratio Data;

407 proc sql;

408 create table D1 as select

409 st2.*,st1.pounds,st1.price2008,st1.dollars2008

410 from step2data as st2 left join step1data as st1 on

411 st1.cfspecies=st2.cfspecies

412 and st1.region=st2.re

413 order by st2.region,st2.species_econ;

NOTE: Table WORK.D1 created, with 114 rows and 8 columns.

414 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

415

416 * 3b Perform Data Check;

417 data PriceIsMissing;

418 set d1;

419 if price2008=.;

420 put "Error in PriceIsMissing datasetp for species = "

species_econ

421 " No Landings data for these species, in the

region: " region;

422 run;

NOTE: There were 114 observations read from the data set WORK.D1.

NOTE: The data set WORK.PRICEISMISSING has 0 observations and 8 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

Page 12
p4com_main_03.21.11_log.txt

cpu time 0.00 seconds

423

424 * 3c Use Average Price Data where species specific price

is not available;

425 data Step3data;* (drop=Aprice2008);

426 * if _n_=1 then set Allspeciesprice (keep=Aprice2008);

427 set D1;

428 * if price2008=. then price2008=Aprice2008;

429 run;

13 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: There were 114 observations read from the data set WORK.D1.

NOTE: The data set WORK.STEP3DATA has 114 observations and 8 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

430

431 * 4 Get I&E Data;

432 * 4a Import I&E Data;

433 %import(&inloc.&input2,BNB_IMP,I);

NOTE: WORK.I data set was successfully created.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 8.09 seconds

cpu time 1.21 seconds

434 %import(&inloc.&input2,BNB_ENT,E);

NOTE: WORK.E data set was successfully created.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 2.71 seconds

cpu time 1.09 seconds

435 %import(&inloc.&input2,BNB_IE,ei);

NOTE: WORK.EI data set was successfully created.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 2.93 seconds

cpu time 1.32 seconds

436 %import(&inloc.&input2,REDUCTIONS_DETAIL,reductions_detail)

NOTE: WORK.REDUCTIONS_DETAIL data set was successfully created.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 3.21 seconds

cpu time 0.21 seconds

437

************************************************************************************

*******

437 ! ******;

438

439 %macro iore(lm);

Page 13
p4com_main_03.21.11_log.txt

440 data &lm.1 (keep=option option_name region species_econ lossmode

com_loss);

441 length option $8.;

442 set &lm.;

443 if metric

="yf.lbs"

444 and comrec_type ="com.types"

445 and species_econ ~="zz.all.species"

446 and region

~="zz.allregions";

14 The SAS System 12:35

Tuesday, March 22, 2011

447

448 %optionmac0(1);

449

450 rename benefit_value_regional=com_loss;

451

452 run;

453

454 data &lm.2 (keep=option option_name region species_econ lossmode

com_loss);

455 length region $20. option $8.;

456 set &lm.;

457 if metric

="yf.lbs"

458 and comrec_type ="com.types"

459 and species_econ ~="zz.all.species"

460 and region

~="zz.allregions";

461 %optionmac0(2);

462

463 option="baseline";

464

465 rename baseline_value_regional=com_loss;

466

467 run;

468

469 data &lm.3;

470 set &lm.2 &lm.1;

471 if species_econ="other.com" then

species_econ="other.com.species";

472 run;

473 %mend;

474

475 %iore(i);

NOTE: There were 23712 observations read from the data set WORK.I.

NOTE: The data set WORK.I1 has 420 observations and 6 variables.

NOTE: DATA statement used (Total process time):

real time 0.09 seconds

cpu time 0.00 seconds

NOTE: There were 23712 observations read from the data set WORK.I.

NOTE: The data set WORK.I2 has 105 observations and 6 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

Page 14
p4com_main_03.21.11_log.txt

NOTE: There were 105 observations read from the data set WORK.I2.

NOTE: There were 420 observations read from the data set WORK.I1.

NOTE: The data set WORK.I3 has 525 observations and 6 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

15 The SAS System 12:35

Tuesday, March 22, 2011

476 %iore(e);

NOTE: There were 19224 observations read from the data set WORK.E.

NOTE: The data set WORK.E1 has 320 observations and 6 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 19224 observations read from the data set WORK.E.

NOTE: The data set WORK.E2 has 80 observations and 6 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 80 observations read from the data set WORK.E2.

NOTE: There were 320 observations read from the data set WORK.E1.

NOTE: The data set WORK.E3 has 400 observations and 6 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

477 %iore(ei);

NOTE: There were 24640 observations read from the data set WORK.EI.

NOTE: The data set WORK.EI1 has 428 observations and 6 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 24640 observations read from the data set WORK.EI.

NOTE: The data set WORK.EI2 has 107 observations and 6 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 107 observations read from the data set WORK.EI2.

NOTE: There were 428 observations read from the data set WORK.EI1.

NOTE: The data set WORK.EI3 has 535 observations and 6 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

Page 15
p4com_main_03.21.11_log.txt

478 data ie2 (drop=option_name);

479 set i3 e3;

16 The SAS System 12:35

Tuesday, March 22, 2011

480 if species_econ="dungeness" then

species_econ="dungeness.crab";

481 if option ="." then delete;

482 run;

NOTE: There were 525 observations read from the data set WORK.I3.

NOTE: There were 400 observations read from the data set WORK.E3.

NOTE: The data set WORK.IE2 has 925 observations and 5 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

483 *%export(ie2,"&outloc.&output",ie2);

484

485

486

487

488 * 4c Add "Commercial Fishery Species" variable to I&E

data;

489 proc sql;

490 create table ie3 as select

491 ie2.*,

492 smap3.cfspecies

493 from ie2 left join smap3 on

494 ie2.species_econ=smap3.iespecies;

NOTE: Table WORK.IE3 created, with 925 rows and 6 columns.

495 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

496

497 * 4d Calculate total I&E eliminations and reductions by

Option, Region, and CFspecies;

498 proc sql;

499 create table ie4 as select

500 option,region,cfspecies,

501 sum(com_loss) as treduction

502 from ie3 group by option,region,cfspecies;

NOTE: Table WORK.IE4 created, with 435 rows and 4 columns.

503 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

504

505 * 4e Calculate shares of total eliminations and

reductions

506 by:

507 lossmode (impingment or entrainment)

508 and I&E Species (CFspecies may

include more than one I&E Species);

509 proc sql;

Page 16
p4com_main_03.21.11_log.txt

510 create table ie5 as select

17 The SAS System 12:35

Tuesday, March 22, 2011

511 ie4.option,ie4.region,

512 ie3.species_econ,

513 ie4.cfspecies,

514 ie3.lossmode,

515 ie3.com_loss/ie4.treduction as rpercent,

516 ie4.treduction

517 from ie4 left join ie3 on

518 ie3.option=ie4.option and

519 ie3.region=ie4.region and

520 ie3.cfspecies=ie4.cfspecies;

NOTE: Table WORK.IE5 created, with 925 rows and 7 columns.

521 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.04 seconds

cpu time 0.01 seconds

522

523

524 * 4f combine IE data with prices data;

525 proc sql;

526 create table Step4Data as select

527 ie5.option label="Regulatory Option",

528 st3.region,

529 st3.re,

530 st3.cfspecies,

531 st3.species_econ,

532 ie5.lossmode label="Type of Losses: impingement or

entrainment",

533 ie5.rpercent format=percent15.2 label="LossMode/IE Species

Share of Reductions",

534 ie5.treduction*&ieunits. as reduction

535 format=comma20.0 Label="option/region/CFSpecies

Reductions (LBS)",

536 st3.ABT_NB_Ratio,

537 st3.pounds as oldlbs Label="BAU Average Annual LBS",

538 st3.price2008 Label="BAU Average Dockside Price 2009$",

539 st3.dollars2008 Label="BAU Gross Dockside Revenues 2009$"

540 from ie5 left join step3data as st3

541 on

542 ie5.region=st3.region and

543 ie5.species_econ=st3.species_econ

544 where ie5.rpercent>0 and ie5.region~="all.regions.combined"

545 and ie5.region~="inland"

546 and ie5.species_econ~="all.species.combined"

and ie5.species_econ~="other.rec.species"

547 order by

ie5.option,ie5.region,st3.cfspecies,st3.species_econ,ie5.lossmode;

NOTE: Table WORK.STEP4DATA created, with 765 rows and 12 columns.

548 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

549

550

Page 17
p4com_main_03.21.11_log.txt

18 The SAS System 12:35

Tuesday, March 22, 2011

551

552 /* 5 Calculate Benefits Schedule By Option;*/

553

554 * 5a Import facility data with both facility id's;

555 %import(&inloc.&input,IDMAP,f1);

NOTE: WORK.F1 data set was successfully created.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 2.78 seconds

cpu time 0.17 seconds

556 * 5b Import data with weights;

557 %import(&inloc.&input,ID_AND_WEIGHT,ID_AND_WEIGHT);

NOTE: WORK.ID_AND_WEIGHT data set was successfully created.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 1.15 seconds

cpu time 0.21 seconds

558 * 5c Import data with region and flow;

559 %import(&inloc.&input,flowdata,f3);

NOTE: WORK.F3 data set was successfully created.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 2.73 seconds

cpu time 0.18 seconds

560 * 5d Import data with compliance dates;

561 %import(&inloc.&input,complianceyear,cydata);

NOTE: WORK.CYDATA data set was successfully created.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 1.10 seconds

cpu time 0.28 seconds

562

563

564 * 5e Get ID for joining datasets;

565 proc sql;

566 create table f4 as select

567 id.plntcode,

568 w.id as facility,

569 w.ps_wgt as Weighting_Factor

570 from f1 as id right join ID_AND_WEIGHT as w on id.surveyid=w.id;

NOTE: Table WORK.F4 created, with 892 rows and 3 columns.

571 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

19 The SAS System 12:35

Tuesday, March 22, 2011

572

Page 18
p4com_main_03.21.11_log.txt

573 * 5f Drop double counted plants;

574 proc sort data=f4 out=f5; by plntcode; run;

NOTE: There were 892 observations read from the data set WORK.F4.

NOTE: The data set WORK.F5 has 892 observations and 3 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

575 data f6;

576 set f5;

577 by plntcode;

578 if (not first.plntcode | not last.plntcode) and

Weighting_Factor=0 then delete;

579 run;

NOTE: There were 892 observations read from the data set WORK.F5.

NOTE: The data set WORK.F6 has 892 observations and 3 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

580

581 * 5f join flow and weight data;

582 proc sql;

583 create table f7 as select

584 f6.*,

585 f3.Benefits_Region,f3.AverageFlow

586 from f6 full join f3 on f6.plntcode=f3.EIA_Code where

f3.EIA_Code~=.;

NOTE: Table WORK.F7 created, with 892 rows and 5 columns.

587 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.06 seconds

cpu time 0.01 seconds

588

589 * 5g recode region variable;

590 data f8 (keep=region AverageFlow Weighting_Factor PLNTCODE facility);

591 set f7;

592 format region $14.;

593 if Benefits_Region="CN" | Benefits_Region="CS"

| Benefits_Region="CAL" |

593 ! Benefits_Region="HI" then region="California";

594 else if Benefits_Region="GL"

then region="Great Lakes";

595 else if Benefits_Region="INL"

then region="Inland";

596 else if Benefits_Region="MA"

then region="Mid-Atlantic";

597 else if Benefits_Region="Mex"

then region="Gulf of

Mexico";

598 else if Benefits_Region="NA"

then region="North

Atlantic";

599 else if Benefits_Region="SA"

then region="South

Page 19
p4com_main_03.21.11_log.txt

Atlantic";

20 The SAS System 12:35

Tuesday, March 22, 2011

600 else if Benefits_Region="PNW" then delete;

601 else if Benefits_Region="VI" then delete;

602 run;

NOTE: There were 892 observations read from the data set WORK.F7.

NOTE: The data set WORK.F8 has 889 observations and 5 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

603

604 * 5h combine and format data with average flow, region, wgt,

and compliance year;

605

606 proc sql;

607 create table s2a as select

608 f8.plntcode,f8.AverageFlow as

avgflow,f8.Region,f8.Weighting_Factor as newweight,

609 %cyr

610 from f8 full join cydata on cydata.id=f8.facility;

NOTE: Table WORK.S2A created, with 892 rows and 9 columns.

611 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.04 seconds

cpu time 0.01 seconds

612

613 proc sql;

614 create table s2 as select

615 s2a.*

616 from s2a;

NOTE: Table WORK.S2 created, with 892 rows and 9 columns.

617 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

618

619 Data s2;

620 set s2;

621 if region="" then delete;

622 RUN;

NOTE: There were 892 observations read from the data set WORK.S2.

NOTE: The data set WORK.S2 has 889 observations and 9 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

623 Proc sort data=s2 out=s2;

21 The SAS System 12:35

Tuesday, March 22, 2011

Page 20
p4com_main_03.21.11_log.txt

624 by region;

625 RUN;

NOTE: There were 889 observations read from the data set WORK.S2.

NOTE: The data set WORK.S2 has 889 observations and 9 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

626

627 %import(&inloc.&input,schedule,schedule);

NOTE: WORK.SCHEDULE data set was successfully created.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 2.81 seconds

cpu time 0.32 seconds

628

629 data schedule1;

630 set schedule;

631

632 drop f18 f19;

633 format reg $14.;

634 if Benefits_Region="CN" | Benefits_Region="CS"

| Benefits_Region="CAL" |

634 ! Benefits_Region="HI" then reg="calif";

635 else if Benefits_Region="GL"

then reg="greatlakes";

636 else if Benefits_Region="INL"

then reg="inland";

637 else if Benefits_Region="MA"

then reg="midatlantic";

638 else if Benefits_Region="Mex"

then reg="gulfmexico";

639 else if Benefits_Region="NA"

then reg="northatlantic";

640 else if Benefits_Region="SA"

then reg="southatlantic";

641

642 array rbschd_{60}rbschd_1 - rbschd_60;

643 array benschd_(60) benschd_1 - benschd_60;

644 do i=1 to 60;

645 rbschd_(i) = benschd_(i);

646 end;

647

648 run;

WARNING: The variable f18 in the DROP, KEEP, or RENAME list has never been

referenced.

WARNING: The variable f19 in the DROP, KEEP, or RENAME list has never been

referenced.

NOTE: There were 112 observations read from the data set WORK.SCHEDULE.

NOTE: The data set WORK.SCHEDULE1 has 112 observations and 174 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

649

650

Page 21
p4com_main_03.21.11_log.txt

651 proc sql;

22 The SAS System 12:35

Tuesday, March 22, 2011

652 create table s6 (drop=option reg) as select

653 %optionmac1 ,

654 st4.region,

655 st4.re,

656 st4.cfspecies,

657 st4.species_econ,

658 st4.lossmode,

659 st4.rpercent format=percent12.2,

660 st4.reduction format=comma20.0,

661 st4.ABT_NB_Ratio,

662 st4.oldlbs,

663 st4.price2008,

664 st4.dollars2008,

665 st5.*

666 from Step4data as st4 left join schedule1 (keep=option reg

rbschd_1-rbschd_60) as st5 on

667 st4.region=st5.reg

668 ORDER by

st5.option,st4.region,st4.cfspecies,st4.species_econ,st4.lossmode;

NOTE: Table WORK.S6 created, with 12642 rows and 72 columns.

669 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.12 seconds

cpu time 0.09 seconds

670

671

672

673

************************************************************************************

*******

673 ! ********************

674

************************************************************************************

*******

674 ! ********************

675 * 5j THIS MACRO CALCULATES BENEFITS SCHEDULE FOR FACILITIES

ASSIGNED IM TECH

676 Incorporates the biological lag and the lag in

compliance;

677 %macro step5schedule(opt,cyr);

678 * 5j1 generate benefits schedule;

679 data s3i;

680 set s2;

681 where region~="Virgin Islands";

682 array flowy_(60) flowy_1-flowy_60;

683 array bio(60) bio_1-bio_60;

684 array bschd(60) bschd_1-bschd_60;

685 do i=1 to 60;

686

687 if "&opt"="baseline" then do;

688 flowy_(i)=avgflow;

689 if region="Inland" |

region="Great Lakes" | region="Gulf of Mexico" then do;

689 ! *benefits begin in first year for these regions;

690 if i=1 then

bio(i)=.1;

Page 22
p4com_main_03.21.11_log.txt

691 if i=2 then

bio(i)=.2;

692 if i=3 then

bio(i)=.8;

693 if i=4 then

bio(i)=.9;

694 if i=5 then

bio(i)=.95;

695 if i=6 then

bio(i)=1;

23 The SAS System 12:35

Tuesday, March 22, 2011

696 if i>6 and i<=45

then bio(i)=1;

697 if i=46 then

bio(i)=.9;

698 if i=47 then

bio(i)=.8;

699 if i=48 then

bio(i)=.2;

700 if i=49 then

bio(i)=.1;

701 if i=50 then

bio(i)=.05;

702 if i>50 then

bio(i)=0;

703 end;

704 else do; *benefits begin a

year later for other regions (midatlantic, california,

704 ! northatlantic, southatlantic);

705 if i=1 then

bio(i)=0;

706 if i=2 then

bio(i)=.1;

707 if i=3 then

bio(i)=.2;

708 if i=4 then

bio(i)=.8;

709 if i=5 then

bio(i)=.9;

710 if i=6 then

bio(i)=.95;

711 if i=7 then

bio(i)=1;

712 if i>7 and i<=45

then bio(i)=1;

713 if i=46 then

bio(i)=.9;

714 if i=47 then

bio(i)=.8;

715 if i=48 then

bio(i)=.2;

716 if i=49 then

bio(i)=.1;

717 if i=50 then

bio(i)=.05;

718 if i>50 then

bio(i)=0;

719 end;

720 end;

721

722 else do;

Page 23
p4com_main_03.21.11_log.txt

723 if &cyr.>&ie_year_1.

then delete;

724 if region="Inland" |

region="Great Lakes" | region="Gulf of Mexico" then do;

725 *benefits

begin in first year for these regions;

726

x=i-&cyr.+&t0.; *e.g., if i=1 and cyr = 2011 and first year of rule is 2011 then

726 ! x=1 in 2011;

727 if

x<=0 then flowy_(i)=0; *x=1 in first year of compliance;

728 else

flowy_(i)=avgflow;

729 if _n_=1

then put "Not BASELINE";

730

731 if

x<=0 then bio(i)=0;

732 else if x=1

then bio(i)=.02;

733 else if x=2

then bio(i)=.06;

734 else if x=3

then bio(i)=.22;

735 else if x=4

then bio(i)=.4;

736 else if x=5

then bio(i)=.59;

737 else if x=6

then bio(i)=.77;

738 else if x=7

then bio(i)=.93;

739 else if x=8

then bio(i)=.97;

740 else if x=9

then bio(i)=.99;

741 else if x>=9

and i<=45 then bio(i)=1;

742 else if i=46

then bio(i)=.9;

743 else if i=47

then bio(i)=.8;

744 else if i=48

then bio(i)=.2;

745 else if i=49

then bio(i)=.1;

746 else if i=50

then bio(i)=0.05;

747 else if i>50

then bio(i)=0;

24 The SAS System 12:35

Tuesday, March 22, 2011

748

749 end;

750 else do;

751 *benefits

begin in second year for these regions;

752

x=i-&cyr.+&t0.; *e.g., if i=1 and cyr = 2011 and first year of rule is 2011 then

752 ! x=1 in 2012;

753 if

x<0 then flowy_(i)=0;*x=1 in second year of compliance;

Page 24
p4com_main_03.21.11_log.txt

754 else

flowy_(i)=avgflow;

755 if _n_=1

then put "Not BASELINE";

756

757 if

x<=0 then bio(i)=0;

758 else if x=1

then bio(i)=0;

759 else if x=2

then bio(i)=.02;

760 else if x=3

then bio(i)=.06;

761 else if x=4

then bio(i)=.22;

762 else if x=5

then bio(i)=.4;

763 else if x=6

then bio(i)=.59;

764 else if x=7

then bio(i)=.77;

765 else if x=8

then bio(i)=.93;

766 else if x=9

then bio(i)=.97;

767 else if x=10

then bio(i)=.99;

768 else if

x>=10 and i<=45 then bio(i)=1;

769 else if i=46

then bio(i)=.9;

770 else if i=47

then bio(i)=.8;

771 else if i=48

then bio(i)=.2;

772 else if i=49

then bio(i)=.1;

773 else if i=50

then bio(i)=0.05;

774 else if i>50

then bio(i)=0;

775 end;

776 end;

777

778 bschd(i)=(flowy_(i)*bio(i));

779 end;

780 format reg $30.;

781 if region="California"

then reg="calif";

782 else if region="Great Lakes"

then reg="greatlakes";

783 else if region="Gulf of Mexico"

then reg="gulfmexico";

784 else if region="Inland"

then reg="inland";

785 else if region="Mid-Atlantic"

then reg="midatlantic";

786 else if region="North Atlantic"

then reg="northatlantic";

787 else if region="South Atlantic"

then reg="southatlantic";

788

789 run;

Page 25
p4com_main_03.21.11_log.txt

790

791 * 5j2 calculate total average flow by region;

792 proc sql;

793 create table s5i as select

794 s3i.*,

795 sum(avgflow*newweight) as totalavgflow /*group flag*/

796 from s3i group by region;

797 quit;

798

799 * 5j3 generate flow and benefits schedule variables

(for each facility) as percentages to

799 ! total regional average flow;

25 The SAS System 12:35

Tuesday, March 22, 2011

800 data s6i (drop=bio_1-bio_60 flowy_1-flowy_60);

801 set s5i;

802 array flowy_(60) flowy_1-flowy_60;

803 array bschd(60) bschd_1-bschd_60;

804 do i=1 to 60;

805 if totalavgflow=0 then flowy_(i)=0;

806 else if totalavgflow~=0 then

flowy_(i)=newweight*flowy_(i)/totalavgflow;

807 if totalavgflow=0 then bschd(i)=0;

808 else if totalavgflow~=0 then

bschd(i)=newweight*bschd(i)/totalavgflow;

809 end;

810 run;

811

812 * 5j4 sort data by region;

813 proc sort data=s6i out=s7i; by region; run;

814

815 * 5j6 generate benefits schedule variable for

region, e.g., 1 = full benefits, .5 = 50%

815 ! of full benefits;

816 data s8i_&opt (keep=option region reg rbschd_1-rbschd_60);

817 retain option region reg rbschd_1-rbschd_60;

818 set s7i;

819 by region;

820 option="&opt";

821 array bschd(60) bschd_1-bschd_60;

822 array rbschd(60) rbschd_1-rbschd_60;

823 do i=1 to 60;

824 if first.region then

rbschd(i)=bschd(i);

825 else rbschd(i)+bschd(i);

826 end;

827 if last.region;

828 run;

829 * 5j7: repeat 5j6 (for alternative presentation of

options);

830 data s8i_&opt._0 (keep=option region reg rbschd_1-rbschd_60);

831 retain option region reg rbschd_1-rbschd_60;

832 set s7i;

833 by region;

834 option="&opt._0";

835 array bschd(60) bschd_1-bschd_60;

836 array rbschd(60) rbschd_1-rbschd_60;

837 do i=1 to 60;

838 if first.region then

rbschd(i)=bschd(i);

839 else rbschd(i)+bschd(i);

840 end;

Page 26
p4com_main_03.21.11_log.txt

841 if last.region;

842 run;

843

844 %mend;

845

************************************************************************************

*******

845 ! ********************

846

************************************************************************************

*******

846 ! ********************

847 * 5j THIS MACRO CALCULATES BENEFITS SCHEDULE FOR FACILITIES

ASSIGNED TOWERS

848 Incorporates the biological lag and the lag in

compliance;

849 %macro step6schedule(opt,cyr);

850 * 5j1 generate benefits schedule;

26 The SAS System 12:35

Tuesday, March 22, 2011

851 data s3t;

852 set s2;

853 where region~="Virgin Islands";

854 array flowy_(60) flowy_1-flowy_60;

855 array bio(60) bio_1-bio_60;

856 array bschd(60) bschd_1-bschd_60;

857 do i=1 to 60;

858

859 if "&opt"="baseline" then do;

860 flowy_(i)=avgflow;

861 if region="Inland" |

region="Great Lakes" | region="Gulf of Mexico" then do;*benefits

861 ! begin in first year for these regions;

862 if i=1 then

bio(i)=.1;

863 if i=2 then

bio(i)=.2;

864 if i=3 then

bio(i)=.8;

865 if i=4 then

bio(i)=.9;

866 if i=5 then

bio(i)=.95;

867 if i=6 then

bio(i)=1;

868 if i>6 and i<=45

then bio(i)=1;

869 if i=46 then

bio(i)=.9;

870 if i=47 then

bio(i)=.8;

871 if i=48 then

bio(i)=.2;

872 if i=49 then

bio(i)=.1;

873 if i=50 then

bio(i)=.05;

874 if i>50 then

bio(i)=0;

875 end;

876 else do; *benefits begin a

year later for other regions (midatlantic, california,

Page 27
p4com_main_03.21.11_log.txt

876 ! northatlantic, southatlantic);

877 if i=1 then

bio(i)=0;

878 if i=2 then

bio(i)=.1;

879 if i=3 then

bio(i)=.2;

880 if i=4 then

bio(i)=.8;

881 if i=5 then

bio(i)=.9;

882 if i=6 then

bio(i)=.95;

883 if i=7 then

bio(i)=1;

884 if i>7 and i<=45

then bio(i)=1;

885 if i=46 then

bio(i)=.9;

886 if i=47 then

bio(i)=.8;

887 if i=48 then

bio(i)=.2;

888 if i=59 then

bio(i)=.1;

889 if i=50 then

bio(i)=.05;

890 if i>50 then

bio(i)=0;

891 end;

892 end;

893

894 else do;

895 if &cyr.<&ie_year_2.

then delete;

896 if region="Inland" |

region="Great Lakes" | region="Gulf of Mexico" then do;

897 *benefits

begin in first year for these regions;

898

x=i-&cyr.+&t0.; *e.g., if i=1 and cyr = 2011 and first year of rule is 2011 then

898 ! x=1 in 2011;

899 if

x<=0 then flowy_(i)=0; *x=1 in first year of compliance;

900 else

flowy_(i)=avgflow;

901 if _n_=1

then put "Not BASELINE";

27 The SAS System 12:35

Tuesday, March 22, 2011

902

903 if

x<=0 then bio(i)=0;

904 else if x=1

then bio(i)=.02;

905 else if x=2

then bio(i)=.06;

906 else if x=3

then bio(i)=.22;

907 else if x=4

then bio(i)=.4;

908 else if x=5

Page 28
p4com_main_03.21.11_log.txt

then bio(i)=.59;

909 else if x=6

then bio(i)=.77;

910 else if x=7

then bio(i)=.93;

911 else if x=8

then bio(i)=.97;

912 else if x=9

then bio(i)=.99;

913 else if x>=9

and i<=45 then bio(i)=1;

914 else if i=46

then bio(i)=.9;

915 else if i=47

then bio(i)=.8;

916 else if i=48

then bio(i)=.2;

917 else if i=49

then bio(i)=.1;

918 else if i=50

then bio(i)=0.05;

919 else if i>50

then bio(i)=0;

920

921 end;

922 else do;

923 *benefits

begin in second year for these regions;

924

x=i-&cyr.+&t0.; *e.g., if i=1 and cyr = 2011 and first year of rule is 2011 then

924 ! x=1 in 2012;

925 if

x<0 then flowy_(i)=0;*x=1 in second year of compliance;

926 else

flowy_(i)=avgflow;

927 if _n_=1

then put "Not BASELINE";

928

929 if

x<=0 then bio(i)=0;

930 else if x=1

then bio(i)=0;

931 else if x=2

then bio(i)=.02;

932 else if x=3

then bio(i)=.06;

933 else if x=4

then bio(i)=.22;

934 else if x=5

then bio(i)=.4;

935 else if x=6

then bio(i)=.59;

936 else if x=7

then bio(i)=.77;

937 else if x=8

then bio(i)=.93;

938 else if x=9

then bio(i)=.97;

939 else if x=10

then bio(i)=.99;

940 else if

x>=10 and i<=45 then bio(i)=1;

941 else if i=46

Page 29
p4com_main_03.21.11_log.txt

then bio(i)=.9;

942 else if i=47

then bio(i)=.8;

943 else if i=48

then bio(i)=.2;

944 else if i=49

then bio(i)=.1;

945 else if i=50

then bio(i)=0.05;

946 else if i>50

then bio(i)=0;

947 end;

948 end;

949 bschd(i)=(flowy_(i)*bio(i));

950 end;

951 format reg $30.;

952 if region="California"

then reg="calif";

953 else if region="Great Lakes"

then reg="greatlakes";

954 else if region="Gulf of Mexico"

then reg="gulfmexico";

28 The SAS System 12:35

Tuesday, March 22, 2011

955 else if region="Inland"

then reg="inland";

956 else if region="Mid-Atlantic"

then reg="midatlantic";

957 else if region="North Atlantic"

then reg="northatlantic";

958 else if region="South Atlantic"

then reg="southatlantic";

959

960 run;

961

962 * 5j2 calculate total average flow by region;

963 proc sql;

964 create table s5t as select

965 s3t.*,

966 sum(avgflow*newweight) as totalavgflow /*group flag*/

967 from s3t group by region;

968 quit;

969

970 * 5j3 generate flow and benefits schedule variables

(for each facility) as percentages to

970 ! total regional average flow;

971 data s6t (drop=bio_1-bio_60 flowy_1-flowy_60);

972 set s5t;

973 array flowy_(60) flowy_1-flowy_60;

974 array bschd(60) bschd_1-bschd_60;

975 do i=1 to 60;

976 if totalavgflow=0 then flowy_(i)=0;

977 else if totalavgflow~=0 then

flowy_(i)=newweight*flowy_(i)/totalavgflow;

978 if totalavgflow=0 then bschd(i)=0;

979 else if totalavgflow~=0 then

bschd(i)=newweight*bschd(i)/totalavgflow;

980 end;

981 run;

982

983 * 5j4 sort data by region;

984 proc sort data=s6t out=s7t; by region; run;

Page 30
p4com_main_03.21.11_log.txt

985

986 * 5j6 generate benefits schedule variable for

region, e.g., 1 = full benefits, .5 = 50%

986 ! of full benefits;

987 data s8t_&opt (keep=option region reg rbschd_1-rbschd_60);

988 retain option region reg rbschd_1-rbschd_60;

989 set s7t;

990 by region;

991 option="&opt";

992 array bschd(60) bschd_1-bschd_60;

993 array rbschd(60) rbschd_1-rbschd_60;

994 do i=1 to 60;

995 if first.region then

rbschd(i)=bschd(i);

996 else rbschd(i)+bschd(i);

997 end;

998 if last.region;

999 run;

1000 * 5j7: repeat 5j6 (for alternative presentation of

options);

1001 data s8t_&opt._0 (keep=option region reg rbschd_1-rbschd_60);

1002 retain option region reg rbschd_1-rbschd_60;

1003 set s7t;

1004 by region;

1005 option="&opt._0";

1006 array bschd(60) bschd_1-bschd_60;

29 The SAS System 12:35

Tuesday, March 22, 2011

1007 array rbschd(60) rbschd_1-rbschd_60;

1008 do i=1 to 60;

1009 if first.region then

rbschd(i)=bschd(i);

1010 else rbschd(i)+bschd(i);

1011 end;

1012 if last.region;

1013 run;

1014

1015 %mend;

1016 * 5j This macro calculates benefits schedule, incorporating the

biological lag and the lag

1016 ! in compliance;

1017 * 5k Generate dataset of Benefits Schedule By Option;

1018 %optionmac00;

NOTE: There were 889 observations read from the data set WORK.S2.

WHERE region not = 'Virgin Islands';

NOTE: The data set WORK.S3I has 889 observations and 192 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: The query requires remerging summary statistics back with the original data.

NOTE: Table WORK.S5I created, with 889 rows and 193 columns.

NOTE: PROCEDURE SQL used (Total process time):

real time 0.04 seconds

cpu time 0.04 seconds

NOTE: There were 889 observations read from the data set WORK.S5I.

Page 31
p4com_main_03.21.11_log.txt

NOTE: The data set WORK.S6I has 889 observations and 73 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 889 observations read from the data set WORK.S6I.

NOTE: The data set WORK.S7I has 889 observations and 73 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.03 seconds

cpu time 0.00 seconds

NOTE: There were 889 observations read from the data set WORK.S7I.

NOTE: The data set WORK.S8I_BASELINE has 7 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

30 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: There were 889 observations read from the data set WORK.S7I.

NOTE: The data set WORK.S8I_BASELINE_0 has 7 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Page 32
p4com_main_03.21.11_log.txt

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

31 The SAS System 12:35

Tuesday, March 22, 2011

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

NOTE: Missing values were generated as a result of performing an operation on

missing values.

Each place is given by: (Number of times) at (Line):(Column).

19320 at 1018:104 4320 at 1018:108

NOTE: There were 889 observations read from the data set WORK.S2.

WHERE region not = 'Virgin Islands';

NOTE: The data set WORK.S3I has 889 observations and 192 variables.

NOTE: DATA statement used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

NOTE: The query requires remerging summary statistics back with the original data.

NOTE: Table WORK.S5I created, with 889 rows and 193 columns.

NOTE: PROCEDURE SQL used (Total process time):

real time 0.04 seconds

cpu time 0.03 seconds

NOTE: There were 889 observations read from the data set WORK.S5I.

NOTE: The data set WORK.S6I has 889 observations and 73 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

Page 33
p4com_main_03.21.11_log.txt

NOTE: There were 889 observations read from the data set WORK.S6I.

NOTE: The data set WORK.S7I has 889 observations and 73 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 889 observations read from the data set WORK.S7I.

NOTE: The data set WORK.S8I_TMN1X has 7 observations and 63 variables.

NOTE: DATA statement used (Total process time):

32 The SAS System 12:35

Tuesday, March 22, 2011

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 889 observations read from the data set WORK.S7I.

NOTE: The data set WORK.S8I_TMN1X_0 has 7 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Page 34
p4com_main_03.21.11_log.txt

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

33 The SAS System 12:35

Tuesday, March 22, 2011

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

NOTE: Missing values were generated as a result of performing an operation on

missing values.

Each place is given by: (Number of times) at (Line):(Column).

19320 at 1018:104 4320 at 1018:108

NOTE: There were 889 observations read from the data set WORK.S2.

WHERE region not = 'Virgin Islands';

NOTE: The data set WORK.S3I has 697 observations and 192 variables.

NOTE: DATA statement used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

NOTE: The query requires remerging summary statistics back with the original data.

NOTE: Table WORK.S5I created, with 697 rows and 193 columns.

NOTE: PROCEDURE SQL used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

NOTE: There were 697 observations read from the data set WORK.S5I.

NOTE: The data set WORK.S6I has 697 observations and 73 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 697 observations read from the data set WORK.S6I.

NOTE: The data set WORK.S7I has 697 observations and 73 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

Page 35
p4com_main_03.21.11_log.txt

34 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: There were 697 observations read from the data set WORK.S7I.

NOTE: The data set WORK.S8I_TMN2X has 7 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 697 observations read from the data set WORK.S7I.

NOTE: The data set WORK.S8I_TMN2X_0 has 7 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

35 The SAS System 12:35

Tuesday, March 22, 2011

Not BASELINE

Not BASELINE

Not BASELINE

Page 36
p4com_main_03.21.11_log.txt

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

NOTE: Missing values were generated as a result of performing an operation on

missing values.

Each place is given by: (Number of times) at (Line):(Column).

19320 at 1018:104 4320 at 1018:108

NOTE: There were 889 observations read from the data set WORK.S2.

WHERE region not = 'Virgin Islands';

NOTE: The data set WORK.S3I has 500 observations and 192 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: The query requires remerging summary statistics back with the original data.

NOTE: Table WORK.S5I created, with 500 rows and 193 columns.

NOTE: PROCEDURE SQL used (Total process time):

real time 0.04 seconds

cpu time 0.03 seconds

NOTE: There were 500 observations read from the data set WORK.S5I.

NOTE: The data set WORK.S6I has 500 observations and 73 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 500 observations read from the data set WORK.S6I.

NOTE: The data set WORK.S7I has 500 observations and 73 variables.

NOTE: PROCEDURE SORT used (Total process time):

36 The SAS System 12:35

Tuesday, March 22, 2011

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 500 observations read from the data set WORK.S7I.

NOTE: The data set WORK.S8I_TMN3X has 7 observations and 63 variables.

NOTE: DATA statement used (Total process time):

Page 37
p4com_main_03.21.11_log.txt

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 500 observations read from the data set WORK.S7I.

NOTE: The data set WORK.S8I_TMN3X_0 has 7 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

37 The SAS System 12:35

Tuesday, March 22, 2011

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Page 38
p4com_main_03.21.11_log.txt

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

Not BASELINE

NOTE: Missing values were generated as a result of performing an operation on

missing values.

Each place is given by: (Number of times) at (Line):(Column).

19320 at 1018:104 4320 at 1018:108

NOTE: There were 889 observations read from the data set WORK.S2.

WHERE region not = 'Virgin Islands';

NOTE: The data set WORK.S3I has 889 observations and 192 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: The query requires remerging summary statistics back with the original data.

NOTE: Table WORK.S5I created, with 889 rows and 193 columns.

NOTE: PROCEDURE SQL used (Total process time):

real time 0.04 seconds

cpu time 0.03 seconds

NOTE: There were 889 observations read from the data set WORK.S5I.

NOTE: The data set WORK.S6I has 889 observations and 73 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

38 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: There were 889 observations read from the data set WORK.S6I.

NOTE: The data set WORK.S7I has 889 observations and 73 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 889 observations read from the data set WORK.S7I.

NOTE: The data set WORK.S8I_TMN4X has 7 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 889 observations read from the data set WORK.S7I.

NOTE: The data set WORK.S8I_TMN4X_0 has 7 observations and 63 variables.

Page 39
p4com_main_03.21.11_log.txt

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 7 observations read from the data set WORK.S8I_BASELINE.

NOTE: There were 7 observations read from the data set WORK.S8I_BASELINE_0.

NOTE: There were 7 observations read from the data set WORK.S8I_TMN1X.

NOTE: There were 7 observations read from the data set WORK.S8I_TMN1X_0.

NOTE: There were 7 observations read from the data set WORK.S8I_TMN2X.

NOTE: There were 7 observations read from the data set WORK.S8I_TMN2X_0.

NOTE: There were 7 observations read from the data set WORK.S8I_TMN3X.

NOTE: There were 7 observations read from the data set WORK.S8I_TMN3X_0.

NOTE: There were 7 observations read from the data set WORK.S8I_TMN4X.

NOTE: There were 7 observations read from the data set WORK.S8I_TMN4X_0.

NOTE: The data set WORK.STEP5IDATA has 70 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

1019 %optionmac11;

NOTE: Missing values were generated as a result of performing an operation on

missing values.

Each place is given by: (Number of times) at (Line):(Column).

124 at 1019:55

NOTE: There were 889 observations read from the data set WORK.S2.

WHERE region not = 'Virgin Islands';

NOTE: The data set WORK.S3T has 889 observations and 192 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

39 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: The query requires remerging summary statistics back with the original data.

NOTE: Table WORK.S5T created, with 889 rows and 193 columns.

NOTE: PROCEDURE SQL used (Total process time):

real time 0.04 seconds

cpu time 0.01 seconds

NOTE: Missing values were generated as a result of performing an operation on

missing values.

Each place is given by: (Number of times) at (Line):(Column).

124 at 1019:159 124 at 1019:168

NOTE: There were 889 observations read from the data set WORK.S5T.

NOTE: The data set WORK.S6T has 889 observations and 73 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 889 observations read from the data set WORK.S6T.

NOTE: The data set WORK.S7T has 889 observations and 73 variables.

NOTE: PROCEDURE SORT used (Total process time):

Page 40
p4com_main_03.21.11_log.txt

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 889 observations read from the data set WORK.S7T.

NOTE: The data set WORK.S8T_BASELINE has 7 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 889 observations read from the data set WORK.S7T.

NOTE: The data set WORK.S8T_BASELINE_0 has 7 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 889 observations read from the data set WORK.S2.

WHERE region not = 'Virgin Islands';

NOTE: The data set WORK.S3T has 0 observations and 192 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: The query requires remerging summary statistics back with the original data.

NOTE: Table WORK.S5T created, with 0 rows and 193 columns.

40 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: PROCEDURE SQL used (Total process time):

real time 0.01 seconds

cpu time 0.03 seconds

NOTE: There were 0 observations read from the data set WORK.S5T.

NOTE: The data set WORK.S6T has 0 observations and 73 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: Input data set is empty.

NOTE: The data set WORK.S7T has 0 observations and 73 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 0 observations read from the data set WORK.S7T.

NOTE: The data set WORK.S8T_TMN1X has 0 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

Page 41
p4com_main_03.21.11_log.txt

NOTE: There were 0 observations read from the data set WORK.S7T.

NOTE: The data set WORK.S8T_TMN1X_0 has 0 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 889 observations read from the data set WORK.S2.

WHERE region not = 'Virgin Islands';

NOTE: The data set WORK.S3T has 192 observations and 192 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: The query requires remerging summary statistics back with the original data.

NOTE: Table WORK.S5T created, with 192 rows and 193 columns.

NOTE: PROCEDURE SQL used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

41 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: There were 192 observations read from the data set WORK.S5T.

NOTE: The data set WORK.S6T has 192 observations and 73 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 192 observations read from the data set WORK.S6T.

NOTE: The data set WORK.S7T has 192 observations and 73 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

NOTE: There were 192 observations read from the data set WORK.S7T.

NOTE: The data set WORK.S8T_TMN2X has 7 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 192 observations read from the data set WORK.S7T.

NOTE: The data set WORK.S8T_TMN2X_0 has 7 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 889 observations read from the data set WORK.S2.

Page 42
p4com_main_03.21.11_log.txt

WHERE region not = 'Virgin Islands';

NOTE: The data set WORK.S3T has 389 observations and 192 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: The query requires remerging summary statistics back with the original data.

NOTE: Table WORK.S5T created, with 389 rows and 193 columns.

NOTE: PROCEDURE SQL used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

NOTE: There were 389 observations read from the data set WORK.S5T.

NOTE: The data set WORK.S6T has 389 observations and 73 variables.

NOTE: DATA statement used (Total process time):

42 The SAS System 12:35

Tuesday, March 22, 2011

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 389 observations read from the data set WORK.S6T.

NOTE: The data set WORK.S7T has 389 observations and 73 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 389 observations read from the data set WORK.S7T.

NOTE: The data set WORK.S8T_TMN3X has 7 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 389 observations read from the data set WORK.S7T.

NOTE: The data set WORK.S8T_TMN3X_0 has 7 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 889 observations read from the data set WORK.S2.

WHERE region not = 'Virgin Islands';

NOTE: The data set WORK.S3T has 0 observations and 192 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: The query requires remerging summary statistics back with the original data.

NOTE: Table WORK.S5T created, with 0 rows and 193 columns.

NOTE: PROCEDURE SQL used (Total process time):

Page 43
p4com_main_03.21.11_log.txt

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 0 observations read from the data set WORK.S5T.

NOTE: The data set WORK.S6T has 0 observations and 73 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

43 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: Input data set is empty.

NOTE: The data set WORK.S7T has 0 observations and 73 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 0 observations read from the data set WORK.S7T.

NOTE: The data set WORK.S8T_TMN4X has 0 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 0 observations read from the data set WORK.S7T.

NOTE: The data set WORK.S8T_TMN4X_0 has 0 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 7 observations read from the data set WORK.S8T_BASELINE.

NOTE: There were 7 observations read from the data set WORK.S8T_BASELINE_0.

NOTE: There were 0 observations read from the data set WORK.S8T_TMN1X.

NOTE: There were 0 observations read from the data set WORK.S8T_TMN1X_0.

NOTE: There were 7 observations read from the data set WORK.S8T_TMN2X.

NOTE: There were 7 observations read from the data set WORK.S8T_TMN2X_0.

NOTE: There were 7 observations read from the data set WORK.S8T_TMN3X.

NOTE: There were 7 observations read from the data set WORK.S8T_TMN3X_0.

NOTE: There were 0 observations read from the data set WORK.S8T_TMN4X.

NOTE: There were 0 observations read from the data set WORK.S8T_TMN4X_0.

NOTE: The data set WORK.STEP5TDATA has 42 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

1020

*********************************************************************************

1021

*********************************************************************************

1022 NEED TO MANIPULATE Step5data in order to implement impingement fraction;

1023 *need to rename array functions in the Step5idata and Step5data;

1024

Page 44
p4com_main_03.21.11_log.txt

1025 Data step5idata;

1026 SET step5idata;

1027 array rbschd_(60) rbschd_1 - rbschd_60;

1028 array rbschd_i_(60) rbschd_i_1 - rbschd_i_60;

1029 do i=1 to 60;

1030 rbschd_i_(i)=rbschd_(i);

1031 IF rbschd_i_(i)="." then rbschd_i_(i)=0;

1032 end;

1033 drop rbschd_1-rbschd_60 i;

44 The SAS System 12:35

Tuesday, March 22, 2011

1034 if region="" then delete;

1035 RUN;

NOTE: Character values have been converted to numeric values at the places given by:

(Line):(Column).

1031:18

NOTE: There were 70 observations read from the data set WORK.STEP5IDATA.

NOTE: The data set WORK.STEP5IDATA has 70 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

1036 Data step5tdata;

1037 SET step5tdata;

1038 array rbschd_(60) rbschd_1 - rbschd_60;

1039 array rbschd_t_(60) rbschd_t_1 - rbschd_t_60;

1040 do i=1 to 60;

1041 rbschd_t_(i)=rbschd_(i);

1042 IF rbschd_t_(i)="." then rbschd_t_(i)=0;

1043 end;

1044 drop rbschd_1-rbschd_60 i;

1045 if region="" then delete;

1046 RUN;

NOTE: Character values have been converted to numeric values at the places given by:

(Line):(Column).

1042:18

NOTE: There were 42 observations read from the data set WORK.STEP5TDATA.

NOTE: The data set WORK.STEP5TDATA has 42 observations and 63 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

1047 PROC SORT data=step5idata out=step5idata;

1048 by option region reg;

1049 RUN;

NOTE: There were 70 observations read from the data set WORK.STEP5IDATA.

NOTE: The data set WORK.STEP5IDATA has 70 observations and 63 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.09 seconds

cpu time 0.00 seconds

1050 PROC SORT data=step5tdata out=step5tdata;

1051 by option region reg;

1052 RUN;

NOTE: There were 42 observations read from the data set WORK.STEP5TDATA.

Page 45
p4com_main_03.21.11_log.txt

NOTE: The data set WORK.STEP5TDATA has 42 observations and 63 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

45 The SAS System 12:35

Tuesday, March 22, 2011

1053 Data step5data;

1054 merge step5idata step5tdata;

1055 by option region reg;

1056 RUN;

NOTE: There were 70 observations read from the data set WORK.STEP5IDATA.

NOTE: There were 42 observations read from the data set WORK.STEP5TDATA.

NOTE: The data set WORK.STEP5DATA has 70 observations and 123 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

1057 ****reorganize reductions_detail sheet;

1058 Data reductions_detail_1;

1059 set reductions_detail;

1060 format option $20.;

1061 impingement_fraction_imp = (1-ccr_fraction_imp);

1062 if option_name="option.tmn1" then option="tmn1x";

1063 if option_name="option.tmn2" then option="tmn2x";

1064 if option_name="option.tmn3" then option="tmn3x";

1065 if option_name="option.tmn4" then option="tmn4x";

1066 option_name=option;

1067 reg=region;

1068 DROP ccr_fraction_imp option_name region benefit_value_regional_imp;

1069 RUN;

WARNING: The variable benefit_value_regional_imp in the DROP, KEEP, or RENAME list

has never been

referenced.

NOTE: There were 28 observations read from the data set WORK.REDUCTIONS_DETAIL.

NOTE: The data set WORK.REDUCTIONS_DETAIL_1 has 28 observations and 3 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

1070 Data reductions_detail_2;

1071 set reductions_detail;

1072 format option $20.;

1073 impingement_fraction_imp = (1-ccr_fraction_imp);

1074 if option_name="option.tmn1" then option="tmn1x_0";

1075 if option_name="option.tmn2" then option="tmn2x_0";

1076 if option_name="option.tmn3" then option="tmn3x_0";

1077 if option_name="option.tmn4" then option="tmn4x_0";

1078 option_name=option;

1079 reg=region;

1080 DROP ccr_fraction_imp option_name region;

1081 RUN;

NOTE: There were 28 observations read from the data set WORK.REDUCTIONS_DETAIL.

NOTE: The data set WORK.REDUCTIONS_DETAIL_2 has 28 observations and 3 variables.

NOTE: DATA statement used (Total process time):

real time 0.10 seconds

Page 46
p4com_main_03.21.11_log.txt

46 The SAS System 12:35

Tuesday, March 22, 2011

cpu time 0.01 seconds

1082 Data reductions_detail_3;

1083 set reductions_detail_1 reductions_detail_2;

1084 RUN;

NOTE: There were 28 observations read from the data set WORK.REDUCTIONS_DETAIL_1.

NOTE: There were 28 observations read from the data set WORK.REDUCTIONS_DETAIL_2.

NOTE: The data set WORK.REDUCTIONS_DETAIL_3 has 56 observations and 3 variables.

NOTE: DATA statement used (Total process time):

real time 0.09 seconds

cpu time 0.00 seconds

1085 Proc sort data=reductions_detail_3 out=reductions_detail_3;

1086 by option reg;

1087 RUN;

NOTE: There were 56 observations read from the data set WORK.REDUCTIONS_DETAIL_3.

NOTE: The data set WORK.REDUCTIONS_DETAIL_3 has 56 observations and 3 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.21 seconds

cpu time 0.00 seconds

1088 Data step5data_1;

1089 merge step5data reductions_detail_3;

1090 by option reg;

1091 RUN;

NOTE: There were 70 observations read from the data set WORK.STEP5DATA.

NOTE: There were 56 observations read from the data set WORK.REDUCTIONS_DETAIL_3.

NOTE: The data set WORK.STEP5DATA_1 has 70 observations and 124 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

1092 Data step5data_1;

1093 set step5data_1;

1094 if impingement_fraction_imp="." then impingement_fraction_imp=1;

1095 RUN;

NOTE: Character values have been converted to numeric values at the places given by:

(Line):(Column).

1094:30

NOTE: There were 70 observations read from the data set WORK.STEP5DATA_1.

NOTE: The data set WORK.STEP5DATA_1 has 70 observations and 124 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

1096 Data step5data_2;

47 The SAS System 12:35

Tuesday, March 22, 2011

1097 set step5data_1;

1098 array rbschd_i_(60) rbschd_i_1 - rbschd_i_60;

Page 47
p4com_main_03.21.11_log.txt

1099 array rbschd_t_(60) rbschd_t_1 - rbschd_t_60;

1100 array rbschd_adj_(60) rbschd_adj_1 - rbschd_adj_60;

1101 do i=1 to 60;

1102 if rbschd_i_(i)= "." then rbschd_i_(i)=0;

1103 if rbschd_t_(i)= "." then rbschd_t_(i)=0;

1104

rbschd_adj_(i)=impingement_fraction_imp*rbschd_i_(i)+(1-impingement_fraction_imp)*rb

schd_t

1104 ! _(i);

1105 END;

1106 DROP rbschd_i_1-rbschd_i_60 impingement_fraction_imp i;

1107 RUN;

NOTE: Character values have been converted to numeric values at the places given by:

(Line):(Column).

1102:19 1103:19

NOTE: There were 70 observations read from the data set WORK.STEP5DATA_1.

NOTE: The data set WORK.STEP5DATA_2 has 70 observations and 123 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

1108 Data step5data_2imp;

1109 set step5data_2;

1110 drop rbschd_t_1-rbschd_t_60;

1111 lossmode="imp";

1112 array rbschd_adj_(60) rbschd_adj_1-rbschd_adj_60;

1113 array rbschd_(60) rbschd_1-rbschd_60;

1114 do i=1 to 60;

1115 rbschd_(i)=rbschd_adj_(i);

1116 END;

1117 Drop rbschd_adj_1-rbschd_adj_60 i;

1118 if option="tmn1x" then option="tmn1";

1119 if option="tmn2x" then option="tmn2";

1120 if option="tmn3x" then option="tmn3";

1121 if option="tmn4x" then option="tmn4";

1122 if option="tmn1x_0" then option="tmn1_0";

1123 if option="tmn2x_0" then option="tmn2_0";

1124 if option="tmn3x_0" then option="tmn3_0";

1125 if option="tmn4x_0" then option="tmn4_0";

1126 RUN;

NOTE: There were 70 observations read from the data set WORK.STEP5DATA_2.

NOTE: The data set WORK.STEP5DATA_2IMP has 70 observations and 64 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

1127 Data step5data_2ent;

1128 set step5data_2;

1129 drop rbschd_adj_1-rbschd_adj_60;

1130 lossmode="ent";

1131 array rbschd_t_(60) rbschd_t_1-rbschd_t_60;

48 The SAS System 12:35

Tuesday, March 22, 2011

1132 array rbschd_(60) rbschd_1-rbschd_60;

1133 do i=1 to 60;

1134 rbschd_(i)=rbschd_t_(i);

1135 END;

1136 Drop rbschd_t_1-rbschd_t_60 i;

Page 48
p4com_main_03.21.11_log.txt

1137 if option="tmn1x" then option="tmn1";

1138 if option="tmn2x" then option="tmn2";

1139 if option="tmn3x" then option="tmn3";

1140 if option="tmn4x" then option="tmn4";

1141 if option="tmn1x_0" then option="tmn1_0";

1142 if option="tmn2x_0" then option="tmn2_0";

1143 if option="tmn3x_0" then option="tmn3_0";

1144 if option="tmn4x_0" then option="tmn4_0";

1145 RUN;

NOTE: There were 70 observations read from the data set WORK.STEP5DATA_2.

NOTE: The data set WORK.STEP5DATA_2ENT has 70 observations and 64 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

1146

1147 Data step5data_3;

1148 set step5data_2imp step5data_2ent;

1149 optionname=option;

1150 *if reg="calif" then region="California";

1151 *if reg="greatlakes" then region="Great Lakes";

1152 *if reg="gulfmexico" then region="Gulf of Mexico";

1153 *if reg="inland" then region="Inland";

1154 *if reg="midatlantic" then region="Mid-Atlantic";

1155 *if reg="northatlantic" then region="North Atlantic";

1156 region=reg;

1157 RUN;

NOTE: There were 70 observations read from the data set WORK.STEP5DATA_2IMP.

NOTE: There were 70 observations read from the data set WORK.STEP5DATA_2ENT.

NOTE: The data set WORK.STEP5DATA_3 has 140 observations and 65 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

1158

1159 *****************************************************************

1160 *****************************************************************

1161 Make changes related to repowering schedule;

1162

1163 %import(&inloc.&input2,rep_adj,rep_adj);

NOTE: WORK.REP_ADJ data set was successfully created.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 2.88 seconds

cpu time 0.42 seconds

49 The SAS System 12:35

Tuesday, March 22, 2011

1164 %import(&inloc.&input,rpschd,rpschd);

NOTE: WORK.RPSCHD data set was successfully created.

NOTE: PROCEDURE IMPORT used (Total process time):

real time 2.78 seconds

cpu time 0.23 seconds

1165

Page 49
p4com_main_03.21.11_log.txt

1166 Proc sort data=rep_adj out=rep_adj;

1167 by option;

1168 RUN;

NOTE: There were 240 observations read from the data set WORK.REP_ADJ.

NOTE: The data set WORK.REP_ADJ has 240 observations and 4 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

1169 Proc sort data=rpschd out=rpschd;

1170 by option;

1171 RUN;

NOTE: There were 10 observations read from the data set WORK.RPSCHD.

NOTE: The data set WORK.RPSCHD has 10 observations and 61 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

1172

1173 Data repow;

1174 merge rep_adj rpschd;

1175 by option;

1176 adj=1/rp_adj;

1177 drop rp_adj;

1178 RUN;

NOTE: There were 240 observations read from the data set WORK.REP_ADJ.

NOTE: There were 10 observations read from the data set WORK.RPSCHD.

NOTE: The data set WORK.REPOW has 240 observations and 64 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

1179

1180 Data repow_1;

1181 set repow;

1182 array rpschd_(60) rpschd_1-rpschd_60;

1183 array rpschd_adj_(60) rpschd_adj_1-rpschd_adj_60;

50 The SAS System 12:35

Tuesday, March 22, 2011

1184 do i=1 to 60;

1185 rpschd_adj_(i)=rpschd_(i)*(1-adj);

1186 if rpschd_(i)=0 then rpschd_adj_(i)=0;

1187 end;

1188 drop rp_adj rpschd_1-rpschd_60 i;

1189 if lossmode="ie" then delete;

1190 if region="zz.allregions" then delete;

1191 RUN;

WARNING: The variable rp_adj in the DROP, KEEP, or RENAME list has never been

referenced.

NOTE: There were 240 observations read from the data set WORK.REPOW.

NOTE: The data set WORK.REPOW_1 has 140 observations and 64 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

Page 50
p4com_main_03.21.11_log.txt

1192

1193 Proc Sort data=repow_1 out=repow_1;

1194 by option region lossmode;

1195 RUN;

NOTE: There were 140 observations read from the data set WORK.REPOW_1.

NOTE: The data set WORK.REPOW_1 has 140 observations and 64 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

1196

1197 PROC SORT data=step5data_3 out=step5data_3;

1198 by option region lossmode;

1199 RUN;

NOTE: There were 140 observations read from the data set WORK.STEP5DATA_3.

NOTE: The data set WORK.STEP5DATA_3 has 140 observations and 65 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

1200

1201 Data step5data_4;

1202 merge step5data_3 repow_1;

1203 by option region lossmode;

1204 RUN;

NOTE: There were 140 observations read from the data set WORK.STEP5DATA_3.

NOTE: There were 140 observations read from the data set WORK.REPOW_1.

NOTE: The data set WORK.STEP5DATA_4 has 140 observations and 126 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

51 The SAS System 12:35

Tuesday, March 22, 2011

1205

1206 Data step5data_5;

1207 set step5data_4;

1208 array rbschd_(60) rbschd_1-rbschd_60;

1209 array rpschd_adj_(60) rpschd_adj_1-rpschd_adj_60;

1210 array com_schd_(60) com_schd_1-com_schd_60;

1211 do i=1 to 60;

1212 com_schd_(i) = adj*rbschd_(i) + rpschd_adj_(i);

1213 rbschd_(i)=com_schd_(i);

1214 END;

1215 drop i adj com_schd_1-com_schd_60 rpschd_adj_1-rpschd_adj_60;

1216 RUN;

NOTE: There were 140 observations read from the data set WORK.STEP5DATA_4.

NOTE: The data set WORK.STEP5DATA_5 has 140 observations and 65 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

1217 ********************************************************************

Page 51
p4com_main_03.21.11_log.txt

1218 END OF REPOWERING CALCULATIONS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

1219 ********************************************************************;

1220

1221

1222

1223 *to be merged with step6data;

1224

**********************************************************************************

1225 *create separate step4data files for the different options;

1226 Data step4data;

1227 length option $20;

1228 set step4data;

1229 RUN;

NOTE: There were 765 observations read from the data set WORK.STEP4DATA.

NOTE: The data set WORK.STEP4DATA has 765 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

1230

1231 Data step4data_1;

1232 length option $20;

1233 set step4data;

1234 if option="baseline" then option="baseline_0";

1235 if option="tmn1" then option="tmn1_0";

1236 if option="tmn2" then option="tmn2_0";

1237 if option="tmn3" then option="tmn3_0";

1238 if option="tmn4" then option="tmn4_0";

1239 RUN;

NOTE: There were 765 observations read from the data set WORK.STEP4DATA.

52 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: The data set WORK.STEP4DATA_1 has 765 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

1240

1241 Data step4data_2;

1242 set step4data step4data_1;

1243 RUN;

NOTE: There were 765 observations read from the data set WORK.STEP4DATA.

NOTE: There were 765 observations read from the data set WORK.STEP4DATA_1.

NOTE: The data set WORK.STEP4DATA_2 has 1530 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

1244

1245 Proc sort data=step4data_2 out=step4data_2;

1246 by option region lossmode;

1247

NOTE: There were 1530 observations read from the data set WORK.STEP4DATA_2.

NOTE: The data set WORK.STEP4DATA_2 has 1530 observations and 12 variables.

NOTE: PROCEDURE SORT used (Total process time):

Page 52
p4com_main_03.21.11_log.txt

real time 0.01 seconds

cpu time 0.01 seconds

1248 Data s6;

1249 merge step4data_2 step5data_5;

1250 by option region lossmode;

1251 RUN;

WARNING: Multiple lengths were specified for the BY variable option by input data

sets. This may

cause unexpected results.

WARNING: Multiple lengths were specified for the BY variable region by input data

sets. This may

cause unexpected results.

NOTE: There were 1530 observations read from the data set WORK.STEP4DATA_2.

NOTE: There were 140 observations read from the data set WORK.STEP5DATA_5.

NOTE: The data set WORK.S6 has 1574 observations and 74 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

1252

1253 * 6 Join Price, Quantiy, and Losses data With Benefits Schedule By

Option;

1254 *proc sql;

1255 *create table s6 (drop=option reg) as select

1256 %optionmac1 ,

1257 st4.region,

53 The SAS System 12:35

Tuesday, March 22, 2011

1258 st4.re,

1259 st4.cfspecies,

1260 st4.species_econ,

1261 st4.lossmode,

1262 st4.rpercent format=percent12.2,

1263 st4.reduction format=comma20.0,

1264 st4.ABT_NB_Ratio,

1265 st4.oldlbs,

1266 st4.price2008,

1267 st4.dollars2008,

1268 st5.*

1269 from Step4data as st4 left join Step5data (keep=option reg

rbschd_1-rbschd_60) as st5 on

1270 st4.region=st5.reg

1271 ORDER by

st5.option,st4.region,st4.cfspecies,st4.species_econ,st4.lossmode;

1272 *quit;*/

1273

1274 * 6a delete uneeded data;

1275 *data s6a;

1276 * set s6;

1277 * if optionname~="delete";

1278 *run;

1279

1280 * 6b sort data;

1281 proc sort data=s6 out=step6data;

1282 by optionname region re cfspecies species_econ lossmode

rpercent

1283 reduction ABT_NB_Ratio oldlbs price2008 dollars2008;

1284 run;

Page 53
p4com_main_03.21.11_log.txt

NOTE: There were 1574 observations read from the data set WORK.S6.

NOTE: The data set WORK.STEP6DATA has 1574 observations and 74 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

1285 data step6data_1;

1286 set step6data;

1287 if species_econ="" then delete;

1288 RUN;

NOTE: There were 1574 observations read from the data set WORK.STEP6DATA.

NOTE: The data set WORK.STEP6DATA_1 has 1530 observations and 74 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

1289

1290 ****************************

1291 REPLACE schedule within step6data with fraction adjusted schedule;

1292 *Proc Sort data=step6data out=step6data;

1293 * by optionname region lossmode;

1294 *RUN;

1295

54 The SAS System 12:35

Tuesday, March 22, 2011

1296 *Data step6data_1;

1297 * set step6data;

1298 * drop rbschd_1-rbschd_60;

1299 *RUN;

1300 *Data step6data_2;

1301 * merge step6data_1 step5data_3;

1302 * by optionname region lossmode;

1303 *RUN;

1304 *proc sort data=step6data_2 out=step6data_2;

1305 * by optionname region re cfspecies species_econ lossmode rpercent

1306 * reduction ABT_NB_Ratio oldlbs price2008 dollars2008;

1307 *RUN;

1308

1309 * 7 Calculate Consumer and Producer Surplus For Years 1-15,

1310 total over 15 years, and annualized over 15 years;

1311

1312 * 7a Reshape data so from wide to long;

1313 proc transpose data=step6data_1 out=long6;

1314 by optionname region re cfspecies species_econ lossmode

rpercent

1315 reduction ABT_NB_Ratio oldlbs price2008 dollars2008;

1316 run;

NOTE: There were 1530 observations read from the data set WORK.STEP6DATA_1.

NOTE: The data set WORK.LONG6 has 91800 observations and 14 variables.

NOTE: PROCEDURE TRANSPOSE used (Total process time):

real time 0.25 seconds

cpu time 0.06 seconds

1317

1318 * 7b reformat long-shaped data;

1319 * adjust based on capping rules;

Page 54
p4com_main_03.21.11_log.txt

1320 data long7 (drop=_name_ col1 oldreduction) check1 (keep=region

cfspecies);

1321 set long6;

1322 rbschd=col1;

1323 year=input(substr(_name_,8,2),2.0);

1324 oldreduction=reduction;

1325 reduction=&capdefinition.;

1326 If region = "calif" and species_econ = "cabezon" then reduction =

min(reduction, 10000000)

1326 ! ; * These are the difference between the cap and baseilne harvest;

1327 If region = "calif" and species_econ = "california.halibut" then

reduction =

1327 ! min(reduction, 10000000);

1328 If region = "calif" and species_econ = "sculpins" then reduction =

min(reduction,

1328 ! 10000000);

1329 If region = "northatlantic" and species_econ = "sculpins" then

reduction = min(reduction,

1329 ! 3978);

1330 If region = "midatlantic" and species_econ = "spot" then reduction =

min(reduction,

1330 ! 1111434);

1331

1332 if oldreduction~=reduction then output check1;

1333 output long7;

1334 run;

NOTE: There were 91800 observations read from the data set WORK.LONG6.

55 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: The data set WORK.LONG7 has 91800 observations and 14 variables.

NOTE: The data set WORK.CHECK1 has 1440 observations and 2 variables.

NOTE: DATA statement used (Total process time):

real time 5.51 seconds

cpu time 0.10 seconds

1335

1336 data long7a;

1337 set long7;

1338

1339 if cfspecies in

("com.crabs","dungeness.crab","blue.crab","stone.crab")

1340 then elasticity=&Elast_crabs;

1341 else if cfspecies in ("pink.shrimp","pink

shrimp","com.shrimp")

1342 then elasticity=&Elast_shrimp;

1343 *else if region="greatlakes" | cfspecies="blank"

1344 then elasticity=.;

1345 else if region~="greatlakes" & cfspecies~="blank"

1346 then elasticity=&Elast_saltwater;

1347 run;

NOTE: There were 91800 observations read from the data set WORK.LONG7.

NOTE: The data set WORK.LONG7A has 91800 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.79 seconds

cpu time 0.11 seconds

1348

Page 55
p4com_main_03.21.11_log.txt

1349 proc sql;

1350 create table check2 as select

1351 region,cfspecies,count(region) as count

1352 from check1 group by region,cfspecies;

NOTE: Table WORK.CHECK2 created, with 2 rows and 3 columns.

1353 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

1354 %export(check2,"&outloc.&output.",binding);

NOTE: File "h:\ERD\TYCHE Contract\Assignments\WA 2-15 (316b Benefits & SP

Study)\Task 5 - Benefits

Analytic Support\IE_032111\Com\Outputs\P2.08 ComBenOutputs_22MAR11.xls" will

be created if the

export process succeeds.

NOTE: "BINDING" range/sheet was successfully created.

NOTE: PROCEDURE EXPORT used (Total process time):

real time 1.26 seconds

cpu time 0.10 seconds

1355

1356 * 7c Calculate Consumer and Producer Surplus For Years

1-50;

56 The SAS System 12:35

Tuesday, March 22, 2011

1357 data long8;

1358 set long7a;

1359 /*if cfspecies in

("com.crabs","dungeness.crab","blue.crab","stone.crab")

1360 then elasticity=&Elast_crabs;

1361 else if cfspecies in ("pink.shrimp","pink

shrimp","com.shrimp")

1362 then elasticity=&Elast_shrimp;

1363 *else if region="greatlakes" | cfspecies="blank"

1364 then elasticity=.;

1365 else if region~="greatlakes" & cfspecies~="blank"

1366 then elasticity=&Elast_saltwater;

1367 /*

1368 if re="CA" and species_econ="cabezon"

then negprice=1;

1369 else if re="CA" and species_econ="rockfishes"

then negprice=1;

1370 else if re="CA" and species_econ="sculpins"

then negprice=1;

1371 else if re="GM" and species_econ="spot"

then negprice=1;

1372 else if re="GM" and species_econ="stone.crab"

then negprice=1;

1373 else if re="NA" and species_econ="sculpins"

then negprice=1;

1374 else if re="SA" and species_econ="spot"

then negprice=1;

1375 */

1376 %macro undiscsurplus(opt,ievar,iepercent);

1377 if optionname="&opt" then do; *(dont

perform for irrelevent options);

1378 /*FLAG Rule of Thumb*/*if

Page 56
p4com_main_03.21.11_log.txt

region~="greatlakes" and cfspecies~="blank" and negprice~=1

1378 ! then do;*(saltwater species with landings data have consumer surplus);

1379 if 1=2 then do; /*FLAG Rule

of Thumb*/

1380 if &ievar.~=. and

&ievar.~=0 then do;

1381

percent=&iepercent.; *elimination or reduction;

1382

IEchange=&ievar.; *elimination or reduction;

1383

lbs=&ievar.*rbschd+oldlbs; *post-I&E reduction harvest;

1384

price=price2008*((lbs/oldlbs-1)/elasticity+1); *post-I&E reduction price;

1385

CS=((price2008-price)*oldlbs+0.5*(price2008-price)*

1386

(lbs-oldlbs))*&iepercent.; *post-I&E reduction Consumer surp;

1387

GR=price*lbs-price2008*oldlbs; *post-I&E reduction Gross revenue (not adjusted for

1387 ! imp/ent and species);

1388

PS=GR*ABT_NB_Ratio*&iepercent.; *post-I&E reduction Producer surp;

1389 TS=CS+PS;

*post-I&E reduction welfare gain;

1390 end;

1391 else do; *do if

there is no reduction;

1392 percent=.;

1393 IEchange=.;

1394 lbs=oldlbs;

1395

price=price2008;

1396 CS=0;

1397 GR=0;

1398 PS=0;

1399 TS=CS+PS;

1400 end;

1401 end;

1402

1403 *for great lakes assume that

the consumer surplus is equal to the percentage change

1404 in the catch multiplied by

the dockside value of the catch before the change.

1405 based on bishop and holt

(2003);

1406 /*FLAG Rule of Thumb*/*else

if region="greatlakes" and cfspecies~="blank" and

1406 ! negprice~=1 then do;

1407 *else if cfspecies~="blank"

and negprice~=1 then do;/*FLAG Rule of Thumb*/

57 The SAS System 12:35

Tuesday, March 22, 2011

1408 else if 1=2 then do;/*FLAG

Rule of Thumb*/

1409

1410 if &ievar.~=. and

&ievar.~=0 then do;

1411

percent=&iepercent.;

1412

IEchange=&ievar.;

Page 57
p4com_main_03.21.11_log.txt

1413

lbs=&ievar.*rbschd+oldlbs;

1414

CSz=(lbs/oldlbs-1)*dollars2008;

1415

CS=CSz*percent;

1416 if CS~=0

then do;

1417

price = (1/2*(price2008*oldlbs+price2008*lbs)-CSz)/(.5*(lbs+oldlbs));

1418

elasticity=(lbs/oldlbs-1)/(price/price2008-1);

1419 end;

1420 else do;

1421

price=price2008;

1422 end;

1423

GR=price*lbs-price2008*oldlbs;

1424

PS=GR*ABT_NB_Ratio*percent;

1425 TS=CS+PS;

1426 end;

1427 else do;

1428 percent=.;

1429 IEchange=.;

1430 lbs=oldlbs;

1431

elasticity=.;

1432

price=price2008;

1433 CS=0;

1434 GR=0;

1435 PS=0;

1436 TS=CS+PS;

1437 end;

1438 end;

1439 *for species where landings

data are missing assume there is no consumer surplus

1440 and estimate producer

surplus assuming no change in prices;

1441 *else if cfspecies="blank" |

negprice=1 then do;

1442 else if 1=1 then do;

1443 if &ievar.~=. and

&ievar.~=0 then do;

1444

percent=&iepercent.;

1445

IEchange=&ievar.;

1446

lbs=&ievar.*rbschd+oldlbs;

1447

elasticity=.;

1448 CS=0;

1449

price=price2008;

1450

GR=price*IEchange*rbschd;

1451

PS=GR*ABT_NB_Ratio*&iepercent.;

1452 TS=CS+PS;

1453 end;

Page 58
p4com_main_03.21.11_log.txt

1454 else do;

1455 percent=.;

1456 IEchange=.;

1457 lbs=oldlbs;

1458

elasticity=.;

1459

price=price2008;

1460 CS=0;

1461 GR=0;

58 The SAS System 12:35

Tuesday, March 22, 2011

1462 PS=0;

1463 TS=CS+PS;

1464 end;

1465 end;

1466 end;

1467 ****************;

1468 ****************;

1469 *Alternatively, for all

species, assume there is no consumer surplus

1470 and estimate producer

surplus assuming no change in prices;

1471 if optionname="&opt._0" then do;

1472 if &ievar.~=. and

&ievar.~=0 then do;

1473

percent=&iepercent.;

1474

IEchange=&ievar.;

1475 lbs=oldlbs;

1476

elasticity=0;

1477 CS=0;

1478

price=price2008;

1479

GR=price*IEchange*rbschd;

1480

PS=GR*ABT_NB_Ratio*&iepercent.;

1481 TS=CS+PS;

1482 end;

1483 else do;

1484 percent=.;

1485 IEchange=.;

1486 lbs=oldlbs;

1487

elasticity=.;

1488

price=price2008;

1489 CS=0;

1490 GR=0;

1491 PS=0;

1492 TS=CS+PS;

1493 end;

1494 end;

1495 ****************;

1496 ****************;

1497 %mend;

1498 %optionmac2;

1499 *Calculate discounted welfare variables for 3 and 7

percent;

Page 59
p4com_main_03.21.11_log.txt

1500 %macro discounted(r);

1501 CS&r. =

CS/(1.0&r.**(year-1));

1502 PS&r. =

PS/(1.0&r.**(year-1));

1503 TS&r. =

TS/(1.0&r.**(year-1));

1504 %mend;

1505 %discounted(3);

1506 %discounted(7);

1507

1508 if price<0 then put "flag error the price is " price

" for region = " re " and species =

1508 ! " species_econ;

1509

1510 run;

NOTE: There were 91800 observations read from the data set WORK.LONG7A.

NOTE: The data set WORK.LONG8 has 91800 observations and 30 variables.

NOTE: DATA statement used (Total process time):

59 The SAS System 12:35

Tuesday, March 22, 2011

real time 3.96 seconds

cpu time 0.22 seconds

1511

1512 * 7d Calculate Consumer and Producer Surplus For All

Years (year=61);

1513 proc sql;

1514 create table long61 as select

1515 optionname,region,re,cfspecies,species_econ,lossmode,

1516 iechange,percent,

1517 ABT_NB_Ratio,oldlbs,price2008,dollars2008,

1518 61 as year,

1519

1520 sum(CS) as CS,

1521 sum(PS) as PS,

1522 sum(TS) as TS,

1523 sum(CS3) as CS3,

1524 sum(PS3) as PS3,

1525 sum(TS3) as TS3,

1526 sum(CS7) as CS7,

1527 sum(PS7) as PS7,

1528 sum(TS7) as TS7

1529 from long8 group by

1530 optionname,region,re,cfspecies,species_econ,lossmode,

1531 iechange,percent,

1532 ABT_NB_Ratio,oldlbs,price2008,dollars2008;

NOTE: Table WORK.LONG61 created, with 1530 rows and 22 columns.

1533 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.17 seconds

cpu time 0.25 seconds

1534

1535 * 7e Annualized 41-year Benefit (year=52);

1536 proc sql;

1537 create table long62 as select

1538 optionname,region,re,cfspecies,species_econ,lossmode,

Page 60
p4com_main_03.21.11_log.txt

1539 iechange,percent,

1540 ABT_NB_Ratio,oldlbs,price2008,dollars2008,

1541 62 as year,

1542

1543 CS/&yrsc. as CS,

1544 PS/&yrsc. as PS,

1545 TS/&yrsc. as TS,

1546 CS3*(.03*(1+.03)**&yrsc.)/((1+.03)**&yrsc.-1) as

CS3,

1547 PS3*(.03*(1+.03)**&yrsc.)/((1+.03)**&yrsc.-1) as

PS3,

1548 TS3*(.03*(1+.03)**&yrsc.)/((1+.03)**&yrsc.-1) as

TS3,

1549 CS7*(.07*(1+.07)**&yrsc.)/((1+.07)**&yrsc.-1) as

CS7,

1550 PS7*(.07*(1+.07)**&yrsc.)/((1+.07)**&yrsc.-1) as

PS7,

1551 TS7*(.07*(1+.07)**&yrsc.)/((1+.07)**&yrsc.-1) as TS7

1552 from long61;

NOTE: Table WORK.LONG62 created, with 1530 rows and 22 columns.

60 The SAS System 12:35

Tuesday, March 22, 2011

1553 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

1554

1555 * 7f Combine years 1-60 with total and annualized;

1556 data long9;

1557 set long8 long61 long62;

1558 run;

NOTE: There were 91800 observations read from the data set WORK.LONG8.

NOTE: There were 1530 observations read from the data set WORK.LONG61.

NOTE: There were 1530 observations read from the data set WORK.LONG62.

NOTE: The data set WORK.LONG9 has 94860 observations and 30 variables.

NOTE: DATA statement used (Total process time):

real time 3.82 seconds

cpu time 0.14 seconds

1559

1560 * 7g Format data of Consumer and Producer Surplus For

Years 1-50,

1561 total over 60 years, and annualized over 41 years;

1562 proc sql;

1563 create table step7data as select

1564 optionname label="Name of Option",

1565 region,re,cfspecies,species_econ,lossmode,

1566 rbschd label="Benefits Schedule Percentage",

1567 elasticity,

1568 ABT_NB_Ratio,

1569 percent label="LossMode/IE Species Share of Reduction"

format=percent12.2,

1570 iechange label="Reduction in Lbs of Fish Lost"

format=comma30.2,

1571 year label="Year of Benefits Schedule",

1572 oldlbs,

1573 lbs label="Option Annual LBS of Harvest" format=comma30.2,

Page 61
p4com_main_03.21.11_log.txt

1574 price2008,

1575 price label="Price Under Option" format=dollar12.2 ,

1576 dollars2008,

1577 GR label="Change in Gross Revenue (Undiscounted)"

format=dollar30.2,

1578 CS label="Change in Consumer Surplus (Undiscounted)"

format=dollar30.2,

1579 PS label="Change in Producer Surplus (Undiscounted)"

format=dollar30.2,

1580 TS label="Change in Total Surplus (Undiscounted)"

format=dollar30.2,

1581 CS3 label="Change in Consumer Surplus (3%)"

format=dollar30.2,

1582 PS3 label="Change in Producer Surplus (3%)"

format=dollar30.2,

1583 TS3 label="Change in Total Surplus (3%)"

format=dollar30.2,

1584 CS7 label="Change in Consumer Surplus (7%)"

format=dollar30.2,

1585 PS7 label="Change in Producer Surplus (7%)"

format=dollar30.2,

1586 TS7 label="Change in Total Surplus (7%)" format=dollar30.2

1587 from long9

1588 order by

optionname,region,re,cfspecies,species_econ,lossmode,year;

NOTE: Table WORK.STEP7DATA created, with 94860 rows and 27 columns.

61 The SAS System 12:35

Tuesday, March 22, 2011

1589 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 3.37 seconds

cpu time 0.28 seconds

1590 *Data step7data;

1591 * set step7data;

1592 * if rbschd="." then delete;

1593 *RUN;

1594

1595 * Begin Data Check;

1596 proc sql;

1597 create table x as select region,

1598 cfspecies,species_econ,

1599 count(cfspecies) as cfcount

1600 from step7data

1601 where year=1

1602 group by region,cfspecies;

NOTE: The query requires remerging summary statistics back with the original data.

NOTE: Table WORK.X created, with 1530 rows and 4 columns.

1603 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.04 seconds

cpu time 0.04 seconds

1604 proc sql;

1605 create table x2 as select region,

1606 cfspecies,species_econ,

1607 cfcount,

1608 count(species_econ) as iecount

Page 62
p4com_main_03.21.11_log.txt

1609 from x

1610 group by region,cfspecies,species_econ

1611 having count(species_econ)~=cfcount

1612 order by region,cfspecies,species_econ;

NOTE: The query requires remerging summary statistics back with the original data.

NOTE: Table WORK.X2 created, with 448 rows and 5 columns.

1613 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.04 seconds

cpu time 0.00 seconds

1614 data _null_;

1615 set x2;

1616 by region cfspecies species_econ;

1617 if first.species_econ and species_econ~=cfspecies

then

1618 put "Make sure that " species_econ " is

reasonably from a subset of " cfspecies;

1619 run;

Make sure that non.ris.com is reasonably from a subset of blank

62 The SAS System 12:35

Tuesday, March 22, 2011

Make sure that non.ris.rec.com is reasonably from a subset of blank

Make sure that other.com.species is reasonably from a subset of blank

Make sure that z.trophic.xfer is reasonably from a subset of blank

Make sure that sculpins is reasonably from a subset of blank

Make sure that z.trophic.xfer is reasonably from a subset of blank

Make sure that black.bullhead is reasonably from a subset of bullhead.spp

Make sure that brown.bullhead is reasonably from a subset of bullhead.spp

Make sure that channel.catfish is reasonably from a subset of bullhead.spp

Make sure that rainbow.smelt is reasonably from a subset of smelts

Make sure that non.ris.com is reasonably from a subset of blank

Make sure that z.trophic.xfer is reasonably from a subset of blank

Make sure that non.ris.com is reasonably from a subset of blank

Make sure that non.ris.rec.com is reasonably from a subset of blank

Make sure that other.rec.com is reasonably from a subset of blank

Make sure that z.trophic.xfer is reasonably from a subset of blank

Make sure that summer.flounder is reasonably from a subset of flounders

Make sure that windowpane is reasonably from a subset of flounders

Make sure that winter.flounder is reasonably from a subset of flounders

Make sure that non.ris.com is reasonably from a subset of blank

Make sure that non.ris.rec.com is reasonably from a subset of blank

Make sure that other.rec.com is reasonably from a subset of blank

Make sure that z.trophic.xfer is reasonably from a subset of blank

Make sure that american.plaice is reasonably from a subset of flounders

Make sure that windowpane is reasonably from a subset of flounders

Make sure that winter.flounder is reasonably from a subset of flounders

Make sure that non.ris.com is reasonably from a subset of blank

Make sure that non.ris.rec.com is reasonably from a subset of blank

Make sure that z.trophic.xfer is reasonably from a subset of blank

NOTE: There were 448 observations read from the data set WORK.X2.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

1620 * End Data Check;

1621

1622 * 8 Summarize by option and region;

Page 63
p4com_main_03.21.11_log.txt

1623 proc sql;

1624 create table step8data as select

1625 optionname label="Name of Option",

1626 region,re,

1627 sum(CS)/1000 as CS label="Change in Consumer Surplus

(Undiscounted)" format=dollar30.1,

1628 sum(PS)/1000 as PS label="Change in Producer Surplus

(Undiscounted)" format=dollar30.1,

1629 sum(TS)/1000 as TS label="Change in Total Surplus

(Undiscounted)" format=dollar30.1,

1630 sum(CS3)/1000 as CS3 label="Change in Consumer Surplus (3%)"

format=dollar30.1,

1631 sum(PS3)/1000 as PS3 label="Change in Producer Surplus (3%)"

format=dollar30.1,

1632 sum(TS3)/1000 as TS3 label="Change in Total Surplus (3%)"

format=dollar30.1,

1633 sum(CS7)/1000 as CS7 label="Change in Consumer Surplus (7%)"

format=dollar30.1,

1634 sum(PS7)/1000 as PS7 label="Change in Producer Surplus (7%)"

format=dollar30.1,

1635 sum(TS7)/1000 as TS7 label="Change in Total Surplus (7%)"

format=dollar30.1

1636 from step7data

1637 where year=62

1638 group by optionname,region,re

1639 order by optionname,region,re;

63 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: Table WORK.STEP8DATA created, with 60 rows and 12 columns.

1640 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

1641

1642

1643 * 9 Generate Tables;

1644

1645 * 9a pick a year where benefits are in steady state,

rbschd=1;

1646 *NOTE this is not necessarily and error depending on the compliance

trajectory for

1646 ! repowering facilities

1647 benefits may never reach the full total for repowering facilities because

of the biological

1647 ! lag;

1648 data t1;

1649 set step7data;

1650 if year=45;

1651 if round(rbschd,.0001)~=1 then do;

1652 put "error flag , rbschd = " rbschd " and it should

equal 1";

1653 end;

1654 run;

NOTE: There were 94860 observations read from the data set WORK.STEP7DATA.

NOTE: The data set WORK.T1 has 1530 observations and 27 variables.

NOTE: DATA statement used (Total process time):

real time 0.04 seconds

cpu time 0.03 seconds

Page 64
p4com_main_03.21.11_log.txt

1655

1656 * 9b collapse data by option, region, and species;

1657 proc sql;

1658 create table t2 as select

1659 optionname,region,

1660 cfspecies,

1661 mean(oldlbs) as oldlbs,

1662 max(oldlbs) as oldlbsQA,

1663 mean(price2008) as price2008,

1664 max(price2008) as price2008QA,

1665 mean(elasticity) as elasticity,

1666 max(elasticity) as elasticityQA,

1667 mean(price) as price,

1668 max(price) as priceQA,

1669 sum(cs) as CS,

1670 sum(ps) as PS,

1671 sum(ts) as TS

1672 from t1

1673 group by optionname,region,cfspecies

1674 order by optionname,region,cfspecies;

NOTE: Table WORK.T2 created, with 852 rows and 14 columns.

64 The SAS System 12:35

Tuesday, March 22, 2011

1675 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

1676

1677 * 9c get option/region totals for all species;

1678 proc sql;

1679 create table t3 as select

1680 optionname,region,"Total" as cfspecies,

1681 sum(oldlbs*percent) as oldlbs,

1682 sum(cs) as CS,

1683 sum(ps) as PS,

1684 sum(ts) as TS

1685 from t1 group by optionname,region;

NOTE: Table WORK.T3 created, with 60 rows and 7 columns.

1686 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

1687

1688 * 9d get species-specific impingement specific variables

(pounds of harvest gained);

1689 proc sql;

1690 create table timp as select

1691 optionname,region,cfspecies,

1692 sum(IEchange*percent) as pounds_i

1693 from t1

1694 where lossmode="imp"

1695 group by optionname,region,cfspecies

1696 order by optionname,region,cfspecies;

NOTE: Table WORK.TIMP created, with 840 rows and 4 columns.

Page 65
p4com_main_03.21.11_log.txt

1697 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.01 seconds

cpu time 0.03 seconds

1698

1699 * 9e get species-specific entrainment specific variables

(pounds of harvest gained);

1700 proc sql;

1701 create table tent as select

1702 optionname,region,cfspecies,

1703 sum(IEchange*percent) as pounds_e

1704 from t1

1705 where lossmode="ent"

1706 group by optionname,region,cfspecies

1707 order by optionname,region,cfspecies;

NOTE: Table WORK.TENT created, with 402 rows and 4 columns.

65 The SAS System 12:35

Tuesday, March 22, 2011

1708 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

1709

1710 * 9f get all-species-total impingement specific variables

(pounds of harvest gained);

1711 proc sql;

1712 create table timpT as select

1713 optionname,region,"Total" as cfspecies,

1714 sum(IEchange*percent) as pounds_i

1715 from t1

1716 where lossmode="imp"

1717 group by optionname,region

1718 order by optionname,region;

NOTE: Table WORK.TIMPT created, with 60 rows and 4 columns.

1719 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

1720

1721 * 9e get all-species-total entrainment specific variables

(pounds of harvest gained);

1722 proc sql;

1723 create table tentT as select

1724 optionname,region,"Total" as cfspecies,

1725 sum(IEchange*percent) as pounds_e

1726 from t1

1727 where lossmode="ent"

1728 group by optionname,region

1729 order by optionname,region;

NOTE: Table WORK.TENTT created, with 36 rows and 4 columns.

1730 quit;

NOTE: PROCEDURE SQL used (Total process time):

Page 66
p4com_main_03.21.11_log.txt

real time 0.01 seconds

cpu time 0.01 seconds

1731

1732 * 9f combine datasets into one table, recode species

variable;

1733 data t4 (drop= oldlbsQA price2008QA elasticityQA priceQA);

1734 length cfspecies species reg $50;

1735 merge t2 t3 tent timp tentT timpT;

1736 by optionname region cfspecies;

1737 if cfspecies="Total" then ord=100;

1738 else if cfspecies="blank" then ord=50;

1739 else

ord=1;

1740

1741 pounds_ie=sum(pounds_e,pounds_i);

1742

66 The SAS System 12:35

Tuesday, March 22, 2011

1743 if cfspecies="alewife" then species = "Alewife";

1744 else if cfspecies="american.plaice" then species

= "American Plaice";

1745 else if cfspecies="american.shad" then species

= "American Shad";

1746 else if cfspecies="anchovies" then species =

"Anchovies";

1747 else if cfspecies="atlantic.cod" then species

= "Atlantic Cod";

1748 else if cfspecies="atlantic.croaker" then species

= "Atlantic Croaker";

1749 else if cfspecies="atlantic.herring" then species

= "Atlantic Herring";

1750 else if cfspecies="atlantic.mackerel" then species

= "Atlantic Mackerel";

1751 else if cfspecies="atlantic.menhaden" then species

= "Atlantic Menhaden";

1752 else if cfspecies="black.bullhead" then species

= "Black Bullhead";

1753 else if cfspecies="black.crappie" then species

= "Black Crappie";

1754 else if cfspecies="black.drum" then species =

"Black Drum";

1755 else if cfspecies="blue.crab" then species = "Blue

Crab";

1756 else if cfspecies="bluefish" then species =

"Bluefish";

1757 else if cfspecies="bluegill" then species =

"Bluegill";

1758 else if cfspecies="brown.bullhead" then species

= "Brown Bullhead";

1759 else if cfspecies="bullhead.spp" then species

= "Bullhead";

1760 else if cfspecies="butterfish" then species =

"Butterfish";

1761 else if cfspecies="cabezon" then species =

"Cabezon";

1762 else if cfspecies="california.halibut" then species

= "California Halibut";

1763 else if cfspecies="california.scorpionfish" then

species = "California Scorpionfish";

1764 else if cfspecies="channel.catfish" then species

Page 67
p4com_main_03.21.11_log.txt

= "Channel Catfish";

1765 else if cfspecies="com.crabs" then species =

"Commercial Crabs";

1766 else if cfspecies="com.sea.basses" then species

= "Commercial Sea Basses";

1767 else if cfspecies="com.shrimp" then species =

"Commercial Shrimp";

1768 else if cfspecies="crappie" then species =

"Crappie";

1769 else if cfspecies="cunner" then species =

"Cunner";

1770 else if cfspecies="drums.croakers" then species

= "Drums and Croakers";

1771 else if cfspecies="dungeness.crab" then species

= "Dungeness Crabs";

1772 else if cfspecies="flounders" then species =

"Flounders";

1773 else if cfspecies="freshwater.drum" then species

= "Freshwater Drum";

1774 else if cfspecies="leatherjacket" then species

= "Leatherjacket";

1775 else if cfspecies="mackerels" then species =

"Mackerels";

1776 else if cfspecies="menhaden.spp" then species

= "Menhaden ";

1777 else if cfspecies="muskellunge" then species =

"Muskellunge";

1778 else if cfspecies="northern.anchovy" then species

= "Northern Anchovy";

1779 else if cfspecies="other.com.species" then species

= "Other Commercial";

1780 else if cfspecies="other.com.crabs" then species

= "Other Commercial Crabs";

1781 else if cfspecies="paddlefish" then species =

"Paddlefish";

1782 else if cfspecies="pinfish" then species =

"Pinfish";

1783 else if cfspecies="pink.shrimp" then species = "Pink

Shrimp";

1784 else if cfspecies="pollock" then species =

"Pollock";

1785 else if cfspecies="rainbow.smelt" then species

= "Rainbow Smelt";

1786 else if cfspecies="red.drum" then species = "Red

Drum";

1787 else if cfspecies="red.hake" then species = "Red

Hake";

1788 else if cfspecies="rockfishes" then species =

"Rockfishes";

1789 else if cfspecies="salmon" then species =

"Salmon";

1790 else if cfspecies="sauger" then species =

"Sauger";

1791 else if cfspecies="sculpin.spp" then species =

"Sculpin ";

1792 else if cfspecies="sculpins" then species =

"Sculpins";

1793 else if cfspecies="scup" then species =

"Scup";

1794 else if cfspecies="sea.basses" then species = "Sea

Basses";

1795 else if cfspecies="searobin" then species =

"Searobin";

Page 68
p4com_main_03.21.11_log.txt

1796 else if cfspecies="sheepshead" then species =

"Sheepshead";

67 The SAS System 12:35

Tuesday, March 22, 2011

1797 else if cfspecies="silver.hake" then species =

"Silver Hake";

1798 else if cfspecies="silver.perch" then species

= "Silver Perch";

1799 else if cfspecies="skate.species" then species

= "Skate Species";

1800 else if cfspecies="smallmouth.bass" then species

= "Smallmouth Bass";

1801 else if cfspecies="smelts" then species =

"Smelts";

1802 else if cfspecies="spot" then species =

"Spot";

1803 else if cfspecies="spotted.seatrout" then species

= "Spotted Seatrout";

1804 else if cfspecies="stone.crab" then species =

"Stone Crab";

1805 else if cfspecies="striped.bass" then species

= "Striped Bass";

1806 else if cfspecies="striped.mullet" then species

= "Striped Mullet";

1807 else if cfspecies="sturgeon.spp" then species

= "Sturgeon ";

1808 else if cfspecies="summer.flounder" then species

= "Summer Flounder";

1809 else if cfspecies="sunfish" then species =

"Sunfish";

1810 else if cfspecies="surfperches" then species =

"Surfperches";

1811 else if cfspecies="tautog" then species =

"Tautog";

1812 else if cfspecies="walleye" then species =

"Walleye";

1813 else if cfspecies="weakfish" then species =

"Weakfish";

1814 else if cfspecies="white.bass" then species =

"White Bass";

1815 else if cfspecies="white.perch" then species =

"White Perch";

1816 else if cfspecies="whitefish" then species =

"Whitefish";

1817 else if cfspecies="windowpane" then species =

"Windowpane";

1818 else if cfspecies="winter.flounder" then species

= "Winter Flounder";

1819 else if cfspecies="yellow.perch" then species

= "Yellow Perch";

1820 else if cfspecies="z.trophic.transfer" then species

= "Trophic Transfer";

1821 else if cfspecies="z.trophic.xfer" then species =

"Trophic Transfer";

1822 else if cfspecies="blank" then species = "Other";

1823 else if cfspecies="Total" then species = "Total";

1824 else put "error, No species match for cfspecies

variable: " cfspecies;

1825

1826 *data checks;

1827 if abs(oldlbs-oldlbsQA) >.0001 then

put "error flag oldlbs~=oldlbsQA";

Page 69
p4com_main_03.21.11_log.txt

1828 if abs(price2008-price2008QA) >.0001 then put

"error flag price2008~=price2008QA";

1829 if abs(elasticity-elasticityQA) >.0001 then put

"error flag elasticity~=elasticityQA";

1830 if abs(price-priceQA) >.0001 then

put "error flag price~=priceQA";

1831

1832 if region="calif"

then reg="California";

1833 else if region="greatlakes" then

reg="Great Lakes";

1834 else if region="gulfmexico" then

reg="Gulf of Mexico";

1835 else if region="inland" then

reg="Inland";

1836 else if region="midatlantic" then

reg="Mid-Atlantic";

1837 else if region="northatlantic" then

reg="North Atlantic";

1838 else if region="southatlantic" then

reg="South Atlantic";

1839 run;

NOTE: Missing values were generated as a result of performing an operation on

missing values.

Each place is given by: (Number of times) at (Line):(Column).

60 at 1827:7 60 at 1827:17 60 at 1828:7 60 at 1828:20 486 at

1829:7

486 at 1829:21 60 at 1830:7 60 at 1830:16

NOTE: There were 852 observations read from the data set WORK.T2.

NOTE: There were 60 observations read from the data set WORK.T3.

NOTE: There were 402 observations read from the data set WORK.TENT.

NOTE: There were 840 observations read from the data set WORK.TIMP.

NOTE: There were 36 observations read from the data set WORK.TENTT.

NOTE: There were 60 observations read from the data set WORK.TIMPT.

68 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: The data set WORK.T4 has 912 observations and 16 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

1840 proc sort data=t4 out=t5; by optionname reg ord cfspecies; run;

NOTE: There were 912 observations read from the data set WORK.T4.

NOTE: The data set WORK.T5 has 912 observations and 16 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.04 seconds

cpu time 0.00 seconds

1841

1842 * 9g format data, drop rows with no benefits;

1843 proc sql;

1844 create table t6 as select

1845 optionname label="Name of Option",

1846 reg label="Region Name",

1847 species label="Species Name",

1848 oldlbs/1000 as oldlbs label="Average Annual Harvest

2005-2009 (thousands lbs)"

1848 ! format=comma30.1,

Page 70
p4com_main_03.21.11_log.txt

1849 price2008 label="Price Per Pound" format=dollar10.2,

1850 pounds_i/1000 as pounds_i label="Increased Harvest

from Reduced Impingment (thousand

1850 ! lbs)" format=comma30.1,

1851 pounds_e/1000 as pounds_e label="Increased Harvest

from Reduced Entrainment (thousand

1851 ! lbs)" format=comma30.1,

1852 pounds_ie/1000 as pounds_ie label='Increased Harvest

from Reduced I&E (thousand lbs)'

1852 ! format=comma30.1,

1853 elasticity label="Own-Price Elasticity"

format=comma10.2,

1854 price label="Steady State Price" format=dollar10.2,

1855 CS/1000 as CS label="Consumer Surplus (thousands

2008$)" format=dollar30.1,

1856 PS/1000 as PS label="Total Producer Surplus

(thousands 2008$)" format=dollar30.1,

1857 TS/1000 as TS label="Total Surplus (thousands

2008$)" format=dollar30.1

1858 from t5

1859 where pounds_ie~=. and pounds_ie~=0;

NOTE: Table WORK.T6 created, with 912 rows and 13 columns.

1860 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

1861

1862 * 9h change zeros to missing;

1863 data Step9Data;

1864 set t6;

1865 if pounds_i =0 then pounds_i =.;

1866 if pounds_e =0 then pounds_e =.;

1867 if pounds_ie =0 then pounds_ie =.;

1868 if price =0 then price =.;

69 The SAS System 12:35

Tuesday, March 22, 2011

1869 if CS =0 then CS

=.;

1870 if PS =0 then PS

=.;

1871 if TS =0 then TS

=.;

1872 run;

NOTE: There were 912 observations read from the data set WORK.T6.

NOTE: The data set WORK.STEP9DATA has 912 observations and 13 variables.

NOTE: DATA statement used (Total process time):

real time 0.03 seconds

cpu time 0.00 seconds

1873

1874 * create 3% data step from step 8 data;

1875 data Step3p (keep=optionname reg PS species);

1876 set Step8Data;

1877 if region="calif"

then reg="California ";

1878 else if region="greatlakes" then

reg="Great Lakes";

Page 71
p4com_main_03.21.11_log.txt

1879 else if region="gulfmexico" then

reg="Gulf of Mexico";

1880 else if region="inland" then

reg="Inland";

1881 else if region="midatlantic" then

reg="Mid-Atlantic";

1882 else if region="northatlantic" then

reg="North Atlantic";

1883 else if region="southatlantic" then

reg="South Atlantic";

1884

1885 species = "Total (3% Discount Rate)";

1886 PS=PS3/1;

1887 run;

NOTE: There were 60 observations read from the data set WORK.STEP8DATA.

NOTE: The data set WORK.STEP3P has 60 observations and 4 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

1888 * create 7% data step from step 8 data;

1889 data Step7p (keep=optionname reg PS species);

1890 set Step8Data;

1891 if region="calif"

then reg="California ";

1892 else if region="greatlakes" then

reg="Great Lakes";

1893 else if region="gulfmexico" then

reg="Gulf of Mexico";

1894 else if region="inland" then

reg="Inland";

1895 else if region="midatlantic" then

reg="Mid-Atlantic";

1896 else if region="northatlantic" then

reg="North Atlantic";

1897 else if region="southatlantic" then

reg="South Atlantic";

1898

1899 species = "Total (7% Discount Rate)";

1900 PS=PS7/1;

1901 run;

NOTE: There were 60 observations read from the data set WORK.STEP8DATA.

NOTE: The data set WORK.STEP7P has 60 observations and 4 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

70 The SAS System 12:35

Tuesday, March 22, 2011

cpu time 0.00 seconds

1902 * Combine 3 and 7 percent discount rates with undiscounted;

1903 data Step37p;

1904 set Step9Data Step3p Step7p;

1905 if species="Total"

then ord=1;

1906 else if species="Total (3% Discount Rate)" then ord=2;

1907 else if species="Total (7% Discount Rate)" then ord=3;

1908 else

ord=0;

Page 72
p4com_main_03.21.11_log.txt

1909 run;

NOTE: There were 912 observations read from the data set WORK.STEP9DATA.

NOTE: There were 60 observations read from the data set WORK.STEP3P.

NOTE: There were 60 observations read from the data set WORK.STEP7P.

NOTE: The data set WORK.STEP37P has 1032 observations and 14 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

1910

1911 proc sort data=Step37p; by optionname reg ord species; run;

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.STEP37P has 1032 observations and 14 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

1912

1913 data os1 (keep=reg optionname increase);

1914 set Step37p;

1915 if ord=1;

1916 rename pounds_ie=increase;

1917 label increase="Increase in Harvest (thousand lbs)";

1918 run;

NOTE: Variable increase is uninitialized.

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.OS1 has 60 observations and 3 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

1919 data os2 (keep=reg optionname d3);

1920 set Step37p;

1921 if ord=2;

1922 rename ps=d3;

1923 label d3="3% Discount Rate (thousands 2008$)";

1924 run;

71 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: Variable d3 is uninitialized.

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.OS2 has 60 observations and 3 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

1925 data os3 (keep=reg optionname d7);

1926 set Step37p;

1927 if ord=3;

1928 rename ps=d7;

1929 label d3="7% Discount Rate (thousands 2008$)";

1930 run;

NOTE: Variable d3 is uninitialized.

Page 73
p4com_main_03.21.11_log.txt

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.OS3 has 60 observations and 3 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

1931

1932 proc sort data=os1; by reg optionname; run;

NOTE: There were 60 observations read from the data set WORK.OS1.

NOTE: The data set WORK.OS1 has 60 observations and 3 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

1933 proc sort data=os2; by reg optionname; run;

NOTE: There were 60 observations read from the data set WORK.OS2.

NOTE: The data set WORK.OS2 has 60 observations and 3 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

1934 proc sort data=os3; by reg optionname; run;

NOTE: There were 60 observations read from the data set WORK.OS3.

NOTE: The data set WORK.OS3 has 60 observations and 3 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

1935

1936 data os4;

1937 merge os1 os2 os3;

72 The SAS System 12:35

Tuesday, March 22, 2011

1938 by reg optionname;

1939 %optionmac2a;

1940 run;

NOTE: There were 60 observations read from the data set WORK.OS1.

NOTE: There were 60 observations read from the data set WORK.OS2.

NOTE: There were 60 observations read from the data set WORK.OS3.

NOTE: The data set WORK.OS4 has 30 observations and 6 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

1941 proc sort data=os4; by reg sortx; run;

NOTE: There were 30 observations read from the data set WORK.OS4.

NOTE: The data set WORK.OS4 has 30 observations and 6 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

Page 74
p4com_main_03.21.11_log.txt

1942

1943 * 9i generate datasets for species-option-specific

tables;

1944

1945 *List of regions;

1946 *%let reglist=

1947 California^North Atlantic^Mid-Atlantic^Gulf of Mexico^Great Lakes^South

Atlantic;

1948 %let reglist=

1949 California^North Atlantic^Mid-Atlantic^South Atlantic^Gulf of

Mexico^Great Lakes;

1950

1951 *List of possible table numbers;

1952 %let numlist=

1953 01 02 03 04 05 06 07 08 09 10

1954 11 12 13 14 15 16 17 18 19 20

1955 21 22 23 24 25 26 27 28 29 30

1956 31 32 33 34 35 36 37 38 39 40

1957 41 42 43 44 45 46 47 48 49 50

1958 51 52 53 54 55 56 57 58 59 60

1959 61 62 63 64 65 66 67 68 69 70

1960 71 72 73 74 75 76 77 78 79 80

1961 81 82 83 84 85 86 87 88 89 90

1962 91 92 93 94 95 96 97 98 99 100

1963 101 102 103 104 105 106 107 108 109 110

1964 111 112 113 114 115 116 117 118 119 120

1965 121 122 123 124 125 126 127 128 129 130

1966 131 132 133 134 135 136 137 138 139 140

1967 141 142 143 144 145 146 147 148 149 150

1968 151 152 153 154 155 156 157 158 159 160

1969 161 162 163 164 165 166 167 168 169 170

1970 171 172 173 174 175 176 177 178 179 180

1971 181 182 183 184 185 186 187 188 189 190

1972 191 192 193 194 195 196 197 198 199 200

1973 201 202 203 204 205 206 207 208 209 210

73 The SAS System 12:35

Tuesday, March 22, 2011

1974 211 212 213 214 215 216 217 218 219 220

1975 221 222 223 224 225 226 227 228 229 230

1976 231 232 233 234 235 236 237 238 239 240

1977 241 242 243 244 245 246 247 248 249 250;

1978

1979 %macro SStables(start,by);

1980 %do j=1 %to &speciesnum.; /*Five Options

(varies with options)*/

1981 %do i=1 %to 6; /*Six Regions*/

1982 %let T=%eval(&start+&j-1+&by*(&i-1));

1983 Data Table_X_%scan(&numlist,&T.);

1984 length Table $40.;

1985 set Step37p;

1986 Table="Table

&T.:%scan(&speciesoptions.,&j,^):%scan(®list,&i,^)";

1987 if

optionname="%scan(&speciesoptions.,&j,^)";

1988 if

reg="%scan(®list,&i,^)";

1989 run;

1990 %end;

1991 %end;

1992 %mend;

1993 %SSTables(start=&firsttable.,by=&nby.);

Page 75
p4com_main_03.21.11_log.txt

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_08 has 19 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_17 has 23 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_26 has 25 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_35 has 11 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

74 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: The data set WORK.TABLE_X_44 has 16 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_53 has 10 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_09 has 18 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_18 has 23 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

Page 76
p4com_main_03.21.11_log.txt

cpu time 0.00 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_27 has 25 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_36 has 10 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_45 has 16 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

75 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_54 has 10 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_10 has 19 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_19 has 23 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_28 has 25 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

Page 77
p4com_main_03.21.11_log.txt

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_37 has 11 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_46 has 16 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_55 has 10 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

76 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_11 has 19 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_20 has 23 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_29 has 25 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_38 has 11 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_47 has 16 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

Page 78
p4com_main_03.21.11_log.txt

cpu time 0.01 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_56 has 10 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_12 has 18 observations and 15 variables.

NOTE: DATA statement used (Total process time):

77 The SAS System 12:35

Tuesday, March 22, 2011

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_21 has 23 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_30 has 25 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_39 has 10 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_48 has 16 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 1032 observations read from the data set WORK.STEP37P.

NOTE: The data set WORK.TABLE_X_57 has 10 observations and 15 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

1994

Page 79
p4com_main_03.21.11_log.txt

1995 * 9j generate datasets for option-specific summary

tables;

1996 * 9j1 get annualized data ;

1997 proc sql;

1998 create table sum1 as select

1999 optionname label="Name of Option",

2000 region,re,lossmode,

2001 sum(CS)/1000 as CS label="Change in Consumer Surplus

(Undiscounted) (thousands 2008$)"

2001 ! format=dollar30.1,

2002 sum(PS)/1000 as PS label="Change in Producer Surplus

(Undiscounted) (thousands 2008$)"

78 The SAS System 12:35

Tuesday, March 22, 2011

2002 ! format=dollar30.1,

2003 sum(TS)/1000 as TS label="Change in Total Surplus

(Undiscounted) (thousands 2008$)"

2003 ! format=dollar30.1,

2004 sum(CS3)/1000 as CS3 label="Change in Consumer Surplus (3%)

(thousands 2008$)"

2004 ! format=dollar30.1,

2005 sum(PS3)/1000 as PS3 label="Change in Producer Surplus (3%)

(thousands 2008$)"

2005 ! format=dollar30.1,

2006 sum(TS3)/1000 as TS3 label="Change in Total Surplus (3%)

(thousands 2008$)"

2006 ! format=dollar30.1,

2007 sum(CS7)/1000 as CS7 label="Change in Consumer Surplus (7%)

(thousands 2008$)"

2007 ! format=dollar30.1,

2008 sum(PS7)/1000 as PS7 label="Change in Producer Surplus (7%)

(thousands 2008$)"

2008 ! format=dollar30.1,

2009 sum(TS7)/1000 as TS7 label="Change in Total Surplus (7%)

(thousands 2008$)"

2009 ! format=dollar30.1

2010 from step7data

2011 where year=16

2012 group by optionname,region,re,lossmode

2013 order by optionname,region,re,lossmode;

NOTE: Table WORK.SUM1 created, with 96 rows and 13 columns.

2014 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

2015

2016 * 9j2 get row-specific data for tables;

2017 %macro sumtables(r,v);

2018 data row&r.imp (keep=optionname region re Imp) row&r.ent (keep=optionname

region re Ent);

2019 set sum1;

2020 Imp=&v.;

2021 Ent=&v.;

2022 if lossmode="imp" then output row&r.imp;

2023 else if lossmode="ent" then output row&r.ent;

2024 run;

2025 proc sql;

2026 create table x&r. as select

2027 &r as row,

Page 80
p4com_main_03.21.11_log.txt

2028 i.optionname as ioptionname,i.re as ire,

2029 e.optionname as eoptionname,e.re as ere,

2030 i.imp,

2031 e.ent,

2032 sum(i.imp,e.ent) as iande

2033 from row&r.imp as i full join row&r.ent as e

2034 on i.optionname=e.optionname and

2035 i.re=e.re;

2036 quit;

2037 data row&r.;

2038 set x&r.;

2039 if ioptionname~=" " then optionname=ioptionname;

2040 else optionname=eoptionname;

2041 if ire~=" " then re=ire;

79 The SAS System 12:35

Tuesday, March 22, 2011

2042 else re=ere;

2043 %mend;

2044 %sumtables(1,CS);

NOTE: There were 96 observations read from the data set WORK.SUM1.

NOTE: The data set WORK.ROW1IMP has 60 observations and 4 variables.

NOTE: The data set WORK.ROW1ENT has 36 observations and 4 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: Table WORK.X1 created, with 60 rows and 8 columns.

NOTE: PROCEDURE SQL used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

2045 %sumtables(2,PS);

NOTE: There were 60 observations read from the data set WORK.X1.

NOTE: The data set WORK.ROW1 has 60 observations and 10 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 96 observations read from the data set WORK.SUM1.

NOTE: The data set WORK.ROW2IMP has 60 observations and 4 variables.

NOTE: The data set WORK.ROW2ENT has 36 observations and 4 variables.

NOTE: DATA statement used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

NOTE: Table WORK.X2 created, with 60 rows and 8 columns.

NOTE: PROCEDURE SQL used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

2046 %sumtables(3,TS);

Page 81
p4com_main_03.21.11_log.txt

NOTE: There were 60 observations read from the data set WORK.X2.

NOTE: The data set WORK.ROW2 has 60 observations and 10 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

80 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: There were 96 observations read from the data set WORK.SUM1.

NOTE: The data set WORK.ROW3IMP has 60 observations and 4 variables.

NOTE: The data set WORK.ROW3ENT has 36 observations and 4 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: Table WORK.X3 created, with 60 rows and 8 columns.

NOTE: PROCEDURE SQL used (Total process time):

real time 0.03 seconds

cpu time 0.00 seconds

2047 %sumtables(4,TS3);

NOTE: There were 60 observations read from the data set WORK.X3.

NOTE: The data set WORK.ROW3 has 60 observations and 10 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 96 observations read from the data set WORK.SUM1.

NOTE: The data set WORK.ROW4IMP has 60 observations and 4 variables.

NOTE: The data set WORK.ROW4ENT has 36 observations and 4 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: Table WORK.X4 created, with 60 rows and 8 columns.

NOTE: PROCEDURE SQL used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

2048 %sumtables(5,TS7);

NOTE: There were 60 observations read from the data set WORK.X4.

NOTE: The data set WORK.ROW4 has 60 observations and 10 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 96 observations read from the data set WORK.SUM1.

NOTE: The data set WORK.ROW5IMP has 60 observations and 4 variables.

Page 82
p4com_main_03.21.11_log.txt

NOTE: The data set WORK.ROW5ENT has 36 observations and 4 variables.

NOTE: DATA statement used (Total process time):

81 The SAS System 12:35

Tuesday, March 22, 2011

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: Table WORK.X5 created, with 60 rows and 8 columns.

NOTE: PROCEDURE SQL used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

2049

2050 * 9j3 combine rows into one table;

NOTE: There were 60 observations read from the data set WORK.X5.

NOTE: The data set WORK.ROW5 has 60 observations and 10 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

2051 data sum2;

2052 set row1 row2 row3 row4 row5;

2053 run;

NOTE: There were 60 observations read from the data set WORK.ROW1.

NOTE: There were 60 observations read from the data set WORK.ROW2.

NOTE: There were 60 observations read from the data set WORK.ROW3.

NOTE: There were 60 observations read from the data set WORK.ROW4.

NOTE: There were 60 observations read from the data set WORK.ROW5.

NOTE: The data set WORK.SUM2 has 300 observations and 10 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

2054 proc sort data=sum2 out=sum3; by re optionname row; run;

NOTE: There were 300 observations read from the data set WORK.SUM2.

NOTE: The data set WORK.SUM3 has 300 observations and 10 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

2055

2056 * 9j4 generate option-specific table data;

2057 %macro summarybyoption(base,opt,oname);

2058 data baseline option ;

2059 set sum3;

2060 if optionname="&base." then output baseline;

2061 else if optionname="&opt." and row in (3,4,5) then output

option;

2062 run;

2063

82 The SAS System 12:35

Tuesday, March 22, 2011

Page 83
p4com_main_03.21.11_log.txt

2064 proc sql;

2065 create table sum4 as select

2066 o.re,7 as row,

2067 o.imp/b.imp as imp,

2068 o.ent/b.ent as ent,

2069 o.iande/b.iande as iande

2070 from baseline as b left join option as o

2071 on b.re = o.re and

2072 b.row = o.row

2073 where o.row=3;

2074 quit;

2075

2076 data option2;

2077 set option;

2078 row=row+5;

2079 run;

2080

2081 data sum5;

2082 length rowname $80;

2083 set baseline sum4 option2;

2084 if row=1 then rowname="Baseline Consumer

Surplus Lost (Undiscounted)";

2085 else if row=2 then rowname="Baseline Producer Surplus Lost

(Undiscounted)";

2086 else if row=3 then rowname="Baseline Welfare Loss

(Undiscounted)";

2087 else if row=4 then rowname="Baseline Welfare Loss (3%

discount)";

2088 else if row=5 then rowname="Baseline Welfare Loss (7%

discount)";

2089 else if row=7 then rowname="% Reduction in Total Losses

From Rule";

2090 else if row=8 then rowname="Welfare Gain (Undiscounted)";

2091 else if row=9 then rowname="Welfare Gain (3% Discount)";

2092 else if row=10 then rowname="Welfare Gain (7% Discount)";

2093 label

2094 re ="region (short)"

2095 row ="Row Number"

2096 imp ="Imingement"

2097 ent ="Entrainment"

2098 iande ="Total";

2099 format imp ent iande comma30.1;

2100 Option="&oname";

2101

2102 run;

2103 proc sort data=sum5 out=&oname; by re row; run;

2104 data outloc.&oname.;

2105 set &oname;

2106 run;

2107 %mend;

2108 %optionmac3;

NOTE: There were 300 observations read from the data set WORK.SUM3.

NOTE: The data set WORK.BASELINE has 30 observations and 10 variables.

NOTE: The data set WORK.OPTION has 18 observations and 10 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

83 The SAS System 12:35

Tuesday, March 22, 2011

Page 84
p4com_main_03.21.11_log.txt

NOTE: Table WORK.SUM4 created, with 6 rows and 5 columns.

NOTE: PROCEDURE SQL used (Total process time):

real time 0.06 seconds

cpu time 0.00 seconds

NOTE: There were 18 observations read from the data set WORK.OPTION.

NOTE: The data set WORK.OPTION2 has 18 observations and 10 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 30 observations read from the data set WORK.BASELINE.

NOTE: There were 6 observations read from the data set WORK.SUM4.

NOTE: There were 18 observations read from the data set WORK.OPTION2.

NOTE: The data set WORK.SUM5 has 54 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 54 observations read from the data set WORK.SUM5.

NOTE: The data set WORK.TMN1_0 has 54 observations and 12 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 54 observations read from the data set WORK.TMN1_0.

NOTE: The data set OUTLOC.TMN1_0 has 54 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.06 seconds

cpu time 0.00 seconds

NOTE: There were 300 observations read from the data set WORK.SUM3.

NOTE: The data set WORK.BASELINE has 30 observations and 10 variables.

NOTE: The data set WORK.OPTION has 18 observations and 10 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: Table WORK.SUM4 created, with 6 rows and 5 columns.

NOTE: PROCEDURE SQL used (Total process time):

real time 0.03 seconds

84 The SAS System 12:35

Tuesday, March 22, 2011

cpu time 0.00 seconds

NOTE: There were 18 observations read from the data set WORK.OPTION.

NOTE: The data set WORK.OPTION2 has 18 observations and 10 variables.

Page 85
p4com_main_03.21.11_log.txt

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 30 observations read from the data set WORK.BASELINE.

NOTE: There were 6 observations read from the data set WORK.SUM4.

NOTE: There were 18 observations read from the data set WORK.OPTION2.

NOTE: The data set WORK.SUM5 has 54 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 54 observations read from the data set WORK.SUM5.

NOTE: The data set WORK.TMN2_0 has 54 observations and 12 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.03 seconds

cpu time 0.00 seconds

NOTE: There were 54 observations read from the data set WORK.TMN2_0.

NOTE: The data set OUTLOC.TMN2_0 has 54 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.17 seconds

cpu time 0.00 seconds

NOTE: There were 300 observations read from the data set WORK.SUM3.

NOTE: The data set WORK.BASELINE has 30 observations and 10 variables.

NOTE: The data set WORK.OPTION has 18 observations and 10 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: Table WORK.SUM4 created, with 6 rows and 5 columns.

NOTE: PROCEDURE SQL used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

85 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: There were 18 observations read from the data set WORK.OPTION.

NOTE: The data set WORK.OPTION2 has 18 observations and 10 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 30 observations read from the data set WORK.BASELINE.

NOTE: There were 6 observations read from the data set WORK.SUM4.

NOTE: There were 18 observations read from the data set WORK.OPTION2.

NOTE: The data set WORK.SUM5 has 54 observations and 12 variables.

Page 86
p4com_main_03.21.11_log.txt

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 54 observations read from the data set WORK.SUM5.

NOTE: The data set WORK.TMN3_0 has 54 observations and 12 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 54 observations read from the data set WORK.TMN3_0.

NOTE: The data set OUTLOC.TMN3_0 has 54 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.06 seconds

cpu time 0.01 seconds

NOTE: There were 300 observations read from the data set WORK.SUM3.

NOTE: The data set WORK.BASELINE has 30 observations and 10 variables.

NOTE: The data set WORK.OPTION has 18 observations and 10 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: Table WORK.SUM4 created, with 6 rows and 5 columns.

NOTE: PROCEDURE SQL used (Total process time):

real time 0.15 seconds

cpu time 0.00 seconds

NOTE: There were 18 observations read from the data set WORK.OPTION.

NOTE: The data set WORK.OPTION2 has 18 observations and 10 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

86 The SAS System 12:35

Tuesday, March 22, 2011

cpu time 0.00 seconds

NOTE: There were 30 observations read from the data set WORK.BASELINE.

NOTE: There were 6 observations read from the data set WORK.SUM4.

NOTE: There were 18 observations read from the data set WORK.OPTION2.

NOTE: The data set WORK.SUM5 has 54 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 54 observations read from the data set WORK.SUM5.

NOTE: The data set WORK.TMN4_0 has 54 observations and 12 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

Page 87
p4com_main_03.21.11_log.txt

cpu time 0.00 seconds

NOTE: There were 54 observations read from the data set WORK.TMN4_0.

NOTE: The data set OUTLOC.TMN4_0 has 54 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.09 seconds

cpu time 0.00 seconds

2109

2110

2111 %let relist=

2112 CA^NA^MA^GM^GL^SA;

2113 * 9j5 generate option-specific tables;

2114 %macro sumtables(start,by);

2115 %do j=1 %to &rnum.; *number of options;

2116 %do i=1 %to 6; *6 regions;

2117 %let t=%eval(&start+&j-1+&by*(&i-1));

2118 Data Table_X_%scan(&numlist,&T.);

2119 retain rowname imp ent iande;

2120 set %scan(®ionoptions,&j,^);

2121 if re="%scan(&relist,&i,^)";

2122 run;

2123 %end;

2124 %end;

2125 %mend;

2126 *%sumtables(7,&nby);

2127 %sumtables(%eval(&firsttable+&speciesnum),&nby);

NOTE: There were 54 observations read from the data set WORK.TMN1_0.

NOTE: The data set WORK.TABLE_X_13 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

87 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: There were 54 observations read from the data set WORK.TMN1_0.

NOTE: The data set WORK.TABLE_X_22 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 54 observations read from the data set WORK.TMN1_0.

NOTE: The data set WORK.TABLE_X_31 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 54 observations read from the data set WORK.TMN1_0.

NOTE: The data set WORK.TABLE_X_40 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

Page 88
p4com_main_03.21.11_log.txt

NOTE: There were 54 observations read from the data set WORK.TMN1_0.

NOTE: The data set WORK.TABLE_X_49 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.04 seconds

cpu time 0.01 seconds

NOTE: There were 54 observations read from the data set WORK.TMN1_0.

NOTE: The data set WORK.TABLE_X_58 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 54 observations read from the data set WORK.TMN2_0.

NOTE: The data set WORK.TABLE_X_14 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 54 observations read from the data set WORK.TMN2_0.

NOTE: The data set WORK.TABLE_X_23 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

88 The SAS System 12:35

Tuesday, March 22, 2011

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 54 observations read from the data set WORK.TMN2_0.

NOTE: The data set WORK.TABLE_X_32 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 54 observations read from the data set WORK.TMN2_0.

NOTE: The data set WORK.TABLE_X_41 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.03 seconds

cpu time 0.00 seconds

NOTE: There were 54 observations read from the data set WORK.TMN2_0.

NOTE: The data set WORK.TABLE_X_50 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 54 observations read from the data set WORK.TMN2_0.

Page 89
p4com_main_03.21.11_log.txt

NOTE: The data set WORK.TABLE_X_59 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 54 observations read from the data set WORK.TMN3_0.

NOTE: The data set WORK.TABLE_X_15 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.03 seconds

cpu time 0.00 seconds

NOTE: There were 54 observations read from the data set WORK.TMN3_0.

NOTE: The data set WORK.TABLE_X_24 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 54 observations read from the data set WORK.TMN3_0.

89 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: The data set WORK.TABLE_X_33 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

NOTE: There were 54 observations read from the data set WORK.TMN3_0.

NOTE: The data set WORK.TABLE_X_42 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 54 observations read from the data set WORK.TMN3_0.

NOTE: The data set WORK.TABLE_X_51 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 54 observations read from the data set WORK.TMN3_0.

NOTE: The data set WORK.TABLE_X_60 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 54 observations read from the data set WORK.TMN4_0.

NOTE: The data set WORK.TABLE_X_16 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.03 seconds

cpu time 0.00 seconds

Page 90
p4com_main_03.21.11_log.txt

NOTE: There were 54 observations read from the data set WORK.TMN4_0.

NOTE: The data set WORK.TABLE_X_25 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 54 observations read from the data set WORK.TMN4_0.

NOTE: The data set WORK.TABLE_X_34 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

90 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: There were 54 observations read from the data set WORK.TMN4_0.

NOTE: The data set WORK.TABLE_X_43 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 54 observations read from the data set WORK.TMN4_0.

NOTE: The data set WORK.TABLE_X_52 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 54 observations read from the data set WORK.TMN4_0.

NOTE: The data set WORK.TABLE_X_61 has 9 observations and 12 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

2128

2129 * 10 Export data to excel;

2130

2131 %export(step1data,"&outloc.&output",step1data);

NOTE: "STEP1DATA" range/sheet was successfully created.

NOTE: PROCEDURE EXPORT used (Total process time):

real time 0.51 seconds

cpu time 0.07 seconds

2132 %export(step2data,"&outloc.&output",step2data);

NOTE: "STEP2DATA" range/sheet was successfully created.

NOTE: PROCEDURE EXPORT used (Total process time):

real time 0.56 seconds

cpu time 0.12 seconds

Page 91
p4com_main_03.21.11_log.txt

2133 %export(step3data,"&outloc.&output",step3data);

NOTE: "STEP3DATA" range/sheet was successfully created.

NOTE: PROCEDURE EXPORT used (Total process time):

real time 0.39 seconds

cpu time 0.06 seconds

2134 %export(step4data,"&outloc.&output",step4data);

NOTE: "STEP4DATA" range/sheet was successfully created.

91 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: PROCEDURE EXPORT used (Total process time):

real time 0.53 seconds

cpu time 0.10 seconds

2135 %export(step5data,"&outloc.&output",step5data);

NOTE: "STEP5DATA" range/sheet was successfully created.

NOTE: PROCEDURE EXPORT used (Total process time):

real time 0.56 seconds

cpu time 0.09 seconds

2136 %export(step6data,"&outloc.&output",step6data);

NOTE: "STEP6DATA" range/sheet was successfully created.

NOTE: PROCEDURE EXPORT used (Total process time):

real time 1.43 seconds

cpu time 0.25 seconds

2137 *%export(step7data,"&outloc.&output",step7data);

2138 %export(step8data,"&outloc.&output",step8data);

NOTE: "STEP8DATA" range/sheet was successfully created.

NOTE: PROCEDURE EXPORT used (Total process time):

real time 2.25 seconds

cpu time 0.20 seconds

2139 %export(step9data,"&outloc.&output",step9data);

NOTE: "STEP9DATA" range/sheet was successfully created.

NOTE: PROCEDURE EXPORT used (Total process time):

real time 1.73 seconds

cpu time 0.17 seconds

2140

2141 * 11 Generate National Total Tables;

2142 proc sql;

2143 create table nat1 as select

2144 row,optionname,

2145 "TL" as re,

2146 case

2147 when row=3 or row=8 then "Undiscounted"

2148 when row=4 or row=9 then "3 Percent"

2149 when row=5 or row=10 then "7 Percent"

Page 92
p4com_main_03.21.11_log.txt

2150 else "Delete"

2151 end as Discount,

2152 sum(imp) as imp,

2153 sum(ent) as ent,

2154 sum(iande) as iande

2155 from sum3 group by row,optionname;

92 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: Table WORK.NAT1 created, with 50 rows and 7 columns.

2156

2157 create table nat2 as select

2158 row,optionname,re,

2159 case

2160 when row=3 or row=8 then "Undiscounted"

2161 when row=4 or row=9 then "3 Percent"

2162 when row=5 or row=10 then "7 Percent"

2163 else "Delete"

2164 end as Discount,

2165 sum(imp) as imp,

2166 sum(ent) as ent,

2167 sum(iande) as iande

2168 from sum3 group by row,optionname,re;

NOTE: Table WORK.NAT2 created, with 300 rows and 7 columns.

2169 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

2170

2171 * 11a drop irrelevent rows, format data;

2172 data nat3 (keep=optionname region imp ent iande discount s row) ;

2173 retain optionname discount region imp ent iande s row;

2174 length region $30.;

2175 set nat2 nat1;

2176 if discount~="Delete";

2177 if re="CA" then

region="California";

2178 else if re="GL" then region="Great

Lakes";

2179 else if re="GM" then region="Gulf of

Mexico";

2180 else if re="MA" then

region="Mid-Atlantic";

2181 else if re="NA" then region="North

Atlantic";

2182 else if re="SA" then region="South

Atlantic";

2183 else if re="TL" then region="National

Total";

2184

2185 if re="CA" then s=1;

2186 else if re="GL" then s=6;

2187 else if re="GM" then s=5;

2188 else if re="MA" then s=3;

2189 else if re="NA" then s=2;

2190 else if re="SA" then s=4;

2191 else if re="TL" then s=7;

2192

2193 format imp ent iande dollar30.1;

Page 93
p4com_main_03.21.11_log.txt

2194 label region="Region"

2195 imp="Impingement"

2196 ent="Entrainment"

2197 iande='I&E'

2198 discount="Discount Rate";

2199 run;

93 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: There were 300 observations read from the data set WORK.NAT2.

NOTE: There were 50 observations read from the data set WORK.NAT1.

NOTE: The data set WORK.NAT3 has 210 observations and 8 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

2200

2201 * 11b sort data;

2202 proc sort data=nat3 out=nat4; by optionname row s; run;

NOTE: There were 210 observations read from the data set WORK.NAT3.

NOTE: The data set WORK.NAT4 has 210 observations and 8 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

2203

2204 * 11c insert blank rows;

2205 data blank;

2206 set nat4;

2207 by optionname row;

2208 if first.row;

2209 region="Blank Row";

2210 imp=.;

2211 ent=.;

2212 iande=.;

2213 s=0;

2214 run;

NOTE: There were 210 observations read from the data set WORK.NAT4.

NOTE: The data set WORK.BLANK has 30 observations and 8 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

2215 data nat5;

2216 set nat4 blank;

2217 run;

NOTE: There were 210 observations read from the data set WORK.NAT4.

NOTE: There were 30 observations read from the data set WORK.BLANK.

NOTE: The data set WORK.NAT5 has 240 observations and 8 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

2218

2219 * 11d sort for printing;

Page 94
p4com_main_03.21.11_log.txt

2220 proc sort data=nat5 out=nat6; by optionname row s; run;

94 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: There were 240 observations read from the data set WORK.NAT5.

NOTE: The data set WORK.NAT6 has 240 observations and 8 variables.

NOTE: PROCEDURE SORT used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

2221

2222

2223 * generate national total option-specific tables;

2224 %macro nattables(start);

2225 %do j=1 %to &natnum.;

2226 %let t=%eval(&start+&j-1);

2227 Data Table_X_&t.;

2228 set nat6;

2229 if

optionname="%scan(&natoptions,&j,^)";

2230 run;

2231 %end;

2232 %mend;

2233 %nattables(%eval(&firsttable+&nby*6));

NOTE: There were 240 observations read from the data set WORK.NAT6.

NOTE: The data set WORK.TABLE_X_62 has 24 observations and 8 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 240 observations read from the data set WORK.NAT6.

NOTE: The data set WORK.TABLE_X_63 has 24 observations and 8 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 240 observations read from the data set WORK.NAT6.

NOTE: The data set WORK.TABLE_X_64 has 24 observations and 8 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

NOTE: There were 240 observations read from the data set WORK.NAT6.

NOTE: The data set WORK.TABLE_X_65 has 24 observations and 8 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

95 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: There were 240 observations read from the data set WORK.NAT6.

Page 95
p4com_main_03.21.11_log.txt

NOTE: The data set WORK.TABLE_X_66 has 24 observations and 8 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

2234

2235 %macro tableexport;

2236 %do i=2 %to 9;

2237 %export(Table_x_0&i,"&outloc.&tables",Table_x_0&i);

2238 %end;

2239 %let to=%eval(&nby*6+&natnum+&firsttable-1);

2240 %do i=10 %to &to.;

2241 %export(Table_x_&i,"&outloc.&tables",Table_x_&i);

2242 %end;

2243 %mend;

2244 *%tableexport;

2245

2246 *PRINT REGION TABLES;

2247 %macro printit(var,var2);

2248 %do j=1 %to 6; /*Regions 1 - 6*/

2249

2250 %let region=%scan(®list,&j,^);

2251 %let countlist=0^1^2^3^3^5;

2252 %do i=1 %to &nby.; /*13 Tables Per Region FLAG

OPTION-SPECIFIC STEP!!*/

2253

2254 %if &i<=&speciesnum. %then %do; /*5 species tables

per region FLAG OPTION-SPECIFIC

2254 ! STEP!!*/

2255 Title;

2256 *Title1 "Table

%scan(&numlist,(&j-1)*&nby+&firsttable+&i-1)A : Imp, Ent, and I&E";

2257 Title1 "Table

2257 !

%eval(%scan(&numlist,((&j-1)*4+&i)*2-1+&firsttable-1)+%scan(&countlist,&j,^)) : Imp,

Ent,

2257 ! and I&E";

2258 Title2 "®ion : Option =

%scan(&TableTitles,&i,^)";

2259 proc print

data=Table_X_%scan(&numlist,(&j-1)*&nby+&firsttable+&i-1) noobs label;

2260 var &var. species pounds_i pounds_e

pounds_ie

2261 ;

2262 where species~="Total (3% Discount

Rate)" and

2263 species~="Total (7%

Discount Rate)";

2264 run;

2265 *Title1 "Table

%scan(&numlist,(&j-1)*&nby+&firsttable+&i-1)B : Econ Tables:";

2266 Title1 "Table

2266 !

%eval(%scan(&numlist,((&j-1)*4+&i)*2+&firsttable-1)+%scan(&countlist,&j,^)) : Econ

Tables:"

2266 ! ;

2267 Title2 "®ion : Option =

%scan(&TableTitles,&i,^)";

2268 proc print

data=Table_X_%scan(&numlist,(&j-1)*&nby+&firsttable+&i-1) noobs label;

2269 var &var. species oldlbs price2008

pounds_ie PS;

Page 96
p4com_main_03.21.11_log.txt

2270 run;

2271 %end;

2272 %if &i=5 %then %do; /*8 option tables per region

FLAG OPTION-SPECIFIC STEP!!*/

2273 Title;

2274 Title1 "Table

2274 !

%eval(%scan(&numlist,((&j-1)*4+&i)*2+&firsttable-1)+%scan(&countlist,&j,^)-1) :

Option

96 The SAS System 12:35

Tuesday, March 22, 2011

2274 ! Summary:";

2275 Title2 "®ion";

2276 proc print data=os4;

2277 where reg="®ion";

2278 run;

2279 %end;

2280 %end;

2281 %end;

2282 %mend;

2283

2284 *PRINT NATIONAL TABLES;

2285 %macro printit2(var);

2286 %let begin=%eval(&firsttable+&nby*6);

2287 %do i=1 %to &natnum;

2288 %let j=%eval(&begin.-1+&i);

2289 title;

2290 title "Table &j: Total Commercial Benefits :

Option = %scan(&nattitles.,&i,^)";

2291 proc print data=Table_X_&j noobs label;

2292 var discount region imp ent iande;

2293 run;

2294 %end;

2295 %mend;

2296

2297 *options orientation=landscape;

2298 *ods rtf body="&printout";

2299 *%printit( , );

2300 *%printit2( );

2301 *ods rtf close;

2302

2303 ods csvall body="&printout3.";

NOTE: Writing CSVALL Body file: h:\ERD\TYCHE Contract\Assignments\WA 2-15 (316b

Benefits & SP

Study)\Task 5 - Benefits Analytic Support\IE_032111\Com\Outputs\Com Ben Tables

22MAR11.csv

2304 %printit(Table optionname reg, option row re);

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 17 observations read from the data set WORK.TABLE_X_08.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 1.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.45 seconds

cpu time 0.06 seconds

NOTE: There were 19 observations read from the data set WORK.TABLE_X_08.

NOTE: The PROCEDURE PRINT printed pages 2-3.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

Page 97
p4com_main_03.21.11_log.txt

cpu time 0.00 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 16 observations read from the data set WORK.TABLE_X_09.

97 The SAS System 12:35

Tuesday, March 22, 2011

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 4.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

NOTE: There were 18 observations read from the data set WORK.TABLE_X_09.

NOTE: The PROCEDURE PRINT printed page 5.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 17 observations read from the data set WORK.TABLE_X_10.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 6.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.09 seconds

cpu time 0.01 seconds

NOTE: There were 19 observations read from the data set WORK.TABLE_X_10.

NOTE: The PROCEDURE PRINT printed page 7.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 17 observations read from the data set WORK.TABLE_X_11.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 8.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

NOTE: There were 19 observations read from the data set WORK.TABLE_X_11.

NOTE: The PROCEDURE PRINT printed page 9.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 16 observations read from the data set WORK.TABLE_X_12.

Page 98
p4com_main_03.21.11_log.txt

98 The SAS System 12:35

Tuesday, March 22, 2011

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 10.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

NOTE: There were 18 observations read from the data set WORK.TABLE_X_12.

NOTE: The PROCEDURE PRINT printed page 11.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

NOTE: There were 5 observations read from the data set WORK.OS4.

WHERE reg='California';

NOTE: The PROCEDURE PRINT printed page 12.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 21 observations read from the data set WORK.TABLE_X_17.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 13.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 23 observations read from the data set WORK.TABLE_X_17.

NOTE: The PROCEDURE PRINT printed pages 14-15.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.03 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 21 observations read from the data set WORK.TABLE_X_18.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 16.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.04 seconds

cpu time 0.01 seconds

NOTE: There were 23 observations read from the data set WORK.TABLE_X_18.

99 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: The PROCEDURE PRINT printed pages 17-18.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.15 seconds

Page 99
p4com_main_03.21.11_log.txt

cpu time 0.01 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 21 observations read from the data set WORK.TABLE_X_19.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 19.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.04 seconds

cpu time 0.01 seconds

NOTE: There were 23 observations read from the data set WORK.TABLE_X_19.

NOTE: The PROCEDURE PRINT printed pages 20-21.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 21 observations read from the data set WORK.TABLE_X_20.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 22.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 23 observations read from the data set WORK.TABLE_X_20.

NOTE: The PROCEDURE PRINT printed pages 23-24.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 21 observations read from the data set WORK.TABLE_X_21.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 25.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

NOTE: There were 23 observations read from the data set WORK.TABLE_X_21.

100 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: The PROCEDURE PRINT printed pages 26-27.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.09 seconds

cpu time 0.01 seconds

NOTE: There were 5 observations read from the data set WORK.OS4.

WHERE reg='North Atlantic';

Page 100
p4com_main_03.21.11_log.txt

NOTE: The PROCEDURE PRINT printed page 28.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.00 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 23 observations read from the data set WORK.TABLE_X_26.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 29.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

NOTE: There were 25 observations read from the data set WORK.TABLE_X_26.

NOTE: The PROCEDURE PRINT printed pages 30-31.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 23 observations read from the data set WORK.TABLE_X_27.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 32.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.06 seconds

cpu time 0.01 seconds

NOTE: There were 25 observations read from the data set WORK.TABLE_X_27.

NOTE: The PROCEDURE PRINT printed pages 33-34.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 23 observations read from the data set WORK.TABLE_X_28.

101 The SAS System 12:35

Tuesday, March 22, 2011

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 35.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

NOTE: There were 25 observations read from the data set WORK.TABLE_X_28.

NOTE: The PROCEDURE PRINT printed pages 36-37.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

Page 101
p4com_main_03.21.11_log.txt

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 23 observations read from the data set WORK.TABLE_X_29.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 38.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.00 seconds

NOTE: There were 25 observations read from the data set WORK.TABLE_X_29.

NOTE: The PROCEDURE PRINT printed pages 39-40.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.09 seconds

cpu time 0.01 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 23 observations read from the data set WORK.TABLE_X_30.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 41.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.04 seconds

cpu time 0.01 seconds

NOTE: There were 25 observations read from the data set WORK.TABLE_X_30.

NOTE: The PROCEDURE PRINT printed pages 42-43.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.07 seconds

cpu time 0.03 seconds

NOTE: There were 5 observations read from the data set WORK.OS4.

WHERE reg='Mid-Atlantic';

102 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: The PROCEDURE PRINT printed page 44.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 9 observations read from the data set WORK.TABLE_X_35.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 45.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

NOTE: There were 11 observations read from the data set WORK.TABLE_X_35.

NOTE: The PROCEDURE PRINT printed page 46.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

Page 102
p4com_main_03.21.11_log.txt

cpu time 0.01 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 8 observations read from the data set WORK.TABLE_X_36.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 47.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.00 seconds

NOTE: There were 10 observations read from the data set WORK.TABLE_X_36.

NOTE: The PROCEDURE PRINT printed page 48.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 9 observations read from the data set WORK.TABLE_X_37.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 49.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.00 seconds

NOTE: There were 11 observations read from the data set WORK.TABLE_X_37.

103 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: The PROCEDURE PRINT printed page 50.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 9 observations read from the data set WORK.TABLE_X_38.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 51.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.00 seconds

NOTE: There were 11 observations read from the data set WORK.TABLE_X_38.

NOTE: The PROCEDURE PRINT printed page 52.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 8 observations read from the data set WORK.TABLE_X_39.

Page 103
p4com_main_03.21.11_log.txt

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 53.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

NOTE: There were 10 observations read from the data set WORK.TABLE_X_39.

NOTE: The PROCEDURE PRINT printed page 54.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.36 seconds

cpu time 0.01 seconds

NOTE: There were 5 observations read from the data set WORK.OS4.

WHERE reg='South Atlantic';

NOTE: The PROCEDURE PRINT printed page 55.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.00 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 14 observations read from the data set WORK.TABLE_X_44.

104 The SAS System 12:35

Tuesday, March 22, 2011

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 56.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.04 seconds

cpu time 0.01 seconds

NOTE: There were 16 observations read from the data set WORK.TABLE_X_44.

NOTE: The PROCEDURE PRINT printed pages 57-58.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 14 observations read from the data set WORK.TABLE_X_45.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 59.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.04 seconds

cpu time 0.01 seconds

NOTE: There were 16 observations read from the data set WORK.TABLE_X_45.

NOTE: The PROCEDURE PRINT printed pages 60-61.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

Page 104
p4com_main_03.21.11_log.txt

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 14 observations read from the data set WORK.TABLE_X_46.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 62.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 16 observations read from the data set WORK.TABLE_X_46.

NOTE: The PROCEDURE PRINT printed pages 63-64.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 14 observations read from the data set WORK.TABLE_X_47.

105 The SAS System 12:35

Tuesday, March 22, 2011

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 65.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: There were 16 observations read from the data set WORK.TABLE_X_47.

NOTE: The PROCEDURE PRINT printed pages 66-67.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 14 observations read from the data set WORK.TABLE_X_48.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 68.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.04 seconds

cpu time 0.00 seconds

NOTE: There were 16 observations read from the data set WORK.TABLE_X_48.

NOTE: The PROCEDURE PRINT printed pages 69-70.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 5 observations read from the data set WORK.OS4.

WHERE reg='Gulf of Mexico';

NOTE: The PROCEDURE PRINT printed page 71.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

Page 105
p4com_main_03.21.11_log.txt

cpu time 0.00 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 8 observations read from the data set WORK.TABLE_X_53.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 72.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 10 observations read from the data set WORK.TABLE_X_53.

106 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: The PROCEDURE PRINT printed page 73.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 8 observations read from the data set WORK.TABLE_X_54.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 74.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.01 seconds

NOTE: There were 10 observations read from the data set WORK.TABLE_X_54.

NOTE: The PROCEDURE PRINT printed page 75.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 8 observations read from the data set WORK.TABLE_X_55.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 76.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 10 observations read from the data set WORK.TABLE_X_55.

NOTE: The PROCEDURE PRINT printed page 77.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 8 observations read from the data set WORK.TABLE_X_56.

Page 106
p4com_main_03.21.11_log.txt

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 78.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.04 seconds

cpu time 0.01 seconds

NOTE: There were 10 observations read from the data set WORK.TABLE_X_56.

107 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: The PROCEDURE PRINT printed page 79.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

WARNING: Apparent symbolic reference E not resolved.

NOTE: There were 8 observations read from the data set WORK.TABLE_X_57.

WHERE species not in ('Total (3% Discount Rate)', 'Total (7% Discount Rate)');

NOTE: The PROCEDURE PRINT printed page 80.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 10 observations read from the data set WORK.TABLE_X_57.

NOTE: The PROCEDURE PRINT printed page 81.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: There were 5 observations read from the data set WORK.OS4.

WHERE reg='Great Lakes';

NOTE: The PROCEDURE PRINT printed page 82.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.03 seconds

cpu time 0.00 seconds

2305 *%printit2(optionname discount);

2306 ods csvall close;

2307

2308

2309 %macro nat2;

2310 PROC DATASETS LIB=work nolist;

2311 DELETE national0;

2312 RUN; quit;

2313 %let begin=%eval(&firsttable.+&nby.*6);

2314 %do i=1 %to &natnum;

2315 %let j=%eval(&begin.-1+&i);

2316 title;

2317 title "Table &j: Total Commercial Benefits :

Option = %scan(&nattitles.,&i,^)";

2318 proc append base=national0

data=Table_X_&j;

2319 run;

2320 %end;

Page 107
p4com_main_03.21.11_log.txt

2321 %mend;

2322 %nat2;

NOTE: The file WORK.NATIONAL0 (memtype=DATA) was not found, but appears on a DELETE

statement.

108 The SAS System 12:35

Tuesday, March 22, 2011

NOTE: PROCEDURE DATASETS used (Total process time):

real time 0.06 seconds

cpu time 0.04 seconds

NOTE: Appending WORK.TABLE_X_62 to WORK.NATIONAL0.

NOTE: BASE data set does not exist. DATA file is being copied to BASE file.

NOTE: There were 24 observations read from the data set WORK.TABLE_X_62.

NOTE: The data set WORK.NATIONAL0 has 24 observations and 8 variables.

NOTE: PROCEDURE APPEND used (Total process time):

real time 0.09 seconds

cpu time 0.03 seconds

NOTE: Appending WORK.TABLE_X_63 to WORK.NATIONAL0.

NOTE: There were 24 observations read from the data set WORK.TABLE_X_63.

NOTE: 24 observations added.

NOTE: The data set WORK.NATIONAL0 has 48 observations and 8 variables.

NOTE: PROCEDURE APPEND used (Total process time):

real time 0.04 seconds

cpu time 0.01 seconds

NOTE: Appending WORK.TABLE_X_64 to WORK.NATIONAL0.

NOTE: There were 24 observations read from the data set WORK.TABLE_X_64.

NOTE: 24 observations added.

NOTE: The data set WORK.NATIONAL0 has 72 observations and 8 variables.

NOTE: PROCEDURE APPEND used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

NOTE: Appending WORK.TABLE_X_65 to WORK.NATIONAL0.

NOTE: There were 24 observations read from the data set WORK.TABLE_X_65.

NOTE: 24 observations added.

NOTE: The data set WORK.NATIONAL0 has 96 observations and 8 variables.

NOTE: PROCEDURE APPEND used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

NOTE: Appending WORK.TABLE_X_66 to WORK.NATIONAL0.

NOTE: There were 24 observations read from the data set WORK.TABLE_X_66.

NOTE: 24 observations added.

NOTE: The data set WORK.NATIONAL0 has 120 observations and 8 variables.

NOTE: PROCEDURE APPEND used (Total process time):

real time 0.01 seconds

cpu time 0.00 seconds

Page 108
p4com_main_03.21.11_log.txt

109 The SAS System 12:35

Tuesday, March 22, 2011

2323 data national1 (keep=option optionname region discount CS noCS);

2324 set national0;

2325 option=translate(optionname,"","_0");

2326 if option=optionname then CS=iande;

2327 else NoCS=iande;

2328

2329 if discount="3 Percent" then discount ="3% Discount";

2330 else if discount="7 Percent" then discount ="7% Discount";

2331 if region="National Total" then region="Total";

2332 run;

NOTE: There were 120 observations read from the data set WORK.NATIONAL0.

NOTE: The data set WORK.NATIONAL1 has 120 observations and 6 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

2333

2334 proc sql;

2335 create table outloc.national2 as select

2336 option,region,discount,

2337 sum(CS) as CS,

2338 sum(noCS) as noCS

2339 from national1

2340 group by option,region,discount;

NOTE: Table OUTLOC.NATIONAL2 created, with 120 rows and 5 columns.

2341 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.10 seconds

cpu time 0.00 seconds

2342

2343 ****adding in additional code needed for the discounting appendix ;

2344 Data Discounting_out;

2345 set step7data;

2346 if optionname="baseline_0" then delete;

2347 if optionname="tmn1_0" then delete;

2348 if optionname="tmn2_0" then delete;

2349 if optionname="tmn3_0" then delete;

2350 if optionname="tmn4_0" then delete;

2351 drop re cfspecies rbschd price elasticity ABT_NB_Ratio percent

IEchange oldlbs lbs

2351 ! price2008 dollars2008 GR CS PS TS CS3 CS7 TS3 TS7;

2352

2353 RUN;

NOTE: There were 94860 observations read from the data set WORK.STEP7DATA.

NOTE: The data set WORK.DISCOUNTING_OUT has 47430 observations and 7 variables.

NOTE: DATA statement used (Total process time):

real time 0.04 seconds

cpu time 0.04 seconds

110 The SAS System 12:35

Tuesday, March 22, 2011

Page 109
p4com_main_03.21.11_log.txt

2354

2355 ** ***merge regional producer surplus across all commercial species;

2356 Proc sql;

2357 create table discounting_out_reg as select

2358 optionname,

2359 region,

2360 year,

2361 sum(PS3) as totPS3 format=dollar30.0,

2362 sum(PS7) as totPS7 format=dollar30.0

2363 from discounting_out group by optionname, region, year;

NOTE: Table WORK.DISCOUNTING_OUT_REG created, with 1860 rows and 5 columns.

2364 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.04 seconds

cpu time 0.09 seconds

2365 *merge national producer surplus across all commercial species;

2366 Proc sql;

2367 create table discounting_out_nat as select

2368 optionname,

2369 year,

2370 sum(PS3) as totPS3 format=dollar30.0,

2371 sum(PS7) as totPS7 format=dollar30.0

2372 from discounting_out group by optionname, year;

NOTE: Table WORK.DISCOUNTING_OUT_NAT created, with 310 rows and 4 columns.

2373 quit;

NOTE: PROCEDURE SQL used (Total process time):

real time 0.04 seconds

cpu time 0.07 seconds

2374 *use national values to create a summary for each option;

2375 Data discounting_out_tmn1;

2376 set discounting_out_nat;

2377 if optionname~="tmn1" then delete;

2378 if year=61 then delete;

2379 if year=62 then delete;

2380 RUN;

NOTE: There were 310 observations read from the data set WORK.DISCOUNTING_OUT_NAT.

NOTE: The data set WORK.DISCOUNTING_OUT_TMN1 has 60 observations and 4 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

2381 Data discounting_out_tmn2;

2382 set discounting_out_nat;

2383 if optionname~="tmn2" then delete;

111 The SAS System 12:35

Tuesday, March 22, 2011

2384 if year=61 then delete;

2385 if year=62 then delete;

2386 RUN;

NOTE: There were 310 observations read from the data set WORK.DISCOUNTING_OUT_NAT.

NOTE: The data set WORK.DISCOUNTING_OUT_TMN2 has 60 observations and 4 variables.

NOTE: DATA statement used (Total process time):

real time 0.00 seconds

Page 110
p4com_main_03.21.11_log.txt

cpu time 0.00 seconds

2387 Data discounting_out_tmn3;

2388 set discounting_out_nat;

2389 if optionname~="tmn3" then delete;

2390 if year=61 then delete;

2391 if year=62 then delete;

2392 RUN;

NOTE: There were 310 observations read from the data set WORK.DISCOUNTING_OUT_NAT.

NOTE: The data set WORK.DISCOUNTING_OUT_TMN3 has 60 observations and 4 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

2393 Data discounting_out_tmn4;

2394 set discounting_out_nat;

2395 if optionname~="tmn4" then delete;

2396 if year=61 then delete;

2397 if year=62 then delete;

2398 RUN;

NOTE: There were 310 observations read from the data set WORK.DISCOUNTING_OUT_NAT.

NOTE: The data set WORK.DISCOUNTING_OUT_TMN4 has 60 observations and 4 variables.

NOTE: DATA statement used (Total process time):

real time 0.01 seconds

cpu time 0.01 seconds

2399

2400 %export(discounting_out_nat,"&outloc.&output.",discounting_out_nat)

NOTE: "DISCOUNTING_OUT_NAT" range/sheet was successfully created.

NOTE: PROCEDURE EXPORT used (Total process time):

real time 2.32 seconds

cpu time 0.12 seconds

2401 %export(discounting_out_tmn1,"&outloc.&output.",discounting_out_tmn1)

NOTE: "DISCOUNTING_OUT_TMN1" range/sheet was successfully created.

NOTE: PROCEDURE EXPORT used (Total process time):

real time 2.31 seconds

cpu time 0.20 seconds

112 The SAS System 12:35

Tuesday, March 22, 2011

2402 %export(discounting_out_tmn2,"&outloc.&output.",discounting_out_tmn2)

NOTE: "DISCOUNTING_OUT_TMN2" range/sheet was successfully created.

NOTE: PROCEDURE EXPORT used (Total process time):

real time 4.68 seconds

cpu time 0.14 seconds

2403 %export(discounting_out_tmn3,"&outloc.&output.",discounting_out_tmn3)

NOTE: "DISCOUNTING_OUT_TMN3" range/sheet was successfully created.

NOTE: PROCEDURE EXPORT used (Total process time):

Page 111
p4com_main_03.21.11_log.txt

real time 3.92 seconds

cpu time 0.18 seconds

2404 %export(discounting_out_tmn4,"&outloc.&output.",discounting_out_tmn4)

NOTE: "DISCOUNTING_OUT_TMN4" range/sheet was successfully created.

NOTE: PROCEDURE EXPORT used (Total process time):

real time 3.92 seconds

cpu time 0.18 seconds

2405

2406

2407

2408

NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414

NOTE: The SAS System used:

real time 1:37.08

cpu time 14.20 seconds

Page 112