Sas Log for this Request
NOTE: running request program hsrc.pbcat1way92.sas
NOTE: %INCLUDE (level 1) file /nas02/data/sasweb/hsrc/sascode/pbcat1way92.sas is file /nas02/data/sasweb/hsrc/sascode/pbcat1way92.sas.
2 +%macro pbcat;
3 +
4 +options mlogic mprint symbolgen;
5 +libname p '/nas02/depts/hsrc/pbcat92';
6 +options fmtsearch=(p);
7 +%global yr fmt r pb year rord oneyr xl;
8 +%if &year= %then %let year=2009;
9 +
10 +data _null_; %*set p.pbcat&pb(obs=1);
11 +/*length y1 $ 100;old 105;old 110;old 115;*/
12 +length y1 $ 120;
13 +y1="year in("||"&year"||")";
14 +call symput('yr',y1);
15 +if countw("&year")=1 then call symput('oneyr','1');
16 +params=countw("&row");
17 +rw=scan("&row",1,',');
18 +call symput('r',rw);
19 +if params>1 and scan("&row",2,',')^='default' then fmt=catx(" ","format",rw,scan("&row",2,',')); else fmt=' ';
20 +call symput('fmt',fmt);
21 +if params>2 then rord=scan("&row",3,','); else rord='fmt';
22 +call symput('rord',rord);
23 +run;
24 +
25 +%if &geog=Statewide %then %do;
26 +%let gwhr=;
27 +%let geo=Statewide;
28 +%end;
29 +%if &geog=City %then %do;
30 +data _null_;
31 +geo=catx(" ","City of",put(&city,city.));
32 +call symput('geo',geo);
33 +gwhr=catt("and city=","&city");
34 +call symput('gwhr',gwhr);
35 +run;
36 +%end;
37 +%if &geog=County %then %do;
38 +data _null_;
39 +geo=catx(" ",put(&county,county.),'County');
40 +call symput('geo',geo);
41 +gwhr=catt("and county=","&county");
42 +call symput('gwhr',gwhr);
43 +run;
44 +%end;
45 +%if &geog=Region %then %do;
46 +data _null_;
47 +geo=catx(" ",put(®ion,region.),'Region');
48 +call symput('geo',geo);
49 +gwhr=catt("and region=","®ion");
50 +call symput('gwhr',gwhr);
51 +run;
52 +%end;
53 +proc sql; select label into :lbl from p.&pb.cols where
54 +lowcase(name)="%lowcase(&r)";
55 +quit;
56 +title1 "&geo"
57 +%if &pb=ped %then " Pedestrian Crash";
58 +%else " Bicycle Crash";
59 +" Data - &lbl";
60 +title2 "For Years &year";
61 +proc sql;
62 +select count(*) into :anyobs from p.pbcat&pb(where=(&yr &gwhr));
63 +quit;
64 +%if &anyobs=0 %then %do;
65 +ods html file=_webout(no_top_matter no_bottom_matter) style=journal;
66 +data _null_; file print;
67 +put 'Sorry, no cases were found.';
68 +run;
69 +ods html close;
70 +%end;
71 +%else %do;
72 +ods html file=_webout(no_top_matter no_bottom_matter)
73 +%if &xl=0 %then style=journal %else style=minimal;;
WARNING: Missing semicolon between %THEN clause and ELSE has been assumed.
74 +proc tabulate missing data=p.pbcat&pb(where=(&yr &gwhr));
75 +class year ;
76 +class &r / order=&rord ;
77 +tables &r='' all='Total', (year %if &oneyr=1 %then;
78 +%else all='Total';
79 +)*(n=''*f=comma6.0)/misstext='0' box="&lbl";
80 +&fmt; run;
81 +ods html close;
82 +%end;
83 +%mend pbcat;
84 +
85 +%pbcat;
MPRINT(PBCAT): ;
MPRINT(PBCAT): libname p '/nas02/depts/hsrc/pbcat92';
NOTE: Libref P was successfully assigned as follows:
Engine: V9
Physical Name: /nas02/depts/hsrc/pbcat92
MPRINT(PBCAT): options fmtsearch=(p);
MLOGIC(PBCAT): %GLOBAL YR FMT R PB YEAR RORD ONEYR XL
SYMBOLGEN: Macro variable YEAR resolves to 2010,2011,2012,2013,2014,2015,2016,2017,2018,2019
MLOGIC(PBCAT): %IF condition &year= is FALSE
MPRINT(PBCAT): data _null_;
MPRINT(PBCAT): length y1 $ 120;
SYMBOLGEN: Macro variable YEAR resolves to 2010,2011,2012,2013,2014,2015,2016,2017,2018,2019
MPRINT(PBCAT): y1="year in("||"2010,2011,2012,2013,2014,2015,2016,2017,2018,2019"||")";
MPRINT(PBCAT): call symput('yr',y1);
SYMBOLGEN: Macro variable YEAR resolves to 2010,2011,2012,2013,2014,2015,2016,2017,2018,2019
MPRINT(PBCAT): if countw("2010,2011,2012,2013,2014,2015,2016,2017,2018,2019")=1 then call symput('oneyr','1');
SYMBOLGEN: Macro variable ROW resolves to
MPRINT(PBCAT): params=countw("");
SYMBOLGEN: Macro variable ROW resolves to
MPRINT(PBCAT): rw=scan("",1,',');
MPRINT(PBCAT): call symput('r',rw);
SYMBOLGEN: Macro variable ROW resolves to
SYMBOLGEN: Macro variable ROW resolves to
MPRINT(PBCAT): if params>1 and scan("",2,',')^='default' then fmt=catx(" ","format",rw,scan("",2,','));
MPRINT(PBCAT): else fmt=' ';
MPRINT(PBCAT): call symput('fmt',fmt);
The SAS System
SYMBOLGEN: Macro variable ROW resolves to
MPRINT(PBCAT): if params>2 then rord=scan("",3,',');
MPRINT(PBCAT): else rord='fmt';
MPRINT(PBCAT): call symput('rord',rord);
MPRINT(PBCAT): run;
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
SYMBOLGEN: Macro variable GEOG resolves to Statewide
MLOGIC(PBCAT): %IF condition &geog=Statewide is TRUE
MLOGIC(PBCAT): %LET (variable name is GWHR)
MLOGIC(PBCAT): %LET (variable name is GEO)
SYMBOLGEN: Macro variable GEOG resolves to Statewide
MLOGIC(PBCAT): %IF condition &geog=City is FALSE
SYMBOLGEN: Macro variable GEOG resolves to Statewide
MLOGIC(PBCAT): %IF condition &geog=County is FALSE
SYMBOLGEN: Macro variable GEOG resolves to Statewide
MLOGIC(PBCAT): %IF condition &geog=Region is FALSE
MPRINT(PBCAT): proc sql;
SYMBOLGEN: Macro variable PB resolves to bike
MLOGIC(PBCAT): Beginning compilation of LOWCASE using the autocall file /nas/longleaf/rhel8/apps/sas/9.4M8/SASFoundation/9.4/sasautos/lowcase.sas.
MLOGIC(PBCAT): Ending compilation of LOWCASE.
MPRINT(PBCAT): select label into :lbl from p.bikecols where lowcase(name)=
MLOGIC(LOWCASE): Beginning execution.
MLOGIC(LOWCASE): This macro was compiled from the autocall file /nas/longleaf/rhel8/apps/sas/9.4M8/SASFoundation/9.4/sasautos/lowcase.sas
SYMBOLGEN: Macro variable R resolves to
MLOGIC(LOWCASE): Parameter STRING has value
SYMBOLGEN: Macro variable STRING resolves to
MLOGIC(LOWCASE): Ending execution.
MPRINT(PBCAT): "";
NOTE: No rows were selected.
MPRINT(PBCAT): quit;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.06 seconds
cpu time 0.02 seconds
The SAS System
SYMBOLGEN: Macro variable GEO resolves to Statewide
SYMBOLGEN: Macro variable PB resolves to bike
MLOGIC(PBCAT): %IF condition &pb=ped is FALSE
WARNING: Apparent symbolic reference LBL not resolved.
MPRINT(PBCAT): title1 "Statewide" " Bicycle Crash" " Data - &lbl";
SYMBOLGEN: Macro variable YEAR resolves to 2010,2011,2012,2013,2014,2015,2016,2017,2018,2019
MPRINT(PBCAT): title2 "For Years 2010,2011,2012,2013,2014,2015,2016,2017,2018,2019";
MPRINT(PBCAT): proc sql;
SYMBOLGEN: Macro variable PB resolves to bike
SYMBOLGEN: Macro variable YR resolves to year in(2010,2011,2012,2013,2014,2015,2016,2017,2018,2019)
SYMBOLGEN: Macro variable GWHR resolves to
MPRINT(PBCAT): select count(*) into :anyobs from p.pbcatbike(where=(year in(2010,2011,2012,2013,2014,2015,2016,2017,2018,2019) ));
MPRINT(PBCAT): quit;
NOTE: The PROCEDURE SQL printed page 1.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.04 seconds
cpu time 0.00 seconds
SYMBOLGEN: Macro variable ANYOBS resolves to 9476
MLOGIC(PBCAT): %IF condition &anyobs=0 is FALSE
SYMBOLGEN: Macro variable XL resolves to
MLOGIC(PBCAT): %IF condition &xl=0 is FALSE
MPRINT(PBCAT): ods html file=_webout(no_top_matter no_bottom_matter) style=minimal;
NOTE: Writing HTML Body file: _WEBOUT
SYMBOLGEN: Macro variable PB resolves to bike
SYMBOLGEN: Macro variable YR resolves to year in(2010,2011,2012,2013,2014,2015,2016,2017,2018,2019)
SYMBOLGEN: Macro variable GWHR resolves to
MPRINT(PBCAT): proc tabulate missing data=p.pbcatbike(where=(year in(2010,2011,2012,2013,2014,2015,2016,2017,2018,2019) ));
MPRINT(PBCAT): class year ;
SYMBOLGEN: Macro variable R resolves to
SYMBOLGEN: Macro variable RORD resolves to f
NOTE: Line generated by the macro variable "RORD".
85 f
-
22
The SAS System
76
SYMBOLGEN: Macro variable R resolves to
NOTE: Line generated by the invoked macro "PBCAT".
85 ; proc tabulate missing data=p.pbcat&pb(where=(&yr &gwhr)); class year ; class &r / order=&rord ; tables &r='' all='Total', (year
-----
180
ERROR 22-322: Syntax error, expecting one of the following: DATA, EXTERNAL, FMT, FORMATED, FORMATTED, FREQ, INTERNAL, UNFMT, UNFORMATTED.
ERROR 76-322: Syntax error, statement will be ignored.
ERROR 180-322: Statement is not valid or it is used out of proper order.
SYMBOLGEN: Macro variable ONEYR resolves to
MLOGIC(PBCAT): %IF condition &oneyr=1 is FALSE
WARNING: Apparent symbolic reference LBL not resolved.
MPRINT(PBCAT): class / order=f tables ='' all='Total', (year all='Total' )*(n=''*f=comma6.0)/misstext='0' box="&lbl";
SYMBOLGEN: Macro variable FMT resolves to
MPRINT(PBCAT): ;
MPRINT(PBCAT): run;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE TABULATE used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
MPRINT(PBCAT): ods html close;
MLOGIC(PBCAT): Ending execution.
86 +
NOTE: %INCLUDE (level 1) ending.
NOTE: request has completed
WARNING: Application generated no output.