SlideShare a Scribd company logo
ODS Markup and Tagsets, A tutorial. Eric Gebhart
 
ODS  MARKUP!
ODS Markup & Tagsets
 
Proc Template. It is NOT what you think it is!
Tagsets are ODS Destinations ODS Markup tagset=HTML4 .... ODS Tagsets.HTML4 .... ODS HTML4 .... ODS HTML ....
ODS HTML  is   ODS Markup!
ods tagsets.short_map    file =  "body.xml"    frame =  "frame.xml"   contents =  "contents.xml"    pages =  "pages.xml"    code =  "code.xml"    data =  "data.xml"    stylesheet = "stylesheet.xml"; ods _all_ close; The ODS Markup Statement
Special, Named Destinations. ,[object Object],[object Object],[object Object],[object Object],[object Object]
What is Different ? One more output file. Stylesheet Behavior. More Options.
The same options as before. Ods html file='test.html'  ( headtext ='<meta text=”my headtext”>', metatext ='text=”my meta text”, url =' http://www.sas.com/test.html ' ) newfile =table;
Multiple Stylesheet URL's! ODS html  file = ”test.html” stylesheet = ”test.css”  (url=” test.css corp.css corpnav.css ”);
Multiple Personality Disorder. Ods tagsets.myhtml file=”test.html” Alias=”NoNotes”;
Make up your own Options! ODS tagsets.test file=”test.txt” options ( embedded_titles  = 'yes' Orientation  = 'landscape' Doc  = 'Help');
Options inside the tagset. define tagset tagsets.test;  define event initialize; putvars $options _name_ ': ' _value_ nl; end; end;
The tagset Output. EMBEDDED_TITLES: yes ORIENTATION: landscape DOC: Help
One more method of control! ODS tagsets.htmlpanel file = ”test.html”; ODS tagsets.htmlpanel event = panel(start); ... ... ODS tagsets.htmlpanel event = panel(finish); ODS tagsets.htmlpanel close;
ODS Markup is like ODS HTML, PLUS!
Getting a list Proc template; list tagsets; Listing of: SASHELP.TMPLMST Path Filter is: Tagsets Sort by: PATH/ASCENDING Obs  Path  Type 1  Tagsets  Dir 2  Tagsets.Chtml  Tagset 3  Tagsets.Colorlatex  Tagset 4  Tagsets.Csv  Tagset
The HTML Family ,[object Object],[object Object],[object Object],[object Object],[object Object]
PHTML, Plain HTML. Simple 12 element Stylesheet No class attributes. No Fancy features.
HTMLCSS. Full Stylesheet Fancy Features
HTML4  is   ODS HTML Same as HtmlCSS More like Previous Releases
CHTML  - Compact HTML. iSNo Subset of HTML. No Styles. Super Set of Imode.
Data Transport  and  Excel. CSV, CSVByline, CSVAll PYX MSOffice2K ExcelXP DDE http://support.sas.com/news/feature/04jul/excelsupport.html
CSV &quot;Obs&quot;,&quot;Name&quot;,&quot;Sex&quot;,&quot;Age&quot;,&quot;Height&quot;,&quot;Weight&quot; &quot;1&quot;,&quot;Alfred&quot;,&quot;M&quot;,14,69.0,112.5 &quot;2&quot;,&quot;Alice&quot;,&quot;F&quot;,13,56.5,84.0 &quot;3&quot;,&quot;Barbara&quot;,&quot;F&quot;,13,65.3,98.0
PYX (data -Alfred Atype &quot;string&quot; Ajust &quot;l&quot; Acolcount &quot;1&quot; Acol &quot;2&quot; Asection &quot;body&quot; Aclass &quot;Data&quot; )data
The ExcelXP Tagset!
Publications, Papers,  PDF. LaTeX Troff DocBook
LaTeX Tagsets LaTeX SimpleLaTeX TablesOnlyLaTeX
Combined Slide Bars  - PDF via LaTeX
Other Miscellaneous Tagsets. ODSStyle Style_Popup Style_Display NamedHTML MVSHTML
 
Tagsets are Collections of Events
Events Define Actions & Output. define event doc; start: put HTMLDOCTYPE nl; put “<html>” nl; finish: put &quot;</html>&quot; nl; end;
A very simple tagset. proc template; define tagset  tagsets.plain ;  define event  data ; put  “Data: “   value  nl; end; define event  header ; put  “Header: “   value  nl; end; end; run;
Header: Obs Header: Name Header: Sex Header: Age Header: Height Header: Weight Header: 1 Data: Alfred Data: M Data: 14 Data: 69.0 Data: 112.5 ods  tagsets.plain  file=&quot;plain.txt&quot;; proc print data=sashelp.class;run; ods  tagsets.plain  close;
Label, Value Pairs Becomes this: <Table background=&quot;grey&quot; foreground=&quot;blue&quot; cellpadding=&quot;5&quot;> Putq '<Table'  ' background=' background; putq 'foreground='  foreground; putq 'cellpadding=' cellpadding; put '>' nl; With no attribute values, it becomes: <Table>
If Statements . Put 'Foreground is blue!' nl  /if  cmp ('blue', foreground); Put 'Foreground is not red!' nl  /if ^ cmp ('red', foreground);
AND and OR,  sort of... Put 'Some variables have a value.' nl /if  any (background,  foreground, cellpadding,  value); Put 'All variables have a value.'' nl  /if  exists (background, foreground, cellpadding, value);
Contains a Substring . Set $myvar “this is random text”; put “myvar has ran” nl  /if  contains ($myvar, “ran”);
Simple if test, Where clauses . Set $myvar “this is random text”; Set $mytest “True”; put “myvar has length” nl  /if $myvar; put “longer than 10” nl /if length($myvar) > 10 break /if $mytest;
Break, Breakif Break  /if ^$options; Trigger alternate_event /if $do_something_else; Break  /if $do_something_else; Trigger alternate_event  /breakif  $do_something_else;
A list of images. proc template; define tagset  tagsets.gifs ; define event  branch ; put  label  &quot;  &quot;;  end; define event  image ; put  url  nl;  end; end;  run;
The Output Name=Alfred  temp/gplot.gif Name=Alice  temp/gplot1.gif Name=Barbara  temp/gplot2.gif
A Prettier Report. proc template; define tagset  tagsets.gifs2 ; define event  branch ; set  $name  scan( label , 2, '=');  end; define event  image ; put  url   &quot;  &quot;  $name  nl;  end; end;  run;
Nicer looking Output temp/gplot.gif  Alfred temp/gplot1.gif  Alice temp/gplot2.gif  Barbara
The Set Statement. set  $myvar “foreground is” forground ; Always creates a string. Variables always start with $.
The Eval Statement. Eval $count 0; Eval $count $count + 1; set $myvar “this is a test”; Eval $index index($myvar, 'test');
Data Step Functions. Can be used anywhere. Cannot be nested except in where clauses.
Simple Needs, Simple Tagsets.
SQL ??? Create table CLASS (Name varchar(7), Sex varchar(1), Age float, Height float, Weight float); Insert into CLASS(Name, Sex, Age, Height, Weight) Values ('Alfred', 'M', 14, 69.0, 112.5); ... ...
Dictionaries define event type_translations; set $types['string'] 'varchar'; set $types['double'] 'float'; set $types['int']  'integer'; end; /* column name translation */ define event name_translations; set $name_trans['desc'] 'description'; end;
The Initialize Event define event initialize; trigger type_translations; trigger name_translations; /* types that need widths */ set $types_with_widths['string'] &quot;True&quot;; /* types that need quotes */ set $types_with_quotes['string'] &quot;True&quot;; end;
Creating Lists define event colspec_entry; set $lowname lowcase(name); do /if $name_trans[$lowname];  set $names[] $name_trans[$lowname]; else; set $names[] $lowname; done;
define event table_body; put &quot;Create table &quot; $table_name &quot;(&quot;; eval $i 1; unset $not_first; do   /while   $i <= $names;   /* comma's only after the first name */ put ', ' /if $not_first; put $names[$i] &quot; &quot;; put $columns[$i]; eval $i $i+1; set $not_first &quot;True&quot;; done;  put &quot;);&quot; nl; end;
Looping through A Dictionary iterate  $types do   /while   _name_ ;   put  _name_  “: “  _value_  nl; next  $types; done;
XBRL,  Data Interchange
Better Stripes.
Counting Rows
Streams . ,[object Object],[object Object],[object Object],[object Object]
Streams by example open junk; put “This goes to junk.” nl; put “  More stuff.” nl; close; open trash; put $$junk 'This goes to trash.'; putstream junk;  put “  This goes to trash too.”; open junk; put “  Even more stuff”; close; set $$junk “A completely new junk.”; set $$junk $$junk “  Appending to the end”; unset $$junk
Byline Modification
Repeating Row Headers
Simple Needs, Simple Tagsets.
Slide Bars.
Craeting Slide Bars. proc print data=sashelp.class; var name; var sex; var age;  var height / style(data) =  slider[just=center tagattr=&quot;slider-80&quot;]; var weight / style(data) =  slider[just=center tagattr=&quot;slider-150&quot;]; run;
WebSite Integration
Sashelp.class, My Favorite.
 
 
 
Tagset Inheritance . Define tagset  tagsets.SSV ; parent =  tagsets.csv ; define event  header ; start: put ';' / if ^cmp( COLSTART , &quot;1&quot;); put '&quot;'; put  VALUE ; finish: put '&quot;'; end; .....
Tagset Attributes Define tagset tagsets.mytags; map = '<>&'; mapsub = '/&lt;/&gt;/&amp;/'; nobreakspace = '&nbsp;' ; embedded_stylesheet = yes; output_type = html; lognote = “you are using my special tagset”;
Using Options define event  options_set ; trigger setup_options; end; define event setup_options; trigger nls_numbers; trigger  options_setup ; trigger  documentation ; end; ODS tagsets.excelxp options(embedded_titles='yes');
Mvar embedded_titles; define event  options_setup ; set $options['test'] &quot;test&quot; /if ^$options; do /if  $options ['EMBEDDED_TITLES']; do /if cmp( $options ['EMBEDDED_TITLES'], &quot;yes&quot;); set $embedded_titles &quot;true&quot; ; else; unset $embedded_titles; done; else; do /if cmp(embedded_titles, &quot;yes&quot;); set $embedded_titles &quot;true&quot; ; else; unset $embedded_titles; done; done;
Creating Help and documentation. define event  documentation; break /if ^$options; trigger  quick_reference  /if cmp($options['DOC'], 'quick'); trigger  help  /if cmp($options['DOC'], 'help'); end; define event  help ; putlog &quot;============================== “; putlog “The EXCELXP Tagset Help Text.&quot;; ... trigger quick_reference; end;
Extended Procedural Controls. Eval $count 10; do /while  $count < 10; eval $count $count+1; stop  /if $count = 9; continue  /if $count = 3; put $count nl; else; put “Count was already > 10” nl; done;
Else If do /if $count < 10; put “count is < 10”; nl; else /if $count = 11; put “Count is11” nl; else /if $count = 12; put “Count is 12” nl; else; put “Count is > 12” nl; done;
A process for Tagset Creation ,[object Object],[object Object],[object Object],[object Object]
Identify and Locate. Search the Output to be modified. Search the Tagset for the corresponding Event Search the Output of the Event_Map Tagset. Look for convienent events with short_map.
Finding & Exploring    with Event Map.  ods  tagsets.event_map  file=&quot;map.xml&quot;; < image   event_name =&quot; image &quot;  trigger_name =&quot;attr_out&quot; output_name =&quot;Gplot&quot;  output_label =&quot;Plot of Weight * Height&quot;  index =&quot;IDX&quot;  j ust =&quot;c&quot;  url =&quot; gplot.gif &quot;  />
Exploring Variables with Putvars.  Put “Event variables” nl; Putvars Event _name_ ': ' _value_ nl; Put “Style variables” nl; Putvars Style _name_ ': ' _value_ nl; Put “Options” nl; Putvars $Options _name_ ': ' _value_ nl;
Finding Other Useful Events.  Default_Event = putall; Define event putall; put '<' Event_name nl; Putvars Event _name_ ': ' _value_ nl; Putvars Style _name_ ': ' _value_ nl; Putvars Mem _name_ ': ' _value_ nl; put '>' Event_name nl; End;
Using a PutLog event.  Define event putlog; putlog “Event:” event_name nl; Putlog “Name is” “:” name; Putlog “Count is”  “:” $count; end;
Locating Alfred < branch   event_name =&quot;branch&quot;  trigger_name =&quot;attr_out&quot;  class =&quot;ByContentFolder&quot;  value =&quot;Name=Alfred&quot;   name =&quot;ByGroup1&quot;  label =&quot; Name=Alfred &quot;   index =&quot;IDX&quot;  just =&quot;c&quot;  url =&quot;junk.xml#IDX&quot;  hreftarget =&quot;body&quot;>
A Solution. proc template; define tagset tagsets.gifs2; define event branch; set $name scan(label, 2, '=');  end; define event image; put url &quot;  &quot; $name nl;  end;  end; run;
 
Useful Links   ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[email_address] [email_address]

More Related Content

What's hot

CSS Basics
CSS BasicsCSS Basics
CSS Basics
Sanjeev Kumar
 
Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)
club23
 
