<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Manipulate data within ODS PDF in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150349#M11596</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi RW9,&lt;/P&gt;&lt;P&gt;Here is the code that I have generated and I have it some what working.&amp;nbsp; My issue is the purple box that is around my variable that is my link.&amp;nbsp; How can I remove this purple border and make the text the link not the cell?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options nodate nonumber ;&lt;/P&gt;&lt;P&gt;ods listing close;&lt;/P&gt;&lt;P&gt;ods pdf file="c:\temp\Tmp.pdf" style=statistical;&lt;/P&gt;&lt;P&gt;ods escapechar="^";&amp;nbsp; /* The escape char for new lines etc. */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc report data=xyz nowd contents="" ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; columns year3 name2 varname label ;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; define year3 / " " ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define name2 / " " ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define varname / " " ;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; define label / " " ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; compute varname ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; urlstring="#"||strip(varname) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; call define('varname','url',urlstring) ;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; endcomp ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set x ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; call execute('ods pdf anchor="'||strip(varname)||'";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc report data=y nowd contents="";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; columns varname label ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define varname / "VARNAME";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define label / "LABEL";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where varname="'||strip(varname)||'";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;ods pdf close;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 May 2014 15:19:52 GMT</pubDate>
    <dc:creator>jerry898969</dc:creator>
    <dc:date>2014-05-09T15:19:52Z</dc:date>
    <item>
      <title>Manipulate data within ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150338#M11585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm very new to ODS and i'm trying to create an automated process that will take multiple data sets and create a pdf file displaying the meta of the data.&lt;/P&gt;&lt;P&gt;Is there a way through ODS to know how many observations a data set has?&amp;nbsp; I want to show the users that the data they created has n rows, without having to create a seperate query or data set to have the count value.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 12:49:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150338#M11585</guid>
      <dc:creator>jerry898969</dc:creator>
      <dc:date>2014-05-08T12:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulate data within ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150339#M11586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; I'm confused about what you want. You ask whether there is "a way through ODS to know how many observations a data set has"? And the answer is yes, but then you say "without having to create a separate query or data set to have the count value"? You'd have to at least run SOMETHING, because ODS OUTPUT can capture the output from PROC CONTENTS about the number of observations, but ODS OUTPUT would create a dataset, and that's what you say you don't want to do. But using ODS OUTPUT for this is like killing flies with a sledgehammer. It is far easier to write an SQL query against one of the DICTIONARY tables and make a macro variable -- you don't need ODS with PROC SQL to make a macro variable. But then you HAVE a macro variable to use anywhere -- in an ODS step, in a DATA step program, in a TITLE statement. ODS, by itself, has no "magic" way of getting the observation count. ODS OUTPUT creates a data set from a procedure; and ODS destinations create output files. Nothing about ODS goes straight to the descriptor portion of the data set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; The code below doesn't seem too troublesome to me. What is the issue with something like this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc sql noprint;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; select nobs into :numobs&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; from dictionary.tables&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; where libname = "SASHELP" and&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; memname = "CARS";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods _all_ close;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;%put how many cars = &amp;amp;numobs;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html file='c:\temp\shownum.html';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc print data=sashelp.cars(obs=10);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; title "Showing 10 obs of &amp;amp;numobs";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; var make model type msrp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html close;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 13:02:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150339#M11586</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2014-05-08T13:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulate data within ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150340#M11587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cynthia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was hoping that there was a way to get the observation count out of my data table without having to create a macro variable.&amp;nbsp; I need to do this for multiple data tables and didn't want to have to create a macro variable for each.&amp;nbsp; I wanted to limit the number of statements.&amp;nbsp;&amp;nbsp; I also don't want to show all the data with the count.&amp;nbsp; I'm creating the first page of my pdf that shows the number of data rows, a title and a data id.&amp;nbsp; These are all coming from different queries.&amp;nbsp; How can I put all three on one page and style them?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your code that helped with a separate issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 14:23:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150340#M11587</guid>
      <dc:creator>jerry898969</dc:creator>
      <dc:date>2014-05-08T14:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulate data within ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150341#M11588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could query the sashelp.vtable table which has the obs in:&lt;/P&gt;&lt;P&gt;data counts (keep=libname memname nobs);&lt;BR /&gt;&amp;nbsp; set sashelp.vtable;&lt;BR /&gt;&amp;nbsp; where libname="SASHELP" and memname in ('CARS','CLASS','BMT');&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=counts;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 14:36:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150341#M11588</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-05-08T14:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulate data within ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150342#M11589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you RW9 for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to add the count to a text field.&amp;nbsp; How can I do that with the nobs variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The difficult part is taking variables from multiple data sets and trying to place them in certain positions within the first and second pages of my ods pdf file&lt;/P&gt;&lt;P&gt;i'm trying to create.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 15:16:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150342#M11589</guid>
      <dc:creator>jerry898969</dc:creator>
      <dc:date>2014-05-08T15:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulate data within ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150343#M11590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For using the nobs var in a text field that's pretty straightforward. &lt;/P&gt;&lt;P&gt;text_field=strip(put(nobs,best.))||" "||strip(text_field);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With regards to your second point, you might consider using some SQL, for instance create an empty table, and then insert rows as you require.&amp;nbsp; You have DICTIONARY.COLUMNS and TABLES you can select from (or the VTABLE, VCOLUMN in SASHELP), and join insert the data as needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you could post some test input and required output I would be able to suggest further.&amp;nbsp; I am leaving for the day but can get back to this tomorrow. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 15:29:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150343#M11590</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-05-08T15:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulate data within ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150344#M11591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you RW9 for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first page of my pdf will have an "id: ######"&amp;nbsp; then about 5 rows from there I will have the Title="Data Descripition" and then under that I will have "Number of rows: ##"&amp;nbsp; The "#" will be values coming out of my first data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID VAR vLabel&lt;/P&gt;&lt;P&gt;0001&amp;nbsp; vTest1 TEST LABEL 1&lt;/P&gt;&lt;P&gt;0001&amp;nbsp; vTest2 TEST LABEL 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;based on above data the first page will look like this but everything should be centered and rows between them:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"id: 0001"&lt;/P&gt;&lt;P&gt;"Data Descripition"&lt;/P&gt;&lt;P&gt;"Number of rows:02"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I need to create a table of contents using my variable names and have them link to the data displayed coming out of my second data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vTest1(link) TEST LABEL 1 VALUES(link)&lt;/P&gt;&lt;P&gt;vTest2(link) TEST LABEL 2 VALUES(link)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my second data set will have&lt;/P&gt;&lt;P&gt;VAR valueid Value Text&lt;/P&gt;&lt;P&gt;vTest1 1 Yes&amp;nbsp;&amp;nbsp; THIS IS USED FOR vTest1&lt;/P&gt;&lt;P&gt;vTest1 2 No&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; THIS IS USED FOR vTest1&lt;/P&gt;&lt;P&gt;vTest2 1 Yes THIS IS USED FOR vTest2&lt;/P&gt;&lt;P&gt;vTest2 2 Maybe THIS IS USED FOR vTest2&lt;/P&gt;&lt;P&gt;vTest3 3 No THIS IS USED FOR vTest2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The values link will link to the variable values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vTest1 TEST LABEL 1&lt;/P&gt;&lt;P&gt;THIS IS USED FOR vTest1&lt;/P&gt;&lt;P&gt;1 Yes&lt;/P&gt;&lt;P&gt;2 No&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vTest2 TEST LABEL 2&lt;/P&gt;&lt;P&gt;THIS IS USED FOR vTest2&lt;/P&gt;&lt;P&gt;1 Yes&lt;/P&gt;&lt;P&gt;2 Maybe&lt;/P&gt;&lt;P&gt;3 No&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again for all your help.&amp;nbsp; Have a great day.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 15:43:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150344#M11591</guid>
      <dc:creator>jerry898969</dc:creator>
      <dc:date>2014-05-08T15:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulate data within ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150345#M11592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whoa, you are asking a lot in that mail.&amp;nbsp; Am going to split this over two posts.&amp;nbsp; First I attach a small section of code which shows how to get the information out of the sashelp tables, and assign pdf anchors.&amp;nbsp; Note that your anchor needs to be all character (no numbers).&amp;nbsp; Here is the code which whilst not exactly what you want can be fiddled around with:&lt;/P&gt;&lt;P&gt;/* Get information required */&lt;BR /&gt;proc sql;&lt;BR /&gt;&amp;nbsp; create table HEADER as&lt;BR /&gt;&amp;nbsp; select&amp;nbsp; distinct&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "id: "||strip(MEMNAME)||"^nData Description: "||strip(MEMLABEL)||"^nNumber of Rows: "||strip(put(NOBS,best.)) as INFO&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* The above has an escape character for newline to get the information on next row in output */&lt;BR /&gt;&amp;nbsp; from&amp;nbsp;&amp;nbsp;&amp;nbsp; SASHELP.VTABLE&lt;BR /&gt;&amp;nbsp; where&amp;nbsp;&amp;nbsp; LIBNAME="SASHELP"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; and&amp;nbsp;&amp;nbsp; MEMNAME in ("CARS","CLASS");&lt;BR /&gt;quit;&lt;BR /&gt;proc sql;&lt;BR /&gt;&amp;nbsp; create table VARS as&lt;BR /&gt;&amp;nbsp; select&amp;nbsp; MEMNAME,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NAME,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "^S={just=left vjust=middle cellheight=20pt font_size=10pt cellwidth=15cm linkcolor=white url='#"||strip(MEMNAME)||strip(NAME)||"'} "||strip(MEMNAME)||", "||Strip(NAME) as ANCHOR&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Note the url= which sets the link from main page, and it needs to be all character, preceded by hash, and match something later on */&lt;BR /&gt;&amp;nbsp; from&amp;nbsp;&amp;nbsp;&amp;nbsp; SASHELP.VCOLUMN&lt;BR /&gt;&amp;nbsp; where&amp;nbsp;&amp;nbsp; LIBNAME="SASHELP"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; and&amp;nbsp;&amp;nbsp; MEMNAME in ("CARS","CLASS");&lt;BR /&gt;quit;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;/* Creating PDF */ &lt;BR /&gt;ods pdf file="s:\temp\rob\Tmp.pdf" style=statistical;&lt;BR /&gt;ods escapechar="^";&amp;nbsp; /* The escape char for new lines etc. */&lt;BR /&gt;proc report data=header nowd contents="";&lt;BR /&gt;&amp;nbsp; columns info;&lt;BR /&gt; define info / " ";&lt;BR /&gt;run;&lt;BR /&gt;proc report data=vars nowd contents="";&lt;BR /&gt;&amp;nbsp; columns memname name anchor;&lt;BR /&gt;&amp;nbsp; define memname / noprint;&lt;BR /&gt;&amp;nbsp; define name / noprint;&lt;BR /&gt;&amp;nbsp; define anchor / " ";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;/* This loops over each varriable in the vars dataset and generates a proc report for each one, with an anchor set which matches the main page */&lt;BR /&gt;data _null_;&lt;BR /&gt;&amp;nbsp; set vars;&lt;BR /&gt;&amp;nbsp; call execute('ods pdf anchor="'||strip(memname)||strip(name)||'";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc report data=vars nowd contents="";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; columns memname name;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define memname / "Mem name";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define name / "Name";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where memname="'||strip(memname)||'" and name="'||strip(name)||'";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;');&lt;BR /&gt;run;&lt;BR /&gt;ods pdf close;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 08:49:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150345#M11592</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-05-09T08:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulate data within ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150346#M11593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now, following on from that example, the next thing I wanted to ask is what you are trying to do.&amp;nbsp; From your description I assume you are trying to create if not exactly, similar to, a define.xml file.&amp;nbsp; This isn't a simple thing.&amp;nbsp; I would suggest that you start by investigating the CDSIC documentation:&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://www.cdisc.org/define-xml"&gt;http://www.cdisc.org/define-xml&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a number of tools out there to help with the creation of this, for example SAS has its own Clinical Data Toolkit, which has options to create define.&amp;nbsp; It is more about setting your metadata up first though.&amp;nbsp; For instance many companies have a specifications document which details each domain, variable and codelist, and that spec is used to create both the output datasets and the define document.&amp;nbsp; You could create your metadata by hand, create list of datasets, from that create list of variables, from that create list of uniques within data, each step looping over the previous.&amp;nbsp; However I would suggest then that you would be generating your specs from the data, rather than the specs generating how the data looks, and trust me the latter of those two is the way to go = specs first, then program from that!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyways, hope the code helps, and definitely look at define.pdf/xml.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 08:55:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150346#M11593</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-05-09T08:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulate data within ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150347#M11594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;RW9,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for your help.&amp;nbsp; I will look into all options you mentioned.&amp;nbsp; The old process we had was like a "MS access" report where you could bind a query to a report and just layout the fields on the report and then the report would be executed and generate with the data from the query.&amp;nbsp;&amp;nbsp; Is the spec something like that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No link within the PDF can have a number as part of the display?&amp;nbsp; That is going to be a big problem since all the data I need to link has numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again for all your help it is appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 12:38:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150347#M11594</guid>
      <dc:creator>jerry898969</dc:creator>
      <dc:date>2014-05-09T12:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulate data within ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150348#M11595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, MS forms are quite visual.&amp;nbsp; Base SAS doesn't have much in the way of visual report making, its primarily code based. The term 'spec' stands for any kind of specification.&amp;nbsp; For me we tend to have CDISC based domain/variable specs, you can see from the metadata provided by them.&amp;nbsp; Its a description of what datasets are present,what variables each dataset contains, what code lists are used etc.&amp;nbsp; This is then translatd into XML, and a stylesheet attached which gives a nice web page based linked file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, that is right, see my thread on: &lt;A _jive_internal="true" class="active_link" href="https://communities.sas.com/thread/42000"&gt;https://communities.sas.com/thread/42000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;However, it shouldn't be a problem.&amp;nbsp; Just pre-process your data creating a new variable then translate the numbers into chars as it is only for a behind the scenes link:&lt;/P&gt;&lt;P&gt;my_anchor=tranwrd(varname,"1","A");&lt;/P&gt;&lt;P&gt;Then If your varname is HELLO1234, after processing the varname would be the same, but the anchor value would be HELLOABCD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 12:58:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150348#M11595</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-05-09T12:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulate data within ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150349#M11596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi RW9,&lt;/P&gt;&lt;P&gt;Here is the code that I have generated and I have it some what working.&amp;nbsp; My issue is the purple box that is around my variable that is my link.&amp;nbsp; How can I remove this purple border and make the text the link not the cell?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options nodate nonumber ;&lt;/P&gt;&lt;P&gt;ods listing close;&lt;/P&gt;&lt;P&gt;ods pdf file="c:\temp\Tmp.pdf" style=statistical;&lt;/P&gt;&lt;P&gt;ods escapechar="^";&amp;nbsp; /* The escape char for new lines etc. */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc report data=xyz nowd contents="" ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; columns year3 name2 varname label ;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; define year3 / " " ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define name2 / " " ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; define varname / " " ;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; define label / " " ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; compute varname ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; urlstring="#"||strip(varname) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; call define('varname','url',urlstring) ;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; endcomp ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set x ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; call execute('ods pdf anchor="'||strip(varname)||'";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc report data=y nowd contents="";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; columns varname label ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define varname / "VARNAME";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define label / "LABEL";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where varname="'||strip(varname)||'";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;ods pdf close;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 15:19:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150349#M11596</guid>
      <dc:creator>jerry898969</dc:creator>
      <dc:date>2014-05-09T15:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulate data within ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150350#M11597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the macro which i used to find the number of records in a dataset .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/******check the data exists in the report or not, then send mail notification******/&lt;/P&gt;&lt;P&gt;%macro check(dsn);&lt;/P&gt;&lt;P&gt;%global nobs;&lt;/P&gt;&lt;P&gt;/*%let nobs=.;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Open the data set of interest;&lt;/P&gt;&lt;P&gt;%let dsnid = %sysfunc(open(&amp;amp;dsn));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* If the open was successful get the;&lt;/P&gt;&lt;P&gt;* number of observations and CLOSE &amp;amp;dsn;&lt;/P&gt;&lt;P&gt;%if &amp;amp;dsnid %then %do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let nobs=%sysfunc(attrn(&amp;amp;dsnid,nlobs));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let rc&amp;nbsp; =%sysfunc(close(&amp;amp;dsnid));&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;%else %do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %put Unable to open &amp;amp;dsn - %sysfunc(sysmsg());&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Return the number of observations;&lt;/P&gt;&lt;P&gt;%put &amp;amp;nobs;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;%check(work.mape);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put &amp;amp;nobs;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 May 2014 07:42:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Manipulate-data-within-ODS-PDF/m-p/150350#M11597</guid>
      <dc:creator>Vish33</dc:creator>
      <dc:date>2014-05-10T07:42:48Z</dc:date>
    </item>
  </channel>
</rss>

