Community deutschsprachiger SAS-Anwender und -Programmierer

Antworten
Dies ist eine offene Gruppe. Melden Sie sich an und klicken Sie auf die Schaltfläche „Gruppe beitreten“, um Mitglied zu werden und damit zu beginnen, Beiträge in dieser Gruppe zu veröffentlichen.
Highlighted
SAS Employee
Beiträge: 232
SAS Tipp #5: ODS PDF style - Style Collection Book

Dear Community,

If you want to export your reports or anykind of printouts, you can choose the "ODS PDF" solution. When I did this, I found the option "style=...;" and did find out, that SAS has provided 59 different Styles. What I didn't find out was, how each of them looked like. I figured, that I might not be the only person with this issue, so I decided to create a little "Collection Book", where you can find a preview of every single Style of these 59.

Thanks to Jan Heuer for the "Gesetzliche Feiertage"-Code. Smiley (zwinkernd)

%let year = 2014;

%let district = all;

%let easter = holiday('easter',&year.);

%let style = Styles.Def;

ods pdf file = "C:\Users\Roman Nagurski\Documents\sastraining\Kalender\Kalender_Def.pdf"

style= &style;

Proc format;

  value $Feiertag

  "-" = "kein Feiertag"

  "+" = "Feiertag"

  "k" = "Feiertag in Gemeinden mit überwiegend katholischer Bevölkerung"

  "f" = "Feiertag in Augsburg"

  "#" = "Feiertag in bestimmten Gemeinden im Kreis Bautzen und im Westlausitzkreis"

"/" = "kein gesetzlicher Feiertag"

  ;

  value Feiertag

  0 = "-"

  1 = "+"

  2 = "k"

  3 = "f"

  4 = "#"

  ;

run;

title "&style";

Data Feiertage;

  Format Feiertag $40. date mmddyy8. BW BY BN BB HB HH HE MV NI NW RP SL SN SA SH TH all Feiertag.;

  Label

  Feiertag = "gesetzlicher Feiertag"

  BW = "Baden-Württemberg"

  BY = "Bayern"

  BN = "Berlin"

  BB = "Brandenburg"

  HB = "Hansestadt Bremen"

  HH = "Hansestadt Hamburg"

  HE = "Hessen"

  MV = "Mecklenburg-Vorpommern"

  NI = "Niedersachsen"

  NW = "Nordrhein-Westfalen"

  RP = "Rheinland-Pfalz"

  SL = "Saarland"

  SN = "Sachsen"

  SA = "Sachsen-Anhalt"

  SH = "Schleswig-Holstein"

  TH = "Thüringen"

  ;

  array bl BW--all;

  dummy = holiday('easter',&year.);

  do over bl; bl=1;end;

  Feiertag = "Neujahr "; date = "01JAN&YEAR."d; output;

  Feiertag = "Karfreitag "; date = dummy - 2 ; output;

  Feiertag = "Ostersonntag "; date = dummy ; output;

  Feiertag = "Ostermontag "; date = dummy + 1 ; output;

  Feiertag = "Tag der Arbeit "; date = "01MAY&YEAR."d; output;

  Feiertag = "Christi Himmelfahrt "; date = dummy + 37 ; output;

  Feiertag = "Pfingstsonntag "; date = dummy + 49 ; output;

  Feiertag = "Pfingstmontag "; date = dummy + 50 ; output;

  Feiertag = "Tag der Deutschen Einheit "; date = "03OCT&YEAR."d; output;

  Feiertag = "1. Weihnachten "; date = "25DEC&YEAR."d; output;

  Feiertag = "2. Weihnachten "; date = "26DEC&YEAR."d; output;

  do over bl; bl = 0; end;

  Feiertag = "Fronleichnam "; date = dummy + 60; BW = 1 ; BY = 1; HE = 1; NW = 1; RP = 1; SL = 1; SN = 4; TH = 2; all= 1; output;

  do over bl; bl = 0; end;

  Feiertag = "Heilige Drei Könige"; date = "06JAN&YEAR."d; BY = 1; BW = 1; all = 1; output;

  do over bl; bl = 0; end;

  Feiertag = "Maria Himmelfahrt "; date = "15AUG&YEAR."d; BY = 2; SL = 1; all = 1; output;

  do over bl; bl = 0; end;

  Feiertag = "Reformationstag "; date = "31OCT&YEAR."d; BB = 1; MV = 1; SN = 1; SA = 1; TH = 1; all = 1; output;

  do over bl; bl = 0; end;

  Feiertag = "Allerheiligen "; date = "01NOV&YEAR."d; BY = 1; BW = 1; NW = 1; RP = 1; SL = 1; all= 1; output;

  do over bl; bl = 0; end;

  /* EDIT:

  Feiertag = "Friedenstag "; Datum = "01AUG&YEAR."d; BY = 3; output;

  */

  Feiertag = "Friedensfest "; date = "08AUG&YEAR."d; BY = 3; all = 1; output;

  do over bl; bl = 0; end;

  Feiertag = "Buß- und Bettag ";

  dummy = weekday("23NOV&YEAR."d);

  if dummy <= 4 then

  dummy = dummy + 7;

  Datum = "23NOV&YEAR."d - (dummy - 4);

  SN = 1; all = 1;

  output;

  drop dummy;

run;

Proc sort Data= Feiertage;

by date;

run;

Proc print Data= Feiertage;

run;

ods pdf close;