Le Wagon - Web 101
Le Wagon - Web 101Le Wagon - Web 101
Le Wagon - Web 101
Edward_Schults
 
File system node js
File system node jsFile system node js
File system node js
monikadeshmane
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
Nisa Soomro
 
CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout
Rachel Andrew
 
Wpf Introduction
Wpf IntroductionWpf Introduction
Wpf Introduction
Martha Rotter
 
CSS selectors
CSS selectorsCSS selectors
CSS selectors
Héla Ben Khalfallah
 
Introduction into ES6 JavaScript.
Introduction into ES6 JavaScript.Introduction into ES6 JavaScript.
Introduction into ES6 JavaScript.
boyney123
 
CSS3 2D/3D transform
CSS3 2D/3D transformCSS3 2D/3D transform
CSS3 2D/3D transform
Kenny Lee
 
CSS media types
CSS media typesCSS media types
CSS media types
Russ Weakley
 
Introduction to SASS
Introduction to SASSIntroduction to SASS
Introduction to SASS
Jon Dean
 
Basic-CSS-tutorial
Basic-CSS-tutorialBasic-CSS-tutorial
Basic-CSS-tutorial
tutorialsruby
 
Pipeline oriented programming
Pipeline oriented programmingPipeline oriented programming
Pipeline oriented programming
Scott Wlaschin
 
