<?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: proc report column define automatic label in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-column-define-automatic-label/m-p/828460#M81974</link>
    <description>&lt;P&gt;Thanks Paige Mille for your quick response.&lt;/P&gt;
&lt;P&gt;sorry, I have an additional question.&amp;nbsp;when the dataset is empty I can not open the external excel file produced. An error message "this file is corrupted".&lt;/P&gt;
&lt;P&gt;would it exist a solution to avoid this ?&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;Nasser&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Aug 2022 13:44:58 GMT</pubDate>
    <dc:creator>Nasser_DRMCP</dc:creator>
    <dc:date>2022-08-12T13:44:58Z</dc:date>
    <item>
      <title>proc report column define automatic label</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-column-define-automatic-label/m-p/828450#M81972</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC REPORT DATA=sashelp.CLASS NOWD
     STYLE(header)=[background=CX9BC2E6 foreground=white just=center]
    STYLE(column)=[cellwidth=3cm] ;
    COLUMN NAME SEX	AGE	HEIGHT	WEIGHT ;
     DEFINE NAME   / DISPLAY "Nom" ;
     DEFINE HEIGHT  / DISPLAY "Taille" ;
     DEFINE WEIGHT   / DISPLAY "Poids"  ;
RUN;
ODS Excel CLOSE;
ODS LISTING;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have to create many proc report (many tables). so if I plan to duplicate this proc report code (copy/paste ) .&lt;/P&gt;
&lt;P&gt;My problem is : whenever I would like to change the label "Nom" by "Le nom" I should change all proc report.&lt;/P&gt;
&lt;P&gt;How could I specify the label at only one place and specify all proc report to get the label corresponding of a column ? and all "proc report" should automatically change whenever the label is changed.&lt;/P&gt;
&lt;P&gt;Many thanks in advance&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Nasser&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 13:01:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-column-define-automatic-label/m-p/828450#M81972</guid>
      <dc:creator>Nasser_DRMCP</dc:creator>
      <dc:date>2022-08-12T13:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: proc report column define automatic label</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-column-define-automatic-label/m-p/828453#M81973</link>
      <description>&lt;P&gt;A macro variable would work&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let nom = Nom;

PROC REPORT DATA=sashelp.CLASS NOWD
     STYLE(header)=[background=CX9BC2E6 foreground=white just=center]
    STYLE(column)=[cellwidth=3cm] ;
    COLUMN NAME SEX	AGE	HEIGHT	WEIGHT ;
     DEFINE NAME   / DISPLAY "&amp;amp;nom" ;
     DEFINE HEIGHT  / DISPLAY "Taille" ;
     DEFINE WEIGHT   / DISPLAY "Poids"  ;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At a later point in time, if you change the value of the macro variable and re-run your PROC REPORTs, the new value will appear in the PROC REPORT output. Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let nom=NAME;

PROC REPORT DATA=sashelp.CLASS NOWD
     STYLE(header)=[background=CX9BC2E6 foreground=white just=center]
    STYLE(column)=[cellwidth=3cm] ;
    COLUMN NAME SEX	AGE	HEIGHT	WEIGHT ;
     DEFINE NAME   / DISPLAY "&amp;amp;nom" ;
     DEFINE HEIGHT  / DISPLAY "Taille" ;
     DEFINE WEIGHT   / DISPLAY "Poids"  ;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 13:07:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-column-define-automatic-label/m-p/828453#M81973</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-08-12T13:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: proc report column define automatic label</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-column-define-automatic-label/m-p/828460#M81974</link>
      <description>&lt;P&gt;Thanks Paige Mille for your quick response.&lt;/P&gt;
&lt;P&gt;sorry, I have an additional question.&amp;nbsp;when the dataset is empty I can not open the external excel file produced. An error message "this file is corrupted".&lt;/P&gt;
&lt;P&gt;would it exist a solution to avoid this ?&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;Nasser&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 13:44:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-column-define-automatic-label/m-p/828460#M81974</guid>
      <dc:creator>Nasser_DRMCP</dc:creator>
      <dc:date>2022-08-12T13:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: proc report column define automatic label</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-column-define-automatic-label/m-p/828461#M81975</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/147725"&gt;@Nasser_DRMCP&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks Paige Mille for your quick response.&lt;/P&gt;
