<?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: format creation and macros in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/599517#M173068</link>
    <description>&lt;P&gt;This is invalid syntax:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;keep = fmtname type start end label;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The equals sign is invalid in a keep&amp;nbsp;&lt;EM&gt;statement&lt;/EM&gt;. Equal signs are necessary for the keep&amp;nbsp;&lt;EM&gt;dataset option&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;You made the mistake of not testing your SAS code before putting it into a macro. Rule #1 for macro development: start with&amp;nbsp;&lt;EM&gt;working&lt;/EM&gt; macro-free code.&lt;/P&gt;</description>
    <pubDate>Sat, 26 Oct 2019 10:36:26 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-10-26T10:36:26Z</dc:date>
    <item>
      <title>format creation and macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/599495#M173058</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm learning to create formats for a bunch of datasets such that if the column value (ID in this case) when converted into that format exists, then I delete that observation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For eg. My sample dataset:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Indicator&lt;/TD&gt;&lt;TD&gt;col2&lt;/TD&gt;&lt;TD&gt;col3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;330&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;any random value&lt;/TD&gt;&lt;TD&gt;any random value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;any random value&lt;/TD&gt;&lt;TD&gt;any random value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;356&lt;/TD&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;TD&gt;any random value&lt;/TD&gt;&lt;TD&gt;any random value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;689&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;any random value&lt;/TD&gt;&lt;TD&gt;any random value&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;there are a bunch of other datasets, and i need to create formats for all of them, so I decided to create a macro for creating formats.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro fmt(var,ds);
data &amp;amp;var.;
set &amp;amp;ds.;
fmtname="$&amp;amp;var.";
type = 'c';
start = strip (id);
end = strip (id);
label = "YES";

keep = fmtname type start end label;
run;

proc format cntlin=&amp;amp;var.; 
run;

%mend fmt;
%fmt(abc_out, abc_in); /*bunch of more macro calls like this to create formats*/