Goroutines and Channels in practice
Goroutines and Channels in practiceGoroutines and Channels in practice
Goroutines and Channels in practice
Guilherme Garnier
 
Css pseudo-classes
Css pseudo-classesCss pseudo-classes
Css pseudo-classes
Webtech Learning
 
Domain Modeling Made Functional (KanDDDinsky 2019)
Domain Modeling Made Functional (KanDDDinsky 2019)Domain Modeling Made Functional (KanDDDinsky 2019)
Domain Modeling Made Functional (KanDDDinsky 2019)
Scott Wlaschin
 
Css properties
Css propertiesCss properties
Idiomatic Kotlin
Idiomatic KotlinIdiomatic Kotlin
Idiomatic Kotlin
intelliyole
 
Php with mysql ppt
Php with mysql pptPhp with mysql ppt
Php with mysql ppt
Rajamanickam Gomathijayam
 

What's hot (20)

CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)
 
Le Wagon - Web 101
Le Wagon - Web 101Le Wagon - Web 101
Le Wagon - Web 101
 
File system node js
File system node jsFile system node js
File system node js
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout CSS Day: CSS Grid Layout
CSS Day: CSS Grid Layout
 
Wpf Introduction
Wpf IntroductionWpf Introduction
Wpf Introduction
 
CSS selectors
CSS selectorsCSS selectors
CSS selectors
 
