<?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 How to use labels in proc export or create tab dlm file using proc print in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76783#M8692</link>
    <description>I need to create a tab dlm file out of a sas dataset with label names. &lt;BR /&gt;
&lt;BR /&gt;
So if I can achieve either of the following it would work.&lt;BR /&gt;
&lt;BR /&gt;
a. I am able to get the labels using proc print but tab delimited is a problem.&lt;BR /&gt;
b. I am able to create tab delimited using proc export but getting the labels is a problem.&lt;BR /&gt;
&lt;BR /&gt;
Would request sas gurus to help me out.&lt;BR /&gt;
&lt;BR /&gt;
Regards</description>
    <pubDate>Mon, 09 Mar 2009 19:06:30 GMT</pubDate>
    <dc:creator>w020637</dc:creator>
    <dc:date>2009-03-09T19:06:30Z</dc:date>
    <item>
      <title>How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76783#M8692</link>
      <description>I need to create a tab dlm file out of a sas dataset with label names. &lt;BR /&gt;
&lt;BR /&gt;
So if I can achieve either of the following it would work.&lt;BR /&gt;
&lt;BR /&gt;
a. I am able to get the labels using proc print but tab delimited is a problem.&lt;BR /&gt;
b. I am able to create tab delimited using proc export but getting the labels is a problem.&lt;BR /&gt;
&lt;BR /&gt;
Would request sas gurus to help me out.&lt;BR /&gt;
&lt;BR /&gt;
Regards</description>
      <pubDate>Mon, 09 Mar 2009 19:06:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76783#M8692</guid>
      <dc:creator>w020637</dc:creator>
      <dc:date>2009-03-09T19:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76784#M8693</link>
      <description>SAS-supplied macro %DS2CSV can generate such an output.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 09 Mar 2009 20:11:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76784#M8693</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-03-09T20:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76785#M8694</link>
      <description>Hi:&lt;BR /&gt;
  Also,&lt;BR /&gt;
[pre]&lt;BR /&gt;
ODS CSV FILE='xxxxxx.csv';&lt;BR /&gt;
proc print data=sashelp.class label;&lt;BR /&gt;
run;&lt;BR /&gt;
ODS CSV CLOSE:&lt;BR /&gt;
[/pre]&lt;BR /&gt;
  &lt;BR /&gt;
will do what you want.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 09 Mar 2009 20:42:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76785#M8694</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-03-09T20:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76786#M8695</link>
      <description>I read the OP as wanting tab-delimited output, rather than comma-delimited.  I looked briefly for some ODS CSV parameter option but found none.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 09 Mar 2009 20:51:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76786#M8695</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-03-09T20:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76787#M8696</link>
      <description>Yes, Scott, The objective is to get a tab delimited file.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
