<?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: Odsout.obj(): how to variate the name of pdf file by observation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Odsout-obj-how-to-variate-the-name-of-pdf-file-by-observation/m-p/802985#M316171</link>
    <description>Thank you Cynthia,&lt;BR /&gt;That works !</description>
    <pubDate>Sun, 20 Mar 2022 15:27:01 GMT</pubDate>
    <dc:creator>SASdevAnneMarie</dc:creator>
    <dc:date>2022-03-20T15:27:01Z</dc:date>
    <item>
      <title>Odsout.obj(): how to variate the name of pdf file by observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Odsout-obj-how-to-variate-the-name-of-pdf-file-by-observation/m-p/802973#M316165</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm wondering how to create a file by name. For exemple, in this example we create the file for each name (with&amp;nbsp;obj.open_dir(name: name, label: "", by: 1);&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to add the name on the pdf file like&amp;nbsp;Carte_(name of student).pdf&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you know please how to variate the name of pdf file by observation ?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title; ods listing close; ods html close; options nodate nonumber; ods escapechar="~"; options papersize=(15cm 10cm); options topmargin=0cm bottommargin=0cm leftmargin=0cm rightmargin=0cm; ods pdf file="Carte.pdf" notoc newfile=Bygroup;
data _null_; set sashelp.class; by name;
if _N_=1 then do; declare odsout obj(); end;
obj.open_dir(name: name, label: "", by: 1);
obj.layout_absolute(overrides: "borderwidth=1"); obj.region(width: "15cm", height: "2cm", overrides: "background=cx494068"); obj.format_text(data: "Groupe Scolaire L. Aragon", overrides: "color=cxbbb2e0 font_size=32pt", just: 'c');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you !&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2022 12:07:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Odsout-obj-how-to-variate-the-name-of-pdf-file-by-observation/m-p/802973#M316165</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2022-03-20T12:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: Odsout.obj(): how to variate the name of pdf file by observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Odsout-obj-how-to-variate-the-name-of-pdf-file-by-observation/m-p/802982#M316168</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; When you use NEWFILE=BYGROUP the behavior of ODS is to make numbered files, one increment for each by group value. If you want to do something that is data-driven so that the name of the student (or any other data driven value) is used in the FILE= option, you need to investigate using SAS macro variables and/or a SAS macro program. There have been examples of this posted in the past in the forums, so a search should help you find some of those examples.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2022 14:53:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Odsout-obj-how-to-variate-the-name-of-pdf-file-by-observation/m-p/802982#M316168</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2022-03-20T14:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: Odsout.obj(): how to variate the name of pdf file by observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Odsout-obj-how-to-variate-the-name-of-pdf-file-by-observation/m-p/802985#M316171</link>
      <description>Thank you Cynthia,&lt;BR /&gt;That works !</description>
      <pubDate>Sun, 20 Mar 2022 15:27:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Odsout-obj-how-to-variate-the-name-of-pdf-file-by-observation/m-p/802985#M316171</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2022-03-20T15:27:01Z</dc:date>
    </item>
  </channel>
</rss>