this is how I plan to use those formats:
data final;
set....;
if put(id,$abc_out) = "YES" then delete;
/*bunch of more if conditions for other formats*/
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;When I run the format macro, I get a bunch of errors, not sure how to solve those. Appreciate the help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Logs:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;MLOGIC(FMT): Beginning execution.&lt;BR /&gt;MLOGIC(FMT): Parameter VAR has value &lt;CODE class=" language-sas"&gt;abc_out&lt;/CODE&gt;&lt;BR /&gt;MLOGIC(FMT): Parameter DS has value &lt;CODE class=" language-sas"&gt;abc_in&lt;/CODE&gt;&lt;BR /&gt;SYMBOLGEN: Macro variable VAR resolves to &lt;CODE class=" language-sas"&gt;abc_out&lt;/CODE&gt;&lt;BR /&gt;SYMBOLGEN: Macro variable DS resolves to &lt;CODE class=" language-sas"&gt;abc_in&lt;/CODE&gt;&lt;BR /&gt;SYMBOLGEN: Macro variable VAR resolves to &lt;CODE class=" language-sas"&gt;abc_out&lt;/CODE&gt;&lt;BR /&gt;388: LINE and COLUMN cannot be determined.&lt;BR /&gt;NOTE: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN where the error has occurred.&lt;BR /&gt;ERROR 388-185: Expecting an arithmetic operator.&lt;BR /&gt;76: LINE and COLUMN cannot be determined.&lt;BR /&gt;NOTE: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN where the error has occurred.&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.&lt;CODE class=" language-sas"&gt;ABC_OUT&lt;/CODE&gt; may be incomplete. When this step was stopped there were 0 observations and 4 variables.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2019 02:13:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/599495#M173058</guid>
      <dc:creator>AJ_Brien</dc:creator>
      <dc:date>2019-10-26T02:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: format creation and macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/599496#M173059</link>
      <description>Do you have MPRINT on as well? If so, go to line 388 in the log - first error in your log and let us know which one that is...or post the whole log.</description>
      <pubDate>Sat, 26 Oct 2019 02:19:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/599496#M173059</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-10-26T02:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: format creation and macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/599506#M173063</link>
      <description>I turned mprint on and ran the code, strangely there is no line 388 in the log nor in the code. Here is the complete log listed:&lt;BR /&gt;&lt;BR /&gt;1 The SAS System 15:24 Friday, October 25, 2019&lt;BR /&gt;&lt;BR /&gt;1 ;*';*";*/;quit;run;&lt;BR /&gt;2 OPTIONS PAGENO=MIN;&lt;BR /&gt;3 %LET _CLIENTTASKLABEL='Program';&lt;BR /&gt;4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';&lt;BR /&gt;5 %LET _CLIENTPROJECTPATH=xx.egp';&lt;BR /&gt;6 %LET _CLIENTPROJECTPATHHOST='xx';&lt;BR /&gt;7 %LET _CLIENTPROJECTNAME='xx.egp';&lt;BR /&gt;8 %LET _SASPROGRAMFILE='';&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 FILENAME EGSR TEMP;&lt;BR /&gt;15 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR&lt;BR /&gt;16 STYLE=HTMLBlue&lt;BR /&gt;17 STYLESHEET=(URL="file:///C:/Program%20Files%20(x86)/SAS94_EG/x86/SASEnterpriseGuide/7.1/Styles/HTMLBlue.css")&lt;BR /&gt;18 NOGTITLE&lt;BR /&gt;19 NOGFOOTNOTE&lt;BR /&gt;20 GPATH=&amp;amp;sasworklocation&lt;BR /&gt;SYMBOLGEN: Macro variable SASWORKLOCATION resolves to&lt;BR /&gt;"/saswork1/xx.com/"&lt;BR /&gt;21 ENCODING=UTF8&lt;BR /&gt;22 options(rolap="on")&lt;BR /&gt;23 ;&lt;BR /&gt;NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR&lt;BR /&gt;24&lt;BR /&gt;25 GOPTIONS ACCESSIBLE;&lt;BR /&gt;26 options mautosource sasautos= (&lt;BR /&gt;27 'xxxx')&lt;BR /&gt;28&lt;BR /&gt;29 nocenter source2 mlogic symbolgen mprint;&lt;BR /&gt;30 data dat1;&lt;BR /&gt;31 input id acc apps $;&lt;BR /&gt;32 cards;&lt;BR /&gt;&lt;BR /&gt;NOTE: Compression was disabled for data set WORK.DAT1 because compression overhead would increase the size of the data set.&lt;BR /&gt;NOTE: The data set WORK.DAT1 has 6 observations and 3 variables.&lt;BR /&gt;NOTE: DATA statement 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 422.46k&lt;BR /&gt;OS Memory 27300.00k&lt;BR /&gt;Timestamp 10/25/2019 10:58:16 PM&lt;BR /&gt;Step Count 116 Switch Count 2&lt;BR /&gt;Page Faults 0&lt;BR /&gt;Page Reclaims 50&lt;BR /&gt;Page Swaps 0&lt;BR /&gt;Voluntary Context Switches 25&lt;BR /&gt;Involuntary Context Switches 0&lt;BR /&gt;Block Input Operations 16&lt;BR /&gt;Block Output Operations 136&lt;BR /&gt;&lt;BR /&gt;39 ;&lt;BR /&gt;&lt;BR /&gt;40 run;&lt;BR /&gt;2 The SAS System 15:24 Friday, October 25, 2019&lt;BR /&gt;&lt;BR /&gt;41&lt;BR /&gt;42&lt;BR /&gt;43 %macro fmt(var,ds);&lt;BR /&gt;44 data &amp;amp;var.;&lt;BR /&gt;45 set &amp;amp;ds.;&lt;BR /&gt;46 fmtname="$&amp;amp;var.";&lt;BR /&gt;47 type = 'c';&lt;BR /&gt;48 start = strip (rmg_id);&lt;BR /&gt;49 end = strip (rmg_id);&lt;BR /&gt;50 label = "YES";&lt;BR /&gt;51&lt;BR /&gt;52 keep = fmtname type start end label;&lt;BR /&gt;53 run;&lt;BR /&gt;54 proc format cntlin=&amp;amp;var.;&lt;BR /&gt;55 run;&lt;BR /&gt;56 %mend fmt;&lt;BR /&gt;57 %fmt(dat1_fmt, dat1);&lt;BR /&gt;MLOGIC(FMT): Beginning execution.&lt;BR /&gt;MLOGIC(FMT): Parameter VAR has value dat1_fmt&lt;BR /&gt;MLOGIC(FMT): Parameter DS has value dat1&lt;BR /&gt;SYMBOLGEN: Macro variable VAR resolves to dat1_fmt&lt;BR /&gt;MPRINT(FMT): data dat1_fmt;&lt;BR /&gt;SYMBOLGEN: Macro variable DS resolves to dat1&lt;BR /&gt;MPRINT(FMT): set dat1;&lt;BR /&gt;SYMBOLGEN: Macro variable VAR resolves to dat1_fmt&lt;BR /&gt;388: LINE and COLUMN cannot be determined.&lt;BR /&gt;NOTE: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN where the error has occurred.&lt;BR /&gt;ERROR 388-185: Expecting an arithmetic operator.&lt;BR /&gt;76: LINE and COLUMN cannot be determined.&lt;BR /&gt;NOTE: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN where the error has occurred.&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;MPRINT(FMT): fmtname="$dat1_fmt";&lt;BR /&gt;MPRINT(FMT): type = 'c';&lt;BR /&gt;MPRINT(FMT): start = strip (rmg_id);&lt;BR /&gt;MPRINT(FMT): end = strip (rmg_id);&lt;BR /&gt;MPRINT(FMT): label = "YES";&lt;BR /&gt;MPRINT(FMT): keep = fmtname type start end label;&lt;BR /&gt;MPRINT(FMT): run;&lt;BR /&gt;NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).&lt;BR /&gt;6700:69 6700:91&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.DAT1_FMT may be incomplete. When this step was stopped there were 0 observations and 10 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;user cpu time 0.01 seconds&lt;BR /&gt;system cpu time 0.00 seconds&lt;BR /&gt;memory 550.40k&lt;BR /&gt;OS Memory 27300.00k&lt;BR /&gt;Timestamp 10/25/2019 10:58:16 PM&lt;BR /&gt;Step Count 117 Switch Count 2&lt;BR /&gt;Page Faults 0&lt;BR /&gt;Page Reclaims 26&lt;BR /&gt;Page Swaps 0&lt;BR /&gt;Voluntary Context Switches 12&lt;BR /&gt;Involuntary Context Switches 0&lt;BR /&gt;Block Input Operations 0&lt;BR /&gt;Block Output Operations 264&lt;BR /&gt;&lt;BR /&gt;3 The SAS System 15:24 Friday, October 25, 2019&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SYMBOLGEN: Macro variable VAR resolves to dat1_fmt&lt;BR /&gt;MPRINT(FMT): proc format cntlin=dat1_fmt;&lt;BR /&gt;MPRINT(FMT): run;&lt;BR /&gt;NOTE: PROCEDURE FORMAT 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 334.71k&lt;BR /&gt;OS Memory 27300.00k&lt;BR /&gt;Timestamp 10/25/2019 10:58:16 PM&lt;BR /&gt;Step Count 118 Switch Count 0&lt;BR /&gt;Page Faults 0&lt;BR /&gt;Page Reclaims 19&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 16&lt;BR /&gt;&lt;BR /&gt;NOTE: There were 0 observations read from the data set WORK.DAT1_FMT.&lt;BR /&gt;&lt;BR /&gt;MLOGIC(FMT): Ending execution.&lt;BR /&gt;58&lt;BR /&gt;59 GOPTIONS NOACCESSIBLE;&lt;BR /&gt;60 %LET _CLIENTTASKLABEL=;&lt;BR /&gt;61 %LET _CLIENTPROCESSFLOWNAME=;&lt;BR /&gt;62 %LET _CLIENTPROJECTPATH=;&lt;BR /&gt;63 %LET _CLIENTPROJECTPATHHOST=;&lt;BR /&gt;64 %LET _CLIENTPROJECTNAME=;&lt;BR /&gt;65 %LET _SASPROGRAMFILE=;&lt;BR /&gt;66 %LET _SASPROGRAMFILEHOST=;&lt;BR /&gt;67&lt;BR /&gt;68 ;*';*";*/;quit;run;&lt;BR /&gt;69 ODS _ALL_ CLOSE;&lt;BR /&gt;70&lt;BR /&gt;71&lt;BR /&gt;72 QUIT; RUN;&lt;BR /&gt;73&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 26 Oct 2019 04:04:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/599506#M173063</guid>
      <dc:creator>AJ_Brien</dc:creator>
      <dc:date>2019-10-26T04:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: format creation and macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/599507#M173064</link>
      <description>&lt;P&gt;I suspect you have a CARDS statement inside a SAS macro. This is not allowed in SAS so you must move that DATA step outside your macro or read your data in from an external file.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2019 04:36:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/599507#M173064</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-10-26T04:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: format creation and macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/599508#M173065</link>
      <description>&lt;P&gt;Thank you for your reply, this is the code I'm running:&lt;BR /&gt;data dat1;&lt;BR /&gt;input id acc apps $;&lt;BR /&gt;cards;&lt;BR /&gt;1 1 11&lt;BR /&gt;2 2 22&lt;BR /&gt;2 3 33&lt;BR /&gt;1 4 33&lt;BR /&gt;2 6 66&lt;BR /&gt;2 7 22&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;%macro fmt(var,ds);&lt;BR /&gt;data &amp;amp;var.;&lt;BR /&gt;set &amp;amp;ds.;&lt;BR /&gt;fmtname="$&amp;amp;var.";&lt;BR /&gt;type = 'c';&lt;BR /&gt;start = strip (id);&lt;BR /&gt;end = strip (id);&lt;BR /&gt;label = "YES";&lt;BR /&gt;&lt;BR /&gt;keep = fmtname type start end label;&lt;BR /&gt;run;&lt;BR /&gt;proc format cntlin=&amp;amp;var.;&lt;BR /&gt;run;&lt;BR /&gt;%mend fmt;&lt;BR /&gt;%fmt(dat1_fmt, dat1);&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2019 04:41:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/599508#M173065</guid>
      <dc:creator>AJ_Brien</dc:creator>
      <dc:date>2019-10-26T04:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: format creation and macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/599513#M173067</link>
      <description>&lt;P&gt;So does the new version work? If not post your SAS log.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2019 06:57:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/599513#M173067</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-10-26T06:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: format creation and macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/599517#M173068</link>
      <description>&lt;P&gt;This is invalid syntax:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;keep = fmtname type start end label;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The equals sign is invalid in a keep&amp;nbsp;&lt;EM&gt;statement&lt;/EM&gt;. Equal signs are necessary for the keep&amp;nbsp;&lt;EM&gt;dataset option&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;You made the mistake of not testing your SAS code before putting it into a macro. Rule #1 for macro development: start with&amp;nbsp;&lt;EM&gt;working&lt;/EM&gt; macro-free code.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2019 10:36:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/599517#M173068</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-10-26T10:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: format creation and macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/600603#M173648</link>
      <description>&lt;P&gt;Thank you for your suggestion. I ran the code without the macro and this is what I have as the code that works:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=abc nodupkey;