Introduction into ES6 JavaScript.
Introduction into ES6 JavaScript.Introduction into ES6 JavaScript.
Introduction into ES6 JavaScript.
 
CSS3 2D/3D transform
CSS3 2D/3D transformCSS3 2D/3D transform
CSS3 2D/3D transform
 
CSS media types
CSS media typesCSS media types
CSS media types
 
Introduction to SASS
Introduction to SASSIntroduction to SASS
Introduction to SASS
 
Basic-CSS-tutorial
Basic-CSS-tutorialBasic-CSS-tutorial
Basic-CSS-tutorial
 
Pipeline oriented programming
Pipeline oriented programmingPipeline oriented programming
Pipeline oriented programming
 
Goroutines and Channels in practice
Goroutines and Channels in practiceGoroutines and Channels in practice
Goroutines and Channels in practice
 
Css pseudo-classes
Css pseudo-classesCss pseudo-classes
Css pseudo-classes
 
Domain Modeling Made Functional (KanDDDinsky 2019)
Domain Modeling Made Functional (KanDDDinsky 2019)Domain Modeling Made Functional (KanDDDinsky 2019)
Domain Modeling Made Functional (KanDDDinsky 2019)
 
Css properties
Css propertiesCss properties
Css properties
 
Idiomatic Kotlin
Idiomatic KotlinIdiomatic Kotlin
Idiomatic Kotlin
 
Php with mysql ppt
Php with mysql pptPhp with mysql ppt
Php with mysql ppt
 

Similar to Ods Markup And Tagsets: A Tutorial