&lt;P&gt;sorry, I have an additional question.&amp;nbsp;when the dataset is empty I can not open the external excel file produced. An error message "this file is corrupted".&lt;/P&gt;
&lt;P&gt;would it exist a solution to avoid this ?&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;Nasser&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Honestly, I don't see how this relates to the problem you presented, and a lot more detail and explanation is needed here. If there are errors in the log, show us the log.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 13:46:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-column-define-automatic-label/m-p/828461#M81975</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-08-12T13:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: proc report column define automatic label</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-column-define-automatic-label/m-p/828464#M81976</link>
      <description>&lt;P&gt;sorry, below the log .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1 The SAS System Friday, August 12, 2022 01:52:00 PM&lt;/P&gt;
&lt;P&gt;1 ;*';*";*/;quit;run;&lt;BR /&gt;2 OPTIONS PAGENO=MIN;&lt;BR /&gt;3 %LET _CLIENTTASKLABEL='nm_technique.sas';&lt;BR /&gt;4 %LET _CLIENTPROCESSFLOWNAME='Standalone Not In Project';&lt;BR /&gt;5 %LET _CLIENTPROJECTPATH='';&lt;BR /&gt;6 %LET _CLIENTPROJECTPATHHOST='';&lt;BR /&gt;7 %LET _CLIENTPROJECTNAME='';&lt;BR /&gt;8 %LET _SASPROGRAMFILE='/home/ldap/mellouna/sasuser/nm_technique.sas';&lt;BR /&gt;9 %LET _SASPROGRAMFILEHOST='**********';&lt;BR /&gt;10 &lt;BR /&gt;11 ODS _ALL_ CLOSE;&lt;BR /&gt;12 OPTIONS DEV=PNG;&lt;BR /&gt;13 GOPTIONS XPIXELS=0 YPIXELS=0;&lt;BR /&gt;14 %macro HTML5AccessibleGraphSupported;&lt;BR /&gt;15 %if %_SAS_VERCOMP_FV(9,4,4, 0,0,0) &amp;gt;= 0 %then ACCESSIBLE_GRAPH;&lt;BR /&gt;16 %mend;&lt;BR /&gt;17 &lt;BR /&gt;18 &lt;BR /&gt;19 ODS LISTING CLOSE;&lt;BR /&gt;20 ODS EXCEL FILE="$GRPFPU/REQUETES_PROD/MELLOUNA_PROC_REPORT.xlsx" STYLE=HTMLBlue;&lt;BR /&gt;21 ODS Excel options ( SHEET_NAME = "Base" );&lt;BR /&gt;22 &lt;BR /&gt;23 PROC REPORT DATA=CLASS_EMPTY NOWD&lt;BR /&gt;24 STYLE(header)=[background=CX9BC2E6 foreground=white just=center]&lt;BR /&gt;25 STYLE(column)=[cellwidth=3cm] ;&lt;BR /&gt;26 COLUMN NAME SEX AGE HEIGHT WEIGHT ;&lt;BR /&gt;27 DEFINE NAME / DISPLAY "Le nom" ;&lt;BR /&gt;28 DEFINE HEIGHT / DISPLAY "La Taille" ;&lt;BR /&gt;29 DEFINE WEIGHT / DISPLAY "Le poids" ;&lt;BR /&gt;30 RUN;&lt;/P&gt;
&lt;P&gt;NOTE: No observations in data set WORK.CLASS_EMPTY.&lt;BR /&gt;NOTE: No observations in input data set.&lt;BR /&gt;NOTE: PROCEDURE REPORT used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;user cpu time 0.00 seconds&lt;BR /&gt;system cpu time 0.00 seconds&lt;BR /&gt;memory 460.71k&lt;BR /&gt;OS Memory 26316.00k&lt;BR /&gt;Timestamp 08/12/2022 03:49:13 PM&lt;BR /&gt;Step Count 22 Switch Count 0&lt;BR /&gt;Page Faults 0&lt;BR /&gt;Page Reclaims 198&lt;BR /&gt;Page Swaps 0&lt;BR /&gt;Voluntary Context Switches 0&lt;BR /&gt;Involuntary Context Switches 0&lt;BR /&gt;Block Input Operations 0&lt;BR /&gt;Block Output Operations 0&lt;/P&gt;
&lt;P&gt;31 ODS Excel CLOSE;&lt;BR /&gt;NOTE: Writing EXCEL file: $GRPFPU/REQUETES_PROD/MELLOUNA_PROC_REPORT.xlsx&lt;BR /&gt;32 ODS LISTING;&lt;BR /&gt;33 &lt;BR /&gt;34 %LET _CLIENTTASKLABEL=;&lt;BR /&gt;35 %LET _CLIENTPROCESSFLOWNAME=;&lt;BR /&gt;36 %LET _CLIENTPROJECTPATH=;&lt;BR /&gt;37 %LET _CLIENTPROJECTPATHHOST=;&lt;BR /&gt;2 The SAS System Friday, August 12, 2022 01:52:00 PM&lt;/P&gt;
&lt;P&gt;38 %LET _CLIENTPROJECTNAME=;&lt;BR /&gt;39 %LET _SASPROGRAMFILE=;&lt;BR /&gt;40 %LET _SASPROGRAMFILEHOST=;&lt;BR /&gt;41 &lt;BR /&gt;42 ;*';*";*/;quit;run;&lt;BR /&gt;43 ODS _ALL_ CLOSE;&lt;BR /&gt;44 &lt;BR /&gt;45 &lt;BR /&gt;46 QUIT; RUN;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 14:04:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-column-define-automatic-label/m-p/828464#M81976</guid>
      <dc:creator>Nasser_DRMCP</dc:creator>
      <dc:date>2022-08-12T14:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: proc report column define automatic label</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-column-define-automatic-label/m-p/828468#M81977</link>
      <description>&lt;P&gt;You need to fix this part&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;23 PROC REPORT DATA=CLASS_EMPTY NOWD
