<?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: Reg.  Macro in Proc Format in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Reg-Macro-in-Proc-Format/m-p/2020#M890</link>
    <description>Something like the following should work for you:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
OPTIONS MPRINT;&lt;BR /&gt;
&lt;BR /&gt;
%MACRO CountryFmts (COUNTRY= );&lt;BR /&gt;
%IF %UPCASE(&amp;amp;COUNTRY) = INDIA %THEN %DO;&lt;BR /&gt;
  '0002' = 'Customer minimum age'&lt;BR /&gt;
  '0009' = 'Vehicle age and term'&lt;BR /&gt;
  '0013' = 'Unavailable'&lt;BR /&gt;
  '0029' = 'Advance &amp;gt; E35000'&lt;BR /&gt;
%END;&lt;BR /&gt;
%ELSE %IF %UPCASE(&amp;amp;COUNTRY) = PAKISTAN %THEN %DO;&lt;BR /&gt;
  '0002' = 'Customer Age &amp;lt; 18 or &amp;gt; 70'&lt;BR /&gt;
  '0009' = 'Vehicle Age + Term &amp;gt; 6 years'&lt;BR /&gt;
  '0013' = 'Incomplete bureau search'&lt;BR /&gt;
%END;&lt;BR /&gt;
%ELSE %DO;&lt;BR /&gt;
  /* Neither INDIA nor PAKISTAN specified -- possible error */&lt;BR /&gt;
%END;&lt;BR /&gt;
%MEND CountryFmts;&lt;BR /&gt;
&lt;BR /&gt;
PROC FORMAT;&lt;BR /&gt;
VALUE $polrule&lt;BR /&gt;
  '0000' = 'none'&lt;BR /&gt;
  '0001' = 'Customer Age Range'&lt;BR /&gt;
  '0037' = 'Military service not completed'&lt;BR /&gt;
  '0058' = 'Employee'&lt;BR /&gt;
  '0097' = 'Five year finance low deposit'&lt;BR /&gt;
  '0132' = 'Employment Type'&lt;BR /&gt;
  '0141' = 'Self Employed'&lt;BR /&gt;
  %CountryFmts (COUNTRY=INDIA)&lt;BR /&gt;
;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
/* or, in a different job */&lt;BR /&gt;
PROC FORMAT;&lt;BR /&gt;
VALUE $polrule&lt;BR /&gt;
  '0000' = 'none'&lt;BR /&gt;
  '0001' = 'Customer Age Range'&lt;BR /&gt;
  '0037' = 'Military service not completed'&lt;BR /&gt;
  '0058' = 'Employee'&lt;BR /&gt;
  '0097' = 'Five year finance low deposit'&lt;BR /&gt;
  '0132' = 'Employment Type'&lt;BR /&gt;
  '0141' = 'Self Employed'&lt;BR /&gt;
  %CountryFmts (COUNTRY=Pakistan)&lt;BR /&gt;
;&lt;BR /&gt;
RUN;&lt;BR /&gt;
[/pre]

&lt;BR /&gt;
Message was edited by: MikeRhoads at Jan 18, 2007 1:11 PM&lt;BR /&gt;</description>
    <pubDate>Thu, 18 Jan 2007 14:09:08 GMT</pubDate>
    <dc:creator>MikeRhoads</dc:creator>
    <dc:date>2007-01-18T14:09:08Z</dc:date>
    <item>
      <title>Reg.  Macro in Proc Format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Reg-Macro-in-Proc-Format/m-p/2017#M887</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
   I have to format some specific, conditions. So, I like to invoke macro in between the format area.&lt;BR /&gt;
&lt;BR /&gt;
Examaple:&lt;BR /&gt;
&lt;BR /&gt;
If I start the proc format;&lt;BR /&gt;
&lt;BR /&gt;
value $polrule&lt;BR /&gt;
&lt;BR /&gt;
'0000'      = 'none'&lt;BR /&gt;
'0001'      = 'Customer Age Range'&lt;BR /&gt;
'0037'      = 'Military service not completed'&lt;BR /&gt;
'0058'      = 'Employee'&lt;BR /&gt;
'0097'      = 'Five year finance low deposit'&lt;BR /&gt;
'0132'      = 'Employment Type'&lt;BR /&gt;
'0141'      = 'Self Employed'&lt;BR /&gt;
&lt;BR /&gt;
is common to all the countries.&lt;BR /&gt;
&lt;BR /&gt;
but is some coding is common to but with different abbreviation.&lt;BR /&gt;
For India:&lt;BR /&gt;
'0002' = 'Customer minimum age'&lt;BR /&gt;
'0009' = 'Vehicle age and term'&lt;BR /&gt;
'0013' = 'Unavailable'&lt;BR /&gt;
'0029' = 'Advance &amp;gt; E35000'&lt;BR /&gt;
For Pakistan:&lt;BR /&gt;
'0002' = 'Customer Age &amp;lt; 18 or &amp;gt; 70'&lt;BR /&gt;
'0009' = 'Vehicle Age + Term &amp;gt; 6 years'&lt;BR /&gt;
'0013' = 'Incomplete bureau search'&lt;BR /&gt;
&lt;BR /&gt;
Like this When i call the India that macro which is invoke that corresponding india or pakistan like..&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance.</description>
      <pubDate>Thu, 04 Jan 2007 06:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Reg-Macro-in-Proc-Format/m-p/2017#M887</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-01-04T06:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Reg.  Macro in Proc Format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Reg-Macro-in-Proc-Format/m-p/2018#M888</link>
      <description>Maybe you can try to re-use your own format into new ones, something like...&lt;BR /&gt;