Jquery
JqueryJquery
Система рендеринга в Magento
Система рендеринга в MagentoСистема рендеринга в Magento
Система рендеринга в Magento
Magecom Ukraine
 
PHP
PHP PHP
Modern Perl
Modern PerlModern Perl
Modern Perl
Marcos Rebelo
 
JavaScript Needn't Hurt!
JavaScript Needn't Hurt!JavaScript Needn't Hurt!
JavaScript Needn't Hurt!
Thomas Kjeldahl Nilsson
 
PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
Ankush Jain
 
Php Crash Course
Php Crash CoursePhp Crash Course
Php Crash Course
mussawir20
 
Introduction To Lamp
Introduction To LampIntroduction To Lamp
Introduction To Lamp
Amzad Hossain
 
Bioinformatica 10-11-2011-p6-bioperl
Bioinformatica 10-11-2011-p6-bioperlBioinformatica 10-11-2011-p6-bioperl
Bioinformatica 10-11-2011-p6-bioperl
Prof. Wim Van Criekinge
 
Perl Presentation
Perl PresentationPerl Presentation
Perl Presentation
Sopan Shewale
 
What's new in Rails 2?
What's new in Rails 2?What's new in Rails 2?
What's new in Rails 2?
brynary
 
Beginning Perl
Beginning PerlBeginning Perl
Beginning Perl
Dave Cross
 
Introduction to Modern Perl
Introduction to Modern PerlIntroduction to Modern Perl
Introduction to Modern Perl
Dave Cross
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on Rails
Aizat Faiz
 
Introduction to Perl
Introduction to PerlIntroduction to Perl
Introduction to Perl
Dave Cross
 
Introduction to Perl - Day 1
Introduction to Perl - Day 1Introduction to Perl - Day 1
Introduction to Perl - Day 1
Dave Cross
 
Perl Moderno
Perl ModernoPerl Moderno
Perl Moderno
Tiago Peczenyj
 
Introduction to Perl - Day 2
Introduction to Perl - Day 2Introduction to Perl - Day 2
Introduction to Perl - Day 2
Dave Cross
 
LPW: Beginners Perl
LPW: Beginners PerlLPW: Beginners Perl
LPW: Beginners Perl
Dave Cross
 
Zendcon 2007 Features
Zendcon 2007 FeaturesZendcon 2007 Features
Zendcon 2007 Features
fivespeed5
 

Similar to Ods Markup And Tagsets: A Tutorial (20)

Jquery
JqueryJquery
Jquery
 
Система рендеринга в Magento
Система рендеринга в MagentoСистема рендеринга в Magento
Система рендеринга в Magento
 
PHP
PHP PHP
PHP
 
Modern Perl
Modern PerlModern Perl
Modern Perl
 
JavaScript Needn't Hurt!
JavaScript Needn't Hurt!JavaScript Needn't Hurt!
JavaScript Needn't Hurt!
 
PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
 
Php Crash Course
Php Crash CoursePhp Crash Course
Php Crash Course
 
Introduction To Lamp
Introduction To LampIntroduction To Lamp
Introduction To Lamp
 
Bioinformatica 10-11-2011-p6-bioperl
Bioinformatica 10-11-2011-p6-bioperlBioinformatica 10-11-2011-p6-bioperl
Bioinformatica 10-11-2011-p6-bioperl
 
Perl Presentation
Perl PresentationPerl Presentation
Perl Presentation
 
What's new in Rails 2?
What's new in Rails 2?What's new in Rails 2?
What's new in Rails 2?
 
Beginning Perl
Beginning PerlBeginning Perl
Beginning Perl
 
Introduction to Modern Perl
Introduction to Modern PerlIntroduction to Modern Perl
Introduction to Modern Perl
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on Rails
 
Introduction to Perl
Introduction to PerlIntroduction to Perl
Introduction to Perl
 
Introduction to Perl - Day 1
Introduction to Perl - Day 1Introduction to Perl - Day 1
Introduction to Perl - Day 1
 
Perl Moderno
Perl ModernoPerl Moderno
Perl Moderno
 
Introduction to Perl - Day 2
Introduction to Perl - Day 2Introduction to Perl - Day 2
Introduction to Perl - Day 2
 
LPW: Beginners Perl
LPW: Beginners PerlLPW: Beginners Perl
LPW: Beginners Perl
 
Zendcon 2007 Features
Zendcon 2007 FeaturesZendcon 2007 Features
Zendcon 2007 Features
 

Recently uploaded

Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
Edge AI and Vision Alliance
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 

Recently uploaded (20)

Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 