w020637</description>
      <pubDate>Mon, 09 Mar 2009 21:18:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76787#M8696</guid>
      <dc:creator>w020637</dc:creator>
      <dc:date>2009-03-09T21:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76788#M8697</link>
      <description>Sorry for the incomplete answer. There is in 9.2, a delimiter= option that allows you to change the delimiter from a comma to a tab character (which is 09'x, I believe) for ODS CSV.&lt;BR /&gt;
&lt;BR /&gt;
If you invoke this way, you will see what the options are:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods csv file='c:\temp\csvhelp.csv'&lt;BR /&gt;
    options(doc='Help');&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Then the delimiter option goes in parens:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods csv file='c:\temp\tabhelp.txt'&lt;BR /&gt;
    options(doc='Help' delimiter="09"x);&lt;BR /&gt;
proc print data=sashelp.class(obs=3) label;&lt;BR /&gt;
run;&lt;BR /&gt;
ods csv close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 10 Mar 2009 04:41:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76788#M8697</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-03-10T04:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76789#M8698</link>
      <description>&lt;P&gt;&amp;gt; There is in 9.2, a&lt;BR /&gt;&amp;gt; delimiter= option that allows you to change the&lt;BR /&gt;&amp;gt; delimiter from a comma to a tab character (which is&lt;BR /&gt;&amp;gt; 09'x, I believe) for ODS CSV.&lt;BR /&gt;&lt;BR /&gt;That will be a nice feature. I look forward to using 9.2, soon perhaps.&lt;BR /&gt;&lt;BR /&gt;The features of the FILE and PUT statement plus the call routine VNEXT make the data step solution fairly concise.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename FT24F001 temp lrecl=512;
data _null_;
   file FT24F001 dsd dlm='09'x;
   set sashelp.shoes(obs=3);
   if _n_ eq 1 then link nameRow;
   put (_all_)(:);
   return;
 nameRow:
   length _LABEL_ $128 _NAME_ $32;
   if _n_ eq 1 then do;
      do while(1);
         call vnext(_name_);
         if _name_ eq '_LABEL_' then leave;
         _label_ = vlabelx(_name_);
         put _label_ @;
         end;
      put;
      end;
   return;
   run;


data _null_;
   infile FT24F001;
   input;
   list;
   run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/27921i3F727B8C00497396/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 13:34:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76789#M8698</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2019-03-14T13:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76790#M8699</link>
      <description>Hi guys,&lt;BR /&gt;
&lt;BR /&gt;
I am using 9.1 and so the above solutions are not working for me. Appreciate the alacrity with which you guys have responded.&lt;BR /&gt;
&lt;BR /&gt;
Regards&lt;BR /&gt;
&lt;BR /&gt;
w020637</description>
      <pubDate>Tue, 10 Mar 2009 14:33:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76790#M8699</guid>
      <dc:creator>w020637</dc:creator>
      <dc:date>2009-03-10T14:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76791#M8700</link>
      <description>Hi:&lt;BR /&gt;
  I believe that you can download a copy of the CSV tagset template that will work for SAS 9.1.3 from this site:&lt;BR /&gt;
&lt;A href="http://support.sas.com/rnd/base/ods/odsmarkup/" target="_blank"&gt;http://support.sas.com/rnd/base/ods/odsmarkup/&lt;/A&gt; (scroll down until you see the link for the CSV tagsets).&lt;BR /&gt;
&lt;BR /&gt;
  The SUGI paper that describes the OPTIONS suboption list and the DELIMITER suboption was written for SAS 9.1.3, so I believe you CAN get the delimiter, you just have to do some extra work because it's not included automatically with SAS (as it is in 9.2). &lt;BR /&gt;
&lt;A href="http://support.sas.com/rnd/base/ods/odsmarkup/p236-31.pdf" target="_blank"&gt;http://support.sas.com/rnd/base/ods/odsmarkup/p236-31.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
  Although this note talks about installing and using the ExcelXP tagset template, the information about installing a tagset template and using the ODS PATH statement, also apply for updates to the CSV tagset template:&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/32/394.html" target="_blank"&gt;http://support.sas.com/kb/32/394.html&lt;/A&gt; &lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 10 Mar 2009 15:13:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76791#M8700</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-03-10T15:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76792#M8701</link>
      <description>&lt;A href="http://ftp.sas.com/techsup/download/sample/datastep/robust.html" target="_blank"&gt;http://ftp.sas.com/techsup/download/sample/datastep/robust.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
helps to get the requirement&lt;BR /&gt;
&lt;BR /&gt;
Regards&lt;BR /&gt;
&lt;BR /&gt;
w020637</description>
      <pubDate>Wed, 11 Mar 2009 13:55:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76792#M8701</guid>
      <dc:creator>w020637</dc:creator>
      <dc:date>2009-03-11T13:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76793#M8702</link>
      <description>But my program does work in V9.1.  You just assumed it would not work?</description>
      <pubDate>Wed, 11 Mar 2009 16:21:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76793#M8702</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2009-03-11T16:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76794#M8703</link>
      <description>Sorry for reviving this thread, I got pointed to it from another thread.&lt;BR /&gt;
data _null_, I like the simplicity of your data step, and the way you got around enumerating variables. &lt;BR /&gt;
Fyi, I made a small macro out of it, for those (frequent) cases when tweaking the output is not needed.&lt;BR /&gt;
[pre]&lt;BR /&gt;
&lt;BR /&gt;
%macro write_CSV(fileref=              /* REQD: export fileref                               */&lt;BR /&gt;
                ,dataset=              /* REQD: dataset name, including options if necessary */&lt;BR /&gt;
                ,delimiter=','         /* OPTN: eg: '09'x and ' ' for tab and space          */&lt;BR /&gt;
                ,firstrow=LABEL        /* OPTN: Values: LABEL or NAME or NONE                */&lt;BR /&gt;
                ,addquotes=SPECIALCHAR /* OPTN: Values: ALLVAR or ALLCHAR or SPECIALCHAR     */&lt;BR /&gt;
                );&lt;BR /&gt;
  data _null_;&lt;BR /&gt;
    set &amp;amp;dataset;&lt;BR /&gt;
    file &amp;amp;fileref  dlm=&amp;amp;delimiter %if %upcase(&amp;amp;addquotes) ne ALLCHAR %then dsd;;&lt;BR /&gt;
    %if %upcase(&amp;amp;addquotes)=ALLCHAR %then format _CHARACTER_ $quote.;;&lt;BR /&gt;
    %if %upcase(&amp;amp;firstrow) ne NONE %then if _N_ = 1 then link firstrow;;    &lt;BR /&gt;
    put (_ALL_)(%if %upcase(&amp;amp;addquotes)=ALLVAR %then~;:);&lt;BR /&gt;
    length __LABEL__ $256 __NAME__ $32;&lt;BR /&gt;
    return;&lt;BR /&gt;
    firstrow:&lt;BR /&gt;
    do while( __NAME__ ne '__LABEL__' );&lt;BR /&gt;
      call vnext(__NAME__);&lt;BR /&gt;
      __LABEL__ = vlabelx(__NAME__);&lt;BR /&gt;
      if __NAME__ ne '__LABEL__' then put __%upcase(&amp;amp;firstrow)__ @;&lt;BR /&gt;
      else put;&lt;BR /&gt;
    end;&lt;BR /&gt;
  run;&lt;BR /&gt;
%mend;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
One question though: how come all PDV variables are not output when put (_ALL_) is run?</description>
      <pubDate>Mon, 03 Aug 2009 00:47:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76794#M8703</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2009-08-03T00:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76795#M8704</link>
      <description>Chris           &lt;BR /&gt;
Your macro must be completed &lt;BR /&gt;
as in the case of an ALLCHAR choice there is an error&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
file &amp;amp;fileref  dlm=&amp;amp;delimiter %if %upcase(&amp;amp;addquotes) ne ALLCHAR %then dsd%str(;);&lt;BR /&gt;
%else %str(;);&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Andre   from Paris ( not linked to any submarine activity  &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;     )</description>
      <pubDate>Mon, 03 Aug 2009 12:56:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76795#M8704</guid>
      <dc:creator>Andre</dc:creator>
      <dc:date>2009-08-03T12:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76796#M8705</link>
      <description>Fixed, André, thank you. &lt;BR /&gt;
I usually try to end my %if tests with a double ;; to remove %str() clutter, but I thought I'd post a more formal version... I have reverted to my old self now. That will teach me!  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
Do you know why some PDV variables are not output when put (_ALL_) is run? I am still perplexed.</description>
      <pubDate>Mon, 03 Aug 2009 21:09:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76796#M8705</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2009-08-03T21:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76797#M8706</link>
      <description>Chris:&lt;BR /&gt;
  I ran a much simpler test and found that the simple PUT _ALL_ writes out everything, including _N_ and _ERROR_, as shown below. If you're seeing something else, you might want to work with Tech Support or redo your macro to see if you can figure out where things might be going wrong.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
  data _null_;&lt;BR /&gt;
    set sashelp.shoes(obs=5);&lt;BR /&gt;
    file 'c:\temp\test_putall.txt';&lt;BR /&gt;
    format _CHARACTER_ $quote.;&lt;BR /&gt;
    format _NUMERIC_;&lt;BR /&gt;
    if _N_ = 1 then link firstrow;    &lt;BR /&gt;
    put _ALL_;&lt;BR /&gt;
    return;&lt;BR /&gt;
    firstrow:&lt;BR /&gt;
       put 'What will be written out?';&lt;BR /&gt;
    return;&lt;BR /&gt;
  run;&lt;BR /&gt;
              &lt;BR /&gt;
Output:&lt;BR /&gt;
What will be written out?&lt;BR /&gt;
Region="Africa" Product="Boot" Subsidiary="Addis Ababa" Stores=12 Sales=29761 Inventory=191821 Returns=769 _ERROR_=0 _N_=1&lt;BR /&gt;
Region="Africa" Product="Men's Casual" Subsidiary="Addis Ababa" Stores=4 Sales=67242 Inventory=118036 Returns=2284 _ERROR_=0 _N_=2&lt;BR /&gt;
Region="Africa" Product="Men's Dress" Subsidiary="Addis Ababa" Stores=7 Sales=76793 Inventory=136273 Returns=2433 _ERROR_=0 _N_=3&lt;BR /&gt;
Region="Africa" Product="Sandal" Subsidiary="Addis Ababa" Stores=10 Sales=62819 Inventory=204284 Returns=1861 _ERROR_=0 _N_=4&lt;BR /&gt;
Region="Africa" Product="Slipper" Subsidiary="Addis Ababa" Stores=14 Sales=68641 Inventory=279795 Returns=1771 _ERROR_=0 _N_=5&lt;BR /&gt;
                                 &lt;BR /&gt;
[/pre]</description>
      <pubDate>Mon, 03 Aug 2009 22:14:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76797#M8706</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-08-03T22:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76798#M8707</link>
      <description>Hi Cynthia,&lt;BR /&gt;
&lt;BR /&gt;
Replacing&lt;BR /&gt;
 put _ALL_;  &lt;BR /&gt;
with&lt;BR /&gt;
 put (_ALL_)(:);  &lt;BR /&gt;
&lt;BR /&gt;
will drop all variables declared after the put statement, including _N_and _ERROR_ .</description>
      <pubDate>Mon, 03 Aug 2009 22:49:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76798#M8707</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2009-08-03T22:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76799#M8708</link>
      <description>Hi:&lt;BR /&gt;
  I must not understand what you mean. When I replaced PUT _ALL_; with PUT (_ALL_) (:); this is what I expected and what I got:&lt;BR /&gt;
[pre]&lt;BR /&gt;
What will be written out?&lt;BR /&gt;
"Africa" "Boot" "Addis Ababa" 12 29761 191821 769&lt;BR /&gt;
"Africa" "Men's Casual" "Addis Ababa" 4 67242 118036 2284&lt;BR /&gt;
"Africa" "Men's Dress" "Addis Ababa" 7 76793 136273 2433&lt;BR /&gt;
"Africa" "Sandal" "Addis Ababa" 10 62819 204284 1861&lt;BR /&gt;
"Africa" "Slipper" "Addis Ababa" 14 68641 279795 1771&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                         &lt;BR /&gt;
Actually, I did -not- expect to see _N_ and _ERROR_ in the previous posting's output (the first time with the simple PUT _ALL_) because I thought those were only written to the LOG and not to an external file. When I added the dlm=',' option to the FILE statement, then this is what I got (again, without  _N_ and _ERROR_  which don't belong in the file anyway, in my opinion):&lt;BR /&gt;
[pre]&lt;BR /&gt;
What will be written out? with dlm?&lt;BR /&gt;
"Africa","Boot","Addis Ababa",12,29761,191821,769&lt;BR /&gt;
"Africa","Men's Casual","Addis Ababa",4,67242,118036,2284&lt;BR /&gt;
"Africa","Men's Dress","Addis Ababa",7,76793,136273,2433&lt;BR /&gt;
"Africa","Sandal","Addis Ababa",10,62819,204284,1861&lt;BR /&gt;
"Africa","Slipper","Addis Ababa",14,68641,279795,1771&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                     &lt;BR /&gt;
Is your argument with _N_ and _ERROR_ not being in the output file?&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 03 Aug 2009 23:07:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76799#M8708</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-08-03T23:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76800#M8709</link>
      <description>&amp;gt;Is your argument with _N_ and _ERROR_ not being in the output file?&lt;BR /&gt;
Not only, variable AAA is not output either. &lt;BR /&gt;
Move the retain statement above the put statement and AAA will be output.&lt;BR /&gt;
&lt;BR /&gt;
data _null_;  &lt;BR /&gt;
set sashelp.shoes(obs=5);  &lt;BR /&gt;
file 'c:\temp\test_putall.txt';  &lt;BR /&gt;
format _CHARACTER_ $quote.; &lt;BR /&gt;
format _NUMERIC_;    &lt;BR /&gt;
if _N_ = 1 then link firstrow;      &lt;BR /&gt;
put (_ALL_)(:);    &lt;BR /&gt;
retain AAA 'kkk';&lt;BR /&gt;
return;    &lt;BR /&gt;
firstrow:      &lt;BR /&gt;
put 'What will be written out?';  &lt;BR /&gt;
return;  &lt;BR /&gt;
run;</description>
      <pubDate>Tue, 04 Aug 2009 00:26:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76800#M8709</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2009-08-04T00:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76801#M8710</link>
      <description>Just pushing this one a last time to the forefront in hope of knowing why some PDV variables are not exported, and why the position of the retain statement matters here.</description>
      <pubDate>Wed, 19 Aug 2009 03:32:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76801#M8710</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2009-08-19T03:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to use labels in proc export or create tab dlm file using proc print</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76802#M8711</link>
      <description>Chris and Cynthia, &lt;BR /&gt;
&lt;BR /&gt;
Indeed i was first surprise about this as aaa is existing in the pdv&lt;BR /&gt;
the only difference of functionning is about the sequentionnal position of the retain statement : before or after the external put statement using the _ALL_&lt;BR /&gt;
&lt;BR /&gt;
Is ther some secondary buffer existing for the tabular print generated by a put&lt;BR /&gt;
and different from the pdv?&lt;BR /&gt;
and filled or not following certain reasons?&lt;BR /&gt;
&lt;BR /&gt;
to show this difference i used two different put in an ods datastep context!&lt;BR /&gt;
&lt;BR /&gt;
in one case aaa is empty in the other it is filled!&lt;BR /&gt;
so the _ALL_ has a special functionning in regard gathering information&lt;BR /&gt;
depending theit context of use!&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data _null_;&lt;BR /&gt;
put _all_;&lt;BR /&gt;
set sashelp.shoes(obs=5);&lt;BR /&gt;
file 'c:\temp\test_putall.txt';&lt;BR /&gt;
format _CHARACTER_ $quote.;&lt;BR /&gt;
format _NUMERIC_;&lt;BR /&gt;
put (_ALL_)(:);&lt;BR /&gt;
retain AAA 25;&lt;BR /&gt;
run;&lt;BR /&gt;
data _null_;&lt;BR /&gt;
put _all_;&lt;BR /&gt;
set sashelp.shoes(obs=5);&lt;BR /&gt;
file 'c:\temp\test_putOK.txt';&lt;BR /&gt;
format _CHARACTER_ $quote.;&lt;BR /&gt;
format _NUMERIC_;&lt;BR /&gt;
retain AAA 25;&lt;BR /&gt;
put (_ALL_)(:);&lt;BR /&gt;
run;&lt;BR /&gt;
ods pdf file="c:\temp\odsput.pdf";&lt;BR /&gt;
data _null_;&lt;BR /&gt;
putlog _all_;&lt;BR /&gt;
set sashelp.shoes(obs=5);&lt;BR /&gt;
file print ods=(var=(_all_));&lt;BR /&gt;
format _CHARACTER_ $quote.;&lt;BR /&gt;
format _NUMERIC_;&lt;BR /&gt;
put (_ALL_)(:);&lt;BR /&gt;
retain AAA 25;&lt;BR /&gt;
run; &lt;BR /&gt;
ods pdf close;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ods pdf file="c:\temp\put_ods_.pdf";&lt;BR /&gt;
data _null_;&lt;BR /&gt;
putlog _all_;&lt;BR /&gt;
set sashelp.shoes(obs=5);&lt;BR /&gt;
file print ods=(var=(_all_));&lt;BR /&gt;
format _CHARACTER_ $quote.;&lt;BR /&gt;
format _NUMERIC_;&lt;BR /&gt;
put (_ALL_)(:)   _ODS_ ;&lt;BR /&gt;
retain AAA 25;&lt;BR /&gt;
run; &lt;BR /&gt;
ods pdf close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
BUT Chris this is documented on&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/61724/HTML/default/a000214163.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/61724/HTML/default/a000214163.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
If you specify _ALL_, _CHAR_, or _NUMERIC_, only the variables that are defined before the RETAIN statement are affected.&lt;BR /&gt;
&lt;BR /&gt;
HTH &lt;BR /&gt;
Andre</description>
      <pubDate>Wed, 19 Aug 2009 09:06:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-use-labels-in-proc-export-or-create-tab-dlm-file-using/m-p/76802#M8711</guid>
      <dc:creator>Andre</dc:creator>
      <dc:date>2009-08-19T09:06:22Z</dc:date>
    </item>
  </channel>
</rss>