24 STYLE(header)=[background=CX9BC2E6 foreground=white just=center]
25 STYLE(column)=[cellwidth=3cm] ;
26 COLUMN NAME SEX AGE HEIGHT WEIGHT ;
27 DEFINE NAME / DISPLAY "Le nom" ;
28 DEFINE HEIGHT / DISPLAY "La Taille" ;
29 DEFINE WEIGHT / DISPLAY "Le poids" ;
30 RUN;

&lt;FONT color="#FF0000"&gt;NOTE: No observations in data set WORK.CLASS_EMPTY.&lt;/FONT&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Aug 2022 14:19:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-column-define-automatic-label/m-p/828468#M81977</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-08-12T14:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: proc report column define automatic label</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-column-define-automatic-label/m-p/828472#M81978</link>
      <description>&lt;P&gt;ok sorry, my explanations was not clear at all.&lt;/P&gt;
&lt;P&gt;sometimes the table is not empty, sometimes it is empty and it is "normal"&lt;/P&gt;
&lt;P&gt;in case it is empty, I would like to generate a file only with headers column (and correct label)&lt;/P&gt;
&lt;P&gt;I don't know if it is possible&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 14:26:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-column-define-automatic-label/m-p/828472#M81978</guid>
      <dc:creator>Nasser_DRMCP</dc:creator>
      <dc:date>2022-08-12T14:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: proc report column define automatic label</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-report-column-define-automatic-label/m-p/828476#M81979</link>
      <description>&lt;P&gt;I have never created a report that has headers only and no data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suppose you could create a fake data set with one row of missing data for every variable, and the run PROC REPORT on that fake data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 14:41:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-report-column-define-automatic-label/m-p/828476#M81979</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-08-12T14:41:22Z</dc:date>
    </item>
  </channel>
</rss>