Ods Markup And Tagsets: A Tutorial

  • 1. ODS Markup and Tagsets, A tutorial. Eric Gebhart
  • 2.  
  • 4. ODS Markup & Tagsets
  • 5.  
  • 6. Proc Template. It is NOT what you think it is!
  • 7. Tagsets are ODS Destinations ODS Markup tagset=HTML4 .... ODS Tagsets.HTML4 .... ODS HTML4 .... ODS HTML ....
  • 8. ODS HTML is ODS Markup!
  • 9. ods tagsets.short_map file = &quot;body.xml&quot; frame = &quot;frame.xml&quot; contents = &quot;contents.xml&quot; pages = &quot;pages.xml&quot; code = &quot;code.xml&quot; data = &quot;data.xml&quot; stylesheet = &quot;stylesheet.xml&quot;; ods _all_ close; The ODS Markup Statement
  • 10.
  • 11. What is Different ? One more output file. Stylesheet Behavior. More Options.
  • 12. The same options as before. Ods html file='test.html' ( headtext ='<meta text=”my headtext”>', metatext ='text=”my meta text”, url =' http://www.sas.com/test.html ' ) newfile =table;
  • 13. Multiple Stylesheet URL's! ODS html file = ”test.html” stylesheet = ”test.css” (url=” test.css corp.css corpnav.css ”);
  • 14. Multiple Personality Disorder. Ods tagsets.myhtml file=”test.html” Alias=”NoNotes”;
  • 15. Make up your own Options! ODS tagsets.test file=”test.txt” options ( embedded_titles = 'yes' Orientation = 'landscape' Doc = 'Help');
  • 16. Options inside the tagset. define tagset tagsets.test; define event initialize; putvars $options _name_ ': ' _value_ nl; end; end;
  • 17. The tagset Output. EMBEDDED_TITLES: yes ORIENTATION: landscape DOC: Help
  • 18. One more method of control! ODS tagsets.htmlpanel file = ”test.html”; ODS tagsets.htmlpanel event = panel(start); ... ... ODS tagsets.htmlpanel event = panel(finish); ODS tagsets.htmlpanel close;
  • 19. ODS Markup is like ODS HTML, PLUS!
  • 20. Getting a list Proc template; list tagsets; Listing of: SASHELP.TMPLMST Path Filter is: Tagsets Sort by: PATH/ASCENDING Obs Path Type 1 Tagsets Dir 2 Tagsets.Chtml Tagset 3 Tagsets.Colorlatex Tagset 4 Tagsets.Csv Tagset
  • 21.
  • 22. PHTML, Plain HTML. Simple 12 element Stylesheet No class attributes. No Fancy features.
  • 23. HTMLCSS. Full Stylesheet Fancy Features
  • 24. HTML4 is ODS HTML Same as HtmlCSS More like Previous Releases
  • 25. CHTML - Compact HTML. iSNo Subset of HTML. No Styles. Super Set of Imode.
  • 26. Data Transport and Excel. CSV, CSVByline, CSVAll PYX MSOffice2K ExcelXP DDE http://support.sas.com/news/feature/04jul/excelsupport.html
  • 27. CSV &quot;Obs&quot;,&quot;Name&quot;,&quot;Sex&quot;,&quot;Age&quot;,&quot;Height&quot;,&quot;Weight&quot; &quot;1&quot;,&quot;Alfred&quot;,&quot;M&quot;,14,69.0,112.5 &quot;2&quot;,&quot;Alice&quot;,&quot;F&quot;,13,56.5,84.0 &quot;3&quot;,&quot;Barbara&quot;,&quot;F&quot;,13,65.3,98.0
  • 28. PYX (data -Alfred Atype &quot;string&quot; Ajust &quot;l&quot; Acolcount &quot;1&quot; Acol &quot;2&quot; Asection &quot;body&quot; Aclass &quot;Data&quot; )data
  • 30. Publications, Papers, PDF. LaTeX Troff DocBook
  • 31. LaTeX Tagsets LaTeX SimpleLaTeX TablesOnlyLaTeX
  • 32. Combined Slide Bars - PDF via LaTeX
  • 33. Other Miscellaneous Tagsets. ODSStyle Style_Popup Style_Display NamedHTML MVSHTML
  • 34.  
  • 36. Events Define Actions & Output. define event doc; start: put HTMLDOCTYPE nl; put “<html>” nl; finish: put &quot;</html>&quot; nl; end;
  • 37. A very simple tagset. proc template; define tagset tagsets.plain ; define event data ; put “Data: “ value nl; end; define event header ; put “Header: “ value nl; end; end; run;
  • 38. Header: Obs Header: Name Header: Sex Header: Age Header: Height Header: Weight Header: 1 Data: Alfred Data: M Data: 14 Data: 69.0 Data: 112.5 ods tagsets.plain file=&quot;plain.txt&quot;; proc print data=sashelp.class;run; ods tagsets.plain close;
  • 39. Label, Value Pairs Becomes this: <Table background=&quot;grey&quot; foreground=&quot;blue&quot; cellpadding=&quot;5&quot;> Putq '<Table' ' background=' background; putq 'foreground=' foreground; putq 'cellpadding=' cellpadding; put '>' nl; With no attribute values, it becomes: <Table>
  • 40. If Statements . Put 'Foreground is blue!' nl /if cmp ('blue', foreground); Put 'Foreground is not red!' nl /if ^ cmp ('red', foreground);
  • 41. AND and OR, sort of... Put 'Some variables have a value.' nl /if any (background, foreground, cellpadding, value); Put 'All variables have a value.'' nl /if exists (background, foreground, cellpadding, value);
  • 42. Contains a Substring . Set $myvar “this is random text”; put “myvar has ran” nl /if contains ($myvar, “ran”);
  • 43. Simple if test, Where clauses . Set $myvar “this is random text”; Set $mytest “True”; put “myvar has length” nl /if $myvar; put “longer than 10” nl /if length($myvar) > 10 break /if $mytest;
  • 44. Break, Breakif Break /if ^$options; Trigger alternate_event /if $do_something_else; Break /if $do_something_else; Trigger alternate_event /breakif $do_something_else;
  • 45. A list of images. proc template; define tagset tagsets.gifs ; define event branch ; put label &quot; &quot;; end; define event image ; put url nl; end; end; run;
  • 46. The Output Name=Alfred temp/gplot.gif Name=Alice temp/gplot1.gif Name=Barbara temp/gplot2.gif
  • 47. A Prettier Report. proc template; define tagset tagsets.gifs2 ; define event branch ; set $name scan( label , 2, '='); end; define event image ; put url &quot; &quot; $name nl; end; end; run;
  • 48. Nicer looking Output temp/gplot.gif Alfred temp/gplot1.gif Alice temp/gplot2.gif Barbara
  • 49. The Set Statement. set $myvar “foreground is” forground ; Always creates a string. Variables always start with $.
  • 50. The Eval Statement. Eval $count 0; Eval $count $count + 1; set $myvar “this is a test”; Eval $index index($myvar, 'test');
  • 51. Data Step Functions. Can be used anywhere. Cannot be nested except in where clauses.
  • 53. SQL ??? Create table CLASS (Name varchar(7), Sex varchar(1), Age float, Height float, Weight float); Insert into CLASS(Name, Sex, Age, Height, Weight) Values ('Alfred', 'M', 14, 69.0, 112.5); ... ...
  • 54. Dictionaries define event type_translations; set $types['string'] 'varchar'; set $types['double'] 'float'; set $types['int'] 'integer'; end; /* column name translation */ define event name_translations; set $name_trans['desc'] 'description'; end;
  • 55. The Initialize Event define event initialize; trigger type_translations; trigger name_translations; /* types that need widths */ set $types_with_widths['string'] &quot;True&quot;; /* types that need quotes */ set $types_with_quotes['string'] &quot;True&quot;; end;
  • 56. Creating Lists define event colspec_entry; set $lowname lowcase(name); do /if $name_trans[$lowname]; set $names[] $name_trans[$lowname]; else; set $names[] $lowname; done;
  • 57. define event table_body; put &quot;Create table &quot; $table_name &quot;(&quot;; eval $i 1; unset $not_first; do /while $i <= $names; /* comma's only after the first name */ put ', ' /if $not_first; put $names[$i] &quot; &quot;; put $columns[$i]; eval $i $i+1; set $not_first &quot;True&quot;; done; put &quot;);&quot; nl; end;
  • 58. Looping through A Dictionary iterate $types do /while _name_ ; put _name_ “: “ _value_ nl; next $types; done;
  • 59. XBRL, Data Interchange
  • 62.
  • 63. Streams by example open junk; put “This goes to junk.” nl; put “ More stuff.” nl; close; open trash; put $$junk 'This goes to trash.'; putstream junk; put “ This goes to trash too.”; open junk; put “ Even more stuff”; close; set $$junk “A completely new junk.”; set $$junk $$junk “ Appending to the end”; unset $$junk
  • 68. Craeting Slide Bars. proc print data=sashelp.class; var name; var sex; var age; var height / style(data) = slider[just=center tagattr=&quot;slider-80&quot;]; var weight / style(data) = slider[just=center tagattr=&quot;slider-150&quot;]; run;
  • 71.  
  • 72.  
  • 73.  
  • 74. Tagset Inheritance . Define tagset tagsets.SSV ; parent = tagsets.csv ; define event header ; start: put ';' / if ^cmp( COLSTART , &quot;1&quot;); put '&quot;'; put VALUE ; finish: put '&quot;'; end; .....
  • 75. Tagset Attributes Define tagset tagsets.mytags; map = '<>&'; mapsub = '/&lt;/&gt;/&amp;/'; nobreakspace = '&nbsp;' ; embedded_stylesheet = yes; output_type = html; lognote = “you are using my special tagset”;
  • 76. Using Options define event options_set ; trigger setup_options; end; define event setup_options; trigger nls_numbers; trigger options_setup ; trigger documentation ; end; ODS tagsets.excelxp options(embedded_titles='yes');
  • 77. Mvar embedded_titles; define event options_setup ; set $options['test'] &quot;test&quot; /if ^$options; do /if $options ['EMBEDDED_TITLES']; do /if cmp( $options ['EMBEDDED_TITLES'], &quot;yes&quot;); set $embedded_titles &quot;true&quot; ; else; unset $embedded_titles; done; else; do /if cmp(embedded_titles, &quot;yes&quot;); set $embedded_titles &quot;true&quot; ; else; unset $embedded_titles; done; done;
  • 78. Creating Help and documentation. define event documentation; break /if ^$options; trigger quick_reference /if cmp($options['DOC'], 'quick'); trigger help /if cmp($options['DOC'], 'help'); end; define event help ; putlog &quot;============================== “; putlog “The EXCELXP Tagset Help Text.&quot;; ... trigger quick_reference; end;
  • 79. Extended Procedural Controls. Eval $count 10; do /while $count < 10; eval $count $count+1; stop /if $count = 9; continue /if $count = 3; put $count nl; else; put “Count was already > 10” nl; done;
  • 80. Else If do /if $count < 10; put “count is < 10”; nl; else /if $count = 11; put “Count is11” nl; else /if $count = 12; put “Count is 12” nl; else; put “Count is > 12” nl; done;
  • 81.
  • 82. Identify and Locate. Search the Output to be modified. Search the Tagset for the corresponding Event Search the Output of the Event_Map Tagset. Look for convienent events with short_map.
  • 83. Finding & Exploring with Event Map. ods tagsets.event_map file=&quot;map.xml&quot;; < image event_name =&quot; image &quot; trigger_name =&quot;attr_out&quot; output_name =&quot;Gplot&quot; output_label =&quot;Plot of Weight * Height&quot; index =&quot;IDX&quot; j ust =&quot;c&quot; url =&quot; gplot.gif &quot; />
  • 84. Exploring Variables with Putvars. Put “Event variables” nl; Putvars Event _name_ ': ' _value_ nl; Put “Style variables” nl; Putvars Style _name_ ': ' _value_ nl; Put “Options” nl; Putvars $Options _name_ ': ' _value_ nl;
  • 85. Finding Other Useful Events. Default_Event = putall; Define event putall; put '<' Event_name nl; Putvars Event _name_ ': ' _value_ nl; Putvars Style _name_ ': ' _value_ nl; Putvars Mem _name_ ': ' _value_ nl; put '>' Event_name nl; End;
  • 86. Using a PutLog event. Define event putlog; putlog “Event:” event_name nl; Putlog “Name is” “:” name; Putlog “Count is” “:” $count; end;
  • 87. Locating Alfred < branch event_name =&quot;branch&quot; trigger_name =&quot;attr_out&quot; class =&quot;ByContentFolder&quot; value =&quot;Name=Alfred&quot; name =&quot;ByGroup1&quot; label =&quot; Name=Alfred &quot; index =&quot;IDX&quot; just =&quot;c&quot; url =&quot;junk.xml#IDX&quot; hreftarget =&quot;body&quot;>
  • 88. A Solution. proc template; define tagset tagsets.gifs2; define event branch; set $name scan(label, 2, '='); end; define event image; put url &quot; &quot; $name nl; end; end; run;
  • 89.  
  • 90.