by id;
run;

data abc_format;
set abc;

fmtname = '$state_frmt';
type = 'c';
start = strip(id);
end = strip(id);
label = 'yes';

keep fmtname type start end label;
run;


proc format cntlin= abc_format;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now when I try and add a macro, I get an error because I'm trying to create a fmtname that has a macro variable and I'm unable to figure out the right way of doing it. would appreciate your inputs &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Below is the code with the macro:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro create_format(ds);
proc sort data=&amp;amp;ds. nodupkey;
by id;
run;

data &amp;amp;ds._format;
set &amp;amp;ds.;

fmtname = '$&amp;amp;ds._format';
type = 'c';
start = strip(id);
end = strip(id);
label = 'YES';

keep fmtname type start end label;
run;


proc format cntlin= &amp;amp;ds._format;
run;
%mend;
%create_format(abc);

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the error that I get is:&lt;BR /&gt;&lt;STRONG&gt;ERROR:&lt;/STRONG&gt; Format name '$&amp;amp;DS._FORMAT' is invalid. Observation ignored.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 00:33:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/600603#M173648</guid>
      <dc:creator>AJ_Brien</dc:creator>
      <dc:date>2019-10-31T00:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: format creation and macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/600622#M173659</link>
      <description>&lt;P&gt;Macro variables will not be resolved inside single quotes. Use double quotes, as in your initial post.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 04:27:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/600622#M173659</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-10-31T04:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: format creation and macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/600868#M173751</link>
      <description>adding double quotes worked, thank you so much!</description>
      <pubDate>Fri, 01 Nov 2019 00:41:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/format-creation-and-macros/m-p/600868#M173751</guid>
      <dc:creator>AJ_Brien</dc:creator>
      <dc:date>2019-11-01T00:41:27Z</dc:date>
    </item>
  </channel>
</rss>