&lt;BR /&gt;
OPTION FMTSEARCH = (SASUSER WORK) ;&lt;BR /&gt;
PROC FORMAT LIB = SASUSER ;&lt;BR /&gt;
	VALUE $comrule&lt;BR /&gt;
		'0000' = 'none'&lt;BR /&gt;
		'0001' = 'Customer Age Range'&lt;BR /&gt;
		'0037' = 'Military service not completed'&lt;BR /&gt;
		'0058' = 'Employee'&lt;BR /&gt;
		'0097' = 'Five year finance low deposit'&lt;BR /&gt;
		'0132' = 'Employment Type'&lt;BR /&gt;
		'0141' = 'Self Employed'&lt;BR /&gt;
	;&lt;BR /&gt;
	VALUE $india&lt;BR /&gt;
		'0002' = 'Customer minimum age'&lt;BR /&gt;
		'0009' = 'Vehicle age and term'&lt;BR /&gt;
		'0013' = 'Unavailable'&lt;BR /&gt;
		'0029' = 'Advance &amp;gt; E35000'&lt;BR /&gt;
		OTHER = [$comrule.]&lt;BR /&gt;
	;&lt;BR /&gt;
	VALUE $pakis&lt;BR /&gt;
		'0002' = 'Customer Age &amp;lt; 18 or &amp;gt; 70'&lt;BR /&gt;
		'0009' = 'Vehicle Age + Term &amp;gt; 6 years'&lt;BR /&gt;
		'0013' = 'Incomplete bureau search'&lt;BR /&gt;
		OTHER = [$comrule.]&lt;BR /&gt;
	;&lt;BR /&gt;
RUN ;&lt;BR /&gt;
&lt;BR /&gt;
Then, you just have to specify which format ($india. or $pakis.) is to be used in the rest of your programs.</description>
      <pubDate>Thu, 04 Jan 2007 09:18:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Reg-Macro-in-Proc-Format/m-p/2018#M888</guid>
      <dc:creator>Olivier</dc:creator>
      <dc:date>2007-01-04T09:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Reg.  Macro in Proc Format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Reg-Macro-in-Proc-Format/m-p/2019#M889</link>
      <description>If i need both in same name how to write in macro.</description>
      <pubDate>Thu, 18 Jan 2007 08:20:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Reg-Macro-in-Proc-Format/m-p/2019#M889</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-01-18T08:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Reg.  Macro in Proc Format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Reg-Macro-in-Proc-Format/m-p/2020#M890</link>
      <description>Something like the following should work for you:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
OPTIONS MPRINT;&lt;BR /&gt;
&lt;BR /&gt;
%MACRO CountryFmts (COUNTRY= );&lt;BR /&gt;
%IF %UPCASE(&amp;amp;COUNTRY) = INDIA %THEN %DO;&lt;BR /&gt;
  '0002' = 'Customer minimum age'&lt;BR /&gt;
  '0009' = 'Vehicle age and term'&lt;BR /&gt;
  '0013' = 'Unavailable'&lt;BR /&gt;
  '0029' = 'Advance &amp;gt; E35000'&lt;BR /&gt;
%END;&lt;BR /&gt;
%ELSE %IF %UPCASE(&amp;amp;COUNTRY) = PAKISTAN %THEN %DO;&lt;BR /&gt;
  '0002' = 'Customer Age &amp;lt; 18 or &amp;gt; 70'&lt;BR /&gt;
  '0009' = 'Vehicle Age + Term &amp;gt; 6 years'&lt;BR /&gt;
  '0013' = 'Incomplete bureau search'&lt;BR /&gt;
%END;&lt;BR /&gt;
%ELSE %DO;&lt;BR /&gt;
  /* Neither INDIA nor PAKISTAN specified -- possible error */&lt;BR /&gt;
%END;&lt;BR /&gt;
%MEND CountryFmts;&lt;BR /&gt;
&lt;BR /&gt;
PROC FORMAT;&lt;BR /&gt;
VALUE $polrule&lt;BR /&gt;
  '0000' = 'none'&lt;BR /&gt;
  '0001' = 'Customer Age Range'&lt;BR /&gt;
  '0037' = 'Military service not completed'&lt;BR /&gt;
  '0058' = 'Employee'&lt;BR /&gt;
  '0097' = 'Five year finance low deposit'&lt;BR /&gt;
  '0132' = 'Employment Type'&lt;BR /&gt;
  '0141' = 'Self Employed'&lt;BR /&gt;
  %CountryFmts (COUNTRY=INDIA)&lt;BR /&gt;
;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
/* or, in a different job */&lt;BR /&gt;
PROC FORMAT;&lt;BR /&gt;
VALUE $polrule&lt;BR /&gt;
  '0000' = 'none'&lt;BR /&gt;
  '0001' = 'Customer Age Range'&lt;BR /&gt;
  '0037' = 'Military service not completed'&lt;BR /&gt;
  '0058' = 'Employee'&lt;BR /&gt;
  '0097' = 'Five year finance low deposit'&lt;BR /&gt;
  '0132' = 'Employment Type'&lt;BR /&gt;
  '0141' = 'Self Employed'&lt;BR /&gt;
  %CountryFmts (COUNTRY=Pakistan)&lt;BR /&gt;
;&lt;BR /&gt;
RUN;&lt;BR /&gt;
[/pre]

&lt;BR /&gt;
Message was edited by: MikeRhoads at Jan 18, 2007 1:11 PM&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Jan 2007 14:09:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Reg-Macro-in-Proc-Format/m-p/2020#M890</guid>
      <dc:creator>MikeRhoads</dc:creator>
      <dc:date>2007-01-18T14:09:08Z</dc:date>
    </item>
  </channel>
</rss>

