<?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>RichardinOz Tracker</title>
    <link>https://communities.sas.com/kntur85557/tracker</link>
    <description>RichardinOz Tracker</description>
    <pubDate>Wed, 13 May 2026 08:43:29 GMT</pubDate>
    <dc:date>2026-05-13T08:43:29Z</dc:date>
    <item>
      <title>Re: Can anybody explain me why we use '||' in call %execute() routine?? below is the given problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-anybody-explain-me-why-we-use-in-call-execute-routine-below/m-p/144382#M261862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;|| is the concatenation operator in SAS.&amp;nbsp; In Excel you would use &amp;amp;.&lt;/P&gt;&lt;P&gt;Call execute(&amp;lt;code to be executed&amp;gt;) allows SAS to place a section of code into the program flow to be executed immediately after the data step concludes.&amp;nbsp; In this case the code to be executed is a macro rept which is intended to draw a vbar chart on var1 for a given date drawing data from the reptdata table.&amp;nbsp; The data _null_ step is intended to provide the date parameter from a table called dates.&amp;nbsp; Lets say the date, being numeric, has the unformatted value 12345 (I have no idea what date that is).&amp;nbsp; Then the code inserted into the program flow should be&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.8000001907349px; background-color: #ffffff;"&gt;%rept(12345,var1,reptdata)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.8000001907349px; background-color: #ffffff;"&gt;To get this result the data _null_ step has to join some constant text values: &lt;EM&gt;%rept(&lt;/EM&gt;&amp;nbsp;&amp;nbsp; and then later&amp;nbsp;&amp;nbsp; &lt;EM&gt;,var1,reptdata)&lt;/EM&gt;&amp;nbsp;&amp;nbsp; with the date value 12345 taken from the dates table in the middle.&amp;nbsp; The expression could be simplified as &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.8000001907349px; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.8000001907349px; background-color: #ffffff;"&gt;call execute('%rept('&amp;nbsp; ||date||&amp;nbsp; ', var1, reptdata)');&amp;nbsp; /* spaces added for clarity */&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.8000001907349px; background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;since apparently for this example var1 from &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.8000001907349px; background-color: #ffffff;"&gt;reptdata&lt;/SPAN&gt; is always used when table dates is used as the source of date data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Sep 2014 12:41:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-anybody-explain-me-why-we-use-in-call-execute-routine-below/m-p/144382#M261862</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-09-14T12:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS packaged solutions outstrips need for SAS developers?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-packaged-solutions-outstrips-need-for-SAS-developers/m-p/134967#M260955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As an afterthought:&lt;/P&gt;&lt;P&gt;Not every SAS admin can be a Jaap of all trades.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 13:30:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-packaged-solutions-outstrips-need-for-SAS-developers/m-p/134967#M260955</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-09-12T13:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Import only values from Excel worksheet.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Import-only-values-from-Excel-worksheet/m-p/142268#M296787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your example &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.8000001907349px; background-color: #ffffff;"&gt;2.333......333 is the unformatted (underlying) value in Excel, which is what SAS reads and imports.&amp;nbsp; You can apply a SAS format such as 16.1 or comma20.1 after the import to achieve what you want.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The standard import procedure in SAS does not carry across the format applied in Excel, although in the case of dates SAS uses the Excel format to identify the value as a date, import it and adjust the base date and apply a SAS date format which might or might not look similar to the Excel format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might be able to achieve what you want by exporting the data as a text file (CSV or tab delimited) and importing that into SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 13:27:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Import-only-values-from-Excel-worksheet/m-p/142268#M296787</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-09-12T13:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS packaged solutions outstrips need for SAS developers?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-packaged-solutions-outstrips-need-for-SAS-developers/m-p/134964#M260952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cold windy and wet down here but at least I can see where I am heading as I stumble off to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As it happens I am working for an organisation which is implementing a SAS solution and there seems to be no shortage of opportunities to ply my trade.&amp;nbsp; No doubt that as the products mature over time some of the 'features' will be smoothed over but the SAS admins have quite enough to do, thank you, without having to get involved in model validation, to take an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also recently worked in an organisation which has decided on an in house approach to the same type of development.&amp;nbsp; I think the potential value of the package approach lies in the nature between the organisation and the vendor: it can and should be much more of a partnership than a transaction.&amp;nbsp; My analogy is the doctor and the pharmacist: my doctor understands (some of) what makes me tick, the pharmacist knows my name because it is on the scrip.&amp;nbsp; SAS can sell you the 'pills' for you to use as you see fit, or they can help diagnose and address the business requirements.&amp;nbsp; And when it is all implemented inevitably people move on, diluting the intellectual capital of the organisation, but some of that is offset by having a business partner that continues to understand both the issues and the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard "too soon to bring out the budgie smugglers"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Sep 2014 13:01:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-packaged-solutions-outstrips-need-for-SAS-developers/m-p/134964#M260952</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-09-12T13:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAS packaged solutions outstrips need for SAS developers?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-packaged-solutions-outstrips-need-for-SAS-developers/m-p/134959#M260947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well Charlotte&lt;/P&gt;&lt;P&gt;If every bank in the world was running identical banking applications on identical machines using identical identifiers and marketing identical products to identical customers using identical business rules in identical regulatory requirements and having identical maverick board members asking identical maverick questions about risk you might have a case that an out of the box credit risk solution could be implemented by a couple of admin, at least until the world suffers its next identical financial crisis and all the rules change again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the real world sleepless tossing is not advised.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In any case you can switch to marketing or fraud detection where it is the nature of success to innovate or at least attempt to keep up with what others are doing, requiring inventiveness and flair which will not come ot of a box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 11:35:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-packaged-solutions-outstrips-need-for-SAS-developers/m-p/134959#M260947</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-09-10T11:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: extracting first few digits from a numeric variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extracting-first-few-digits-from-a-numeric-variable/m-p/184331#M265453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wot???&lt;/P&gt;&lt;P&gt;The formula is entirely numeric, intended to operate on a numeric variable, as described by the OP.&lt;/P&gt;&lt;P&gt;As it happens I am in agreement with you about automatic conversions.&lt;/P&gt;&lt;P&gt;Apology accepted&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Sep 2014 07:20:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extracting-first-few-digits-from-a-numeric-variable/m-p/184331#M265453</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-09-07T07:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Joining two tables based on observations in a seperate table (in EG)?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Joining-two-tables-based-on-observations-in-a-seperate-table-in/m-p/162890#M300070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you going to do the merge?&amp;nbsp; You need some common variable in each table to join on to avoid a cartesian product in SQL.&amp;nbsp; If there is none a datastep merge without a by variable might work for you though the result may not be quite what you expect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 1: set up a macro to do the merge - here assuming no common variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro merge_ctry (ctry, crncy) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data &amp;amp;ctry._combined ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; merge ctry_&amp;amp;ctry &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; crncy_&amp;amp;crncy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run ;&lt;/P&gt;&lt;P&gt;%mend ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2: use a datastep to execute the macro for each ctry - crncy pair&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _Null_ ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set countries ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if exist(ctry) and exist(crncy) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec_macro = cats('%merge_ctry(', ctry, ', ', crncy, ');') ; /* single quotes essential */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call execute (exec_macro) ;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NB the macro invocations will be streamed to execute after the data step terminates.&lt;/P&gt;&lt;P&gt;Obviously this is untested but it is a viable approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 23:21:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Joining-two-tables-based-on-observations-in-a-seperate-table-in/m-p/162890#M300070</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-09-05T23:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: extracting first few digits from a numeric variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/extracting-first-few-digits-from-a-numeric-variable/m-p/184328#M265450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a solution that avoids number to character conversion and back again, and also deals with fractional and negative values&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int(abs(num)/10**(log10(abs(num))-3))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works by dividing the number by the requisite power of 10 (including negative power) and truncating the decimal portion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 22:58:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/extracting-first-few-digits-from-a-numeric-variable/m-p/184328#M265450</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-09-05T22:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: reading data, expanding to seperate variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/reading-data-expanding-to-seperate-variables/m-p/175963#M302225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a solution which will write the original 'code' and its expansion to the log.&amp;nbsp; It can be adapted to write to a file. Fortuitously it deals with the miscode spotted by Data _Null_.&amp;nbsp; Next step named in honour.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="p1"&gt;Data _null_ ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; input codes $char60. ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; length code base range result $8 ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; codes = compress(codes, "'") ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; Do k = 1 to 99 ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; code = scan (codes, k, ', ') ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; if missing(code) then return ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; range = scan (code, 2, '.') ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; base = scan (code, 1, '.') ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; m = input (scan (base, 1, 'C-'), 2.) ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; n = input (scan (base, 2, 'C-'), 2.) ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; p = input (scan (range, 1, '-'), 1.) ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; q = input (scan (range, 2, '-'), 1.) ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; if missing (range) then&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; do ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; p = 0 ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; q = 9 ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; end ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; put code '&amp;gt; ' ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; do j = m to max (m, n) ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; base = cat ('C', put (j, z2.)) ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; do i = p to max (p, q) ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; result = catx ('.', base, i) ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; put result @ ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; end ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; end ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; put&amp;nbsp; ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; end ;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp; drop codes i j k m n p q base range ;&lt;/P&gt;&lt;P class="p1"&gt;Datalines ;&lt;/P&gt;&lt;P class="p1"&gt;'C00.3-5, C02-04, C05.0, C05.8-9, C06'&lt;/P&gt;&lt;P class="p1"&gt;'C01, C10.0, C10.2-3, C10.8-9, C11-12'&lt;/P&gt;&lt;P class="p1"&gt;'C01, C05.1-2, C09, C10.0, C10.2-3, C10.8-9, C11-14'&lt;/P&gt;&lt;P class="p1"&gt;'C44.0-4, C47.0, C49.0, C00-14, C30-32, C73'&lt;/P&gt;&lt;P class="p1"&gt;'C44.5, C44.8-9, C47.6-9, C49.6-9'&lt;/P&gt;&lt;P class="p1"&gt;'C00-C26, C32-C69, C73, C75.4-9, C76-C80'&lt;/P&gt;&lt;P class="p1"&gt;'C00-50, C60-61, C63-69, C73-74, C76-80'&lt;/P&gt;&lt;P class="p1"&gt;'C00, C03-08, C15-17, C19-41, C44-76'&lt;/P&gt;&lt;P class="p1"&gt;'C00, C03-08, C15-17, C19-41, C44-76'&lt;/P&gt;&lt;P class="p1"&gt;run ;&lt;/P&gt;&lt;P class="p1"&gt;&lt;/P&gt;&lt;P class="p1"&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2014 12:50:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/reading-data-expanding-to-seperate-variables/m-p/175963#M302225</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-08-26T12:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: run code only in january</title>
      <link>https://communities.sas.com/t5/SAS-Programming/run-code-only-in-january/m-p/173525#M264457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;where month(reporting_date) = 12&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Aug 2014 14:58:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/run-code-only-in-january/m-p/173525#M264457</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-08-24T14:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: mod function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/mod-function/m-p/173588#M264488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming you have the date as a macro variable you could create&lt;/P&gt;&lt;P&gt;%sysfunc(mod(%sysfunc(month(&amp;amp;Date)), 2))&lt;/P&gt;&lt;P&gt;for a 0 , 1 even - odd &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;or %eval(2 - [the expression above]) to have 1, 2 with 1 odd , 2 even&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Richard&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Aug 2014 14:56:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/mod-function/m-p/173588#M264488</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-08-24T14:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Procs in SAS 9.1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Procs-in-SAS-9-1/m-p/159446#M263176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you don't have Proc REG you either do not have the SAS STAT product installed or it is damaged.&amp;nbsp; You need SAS STAT to do multivariate analyses.&amp;nbsp; In Base SAS you are limited to univariate analyses and correlations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2014 12:56:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Procs-in-SAS-9-1/m-p/159446#M263176</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-08-14T12:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Working with SAS format dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Working-with-SAS-format-dates/m-p/160906#M263330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Linus' reply is a bit terse.&amp;nbsp; The intnx function will provide an answer, provided you supply the right question.&amp;nbsp; Do you want 9 calendar months exactly (ie to the same day - if possible - 9 months previously), or do you just need the month and the first day will do; or maybe push all dates &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;back &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;by the same amount (0.75 year = 274 days)?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Taking these options in reverse order:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Prev_date = date - 274 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Prev_date = intnx("MONTH", date, -9) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Prev_date = intnx("MONTH", date, -9, "SAME") ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;INTNX is documented here &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212700.htm" title="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212700.htm"&gt;SAS(R) 9.2 Language Reference: Dictionary, Fourth Edition&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;BTW, if your dates are datetime intervals you need to use "DTMONTH" instead of "MONTH" ; and for the 274 day calculations use&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Prev_date = intnx("DTDAY", date, -274, "SAME") ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Richard&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2014 12:38:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Working-with-SAS-format-dates/m-p/160906#M263330</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-08-14T12:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple do loops in a data do not return what was expected</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-do-loops-in-a-data-do-not-return-what-was-expected/m-p/139905#M261464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try running your code but including the &lt;STRONG&gt;missing&lt;/STRONG&gt; statement after the data statement.&amp;nbsp; "missing" is a global statement that notifies SAS that your code handles special missing values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 10:43:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-do-loops-in-a-data-do-not-return-what-was-expected/m-p/139905#M261464</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-08-01T10:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to call excel macro from sas 9.3 EG connection from my local server.  But I am getting the following error in the initial step itself of opening a excel. I am new to SAS DDE, please help me</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-am-trying-to-call-excel-macro-from-sas-9-3-EG-connection-from/m-p/140127#M261485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Microsoft DDE only works when both the application issuing the DDE statements and the target application are &lt;STRONG&gt;on the same Windows platform.&amp;nbsp; &lt;/STRONG&gt;Typically, when using SAS EG, the core SAS application resides on a server (which may or may not be a Windows server) but the Excel instance is on a local machine.&amp;nbsp; SAS EG, even though it is located locally, is not itself involved in DDE; it merely issues SAS code to the server to be executed.&amp;nbsp; Use EG file import/export to move data between Excel and SAS.&lt;/P&gt;&lt;P&gt;Despite its many merits, (and many champions), DDE is legacy technology which, as you have found, is not scalable in a client server (EG) situation.&amp;nbsp; Microsoft and others did toy with the idea of making it more generic but it didn't happen and we now have to find repoacement methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some sympathy for you if you have been given some code to run.&amp;nbsp; You can only make DDE work if you have Base SAS (and Excel) installed on your desktop, or you can adapt the code to work on a Windows server where you have SAS.&amp;nbsp;&amp;nbsp; If your workplace can provide that, good.&amp;nbsp; Otherwise you have been set a task you cannot complete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 12:13:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-am-trying-to-call-excel-macro-from-sas-9-3-EG-connection-from/m-p/140127#M261485</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-07-30T12:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple do loops in a data do not return what was expected</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-do-loops-in-a-data-do-not-return-what-was-expected/m-p/139902#M261461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The missing statement is missing!&amp;nbsp; Your code works unchanged following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data temp1 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; missing A B C D E F G ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile datalines missover dlm = '09'x ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input Obs C03 C06 C08 C05 C07 C02 C01 C04 temp1 temp2 r1 r2 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; drop obs r1 r2 ;&lt;/P&gt;&lt;P&gt;datalines ;&lt;/P&gt;&lt;P&gt;1 1 1589691 1385 6 4 74 98.564 5.247 0.8 0.2 60 103&lt;/P&gt;&lt;P&gt;2 1 831697 445 4 5 91 112.11 6.0543 0.2 0.7 103 103&lt;/P&gt;&lt;P&gt;3 C 438287 170 15 5 67 142.051 12.3561 0.1 0.5 12 57&lt;/P&gt;&lt;P&gt;4 4 513424 151 3 4 26 145.345 12.1783 0.1 0.3 12 67&lt;/P&gt;&lt;P&gt;5 1 632787 549 3 3 71 110.274 7.9074 0.2 0.8 103 2&lt;/P&gt;&lt;P&gt;6 1 784585 138 17 3 36 96.169 12.9356 0.5 0.4 57 57&lt;/P&gt;&lt;P&gt;7 0 5220856 611 7 5 53 120.258 8.8338 0.7 0.8 103 2&lt;/P&gt;&lt;P&gt;8 E 333766 456 5 4 60 134.078 5.308 0.1 0.2 12 103&lt;/P&gt;&lt;P&gt;9 C 432310 525 5 3 61 129.407 7.8711 0.1 0.2 12 103&lt;/P&gt;&lt;P&gt;10 C 8509368 2390 13 6 56 141.523 3.8929 0.1 0.5 12 57&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE cellpadding="0" cellspacing="0" class="t1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="td1" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;Obs&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td2" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;C03&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td3" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;C06&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td4" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;C08&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td2" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;C05&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td2" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;C07&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td2" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;C02&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td5" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;C01&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td5" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;C04&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td6" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;temp1&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td6" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;temp2&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td7" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;r1&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td7" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;r2&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="td1" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td9" valign="top"&gt;&lt;P class="p2"&gt;1589691&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td10" valign="top"&gt;&lt;P class="p2"&gt;1385&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;6&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;74&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;98.564&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;5.2470&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.8&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.2&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;60&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;103&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="td1" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td9" valign="top"&gt;&lt;P class="p2"&gt;831697&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td10" valign="top"&gt;&lt;P class="p2"&gt;445&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;5&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;91&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;112.110&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;6.0543&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.2&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.7&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;103&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;103&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="td1" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;C&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td9" valign="top"&gt;&lt;P class="p2"&gt;438287&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td10" valign="top"&gt;&lt;P class="p2"&gt;170&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;15&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;5&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;67&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;142.051&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;12.3561&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.1&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.5&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;12&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;57&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="td1" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td9" valign="top"&gt;&lt;P class="p2"&gt;513424&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td10" valign="top"&gt;&lt;P class="p2"&gt;151&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;26&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;145.345&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;12.1783&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.1&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.3&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;12&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;67&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="td1" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;5&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td9" valign="top"&gt;&lt;P class="p2"&gt;632787&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td10" valign="top"&gt;&lt;P class="p2"&gt;549&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;71&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;110.274&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;7.9074&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.2&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.8&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;103&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;60&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="td1" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;6&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td9" valign="top"&gt;&lt;P class="p2"&gt;784585&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td10" valign="top"&gt;&lt;P class="p2"&gt;138&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;17&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;36&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;96.169&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;12.9356&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.5&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.4&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;57&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;39&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="td1" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;7&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td9" valign="top"&gt;&lt;P class="p2"&gt;5220856&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td10" valign="top"&gt;&lt;P class="p2"&gt;611&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;7&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;5&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;53&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;120.258&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;8.8338&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.7&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.8&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;103&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;60&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="td1" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;8&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;E&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td9" valign="top"&gt;&lt;P class="p2"&gt;333766&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td10" valign="top"&gt;&lt;P class="p2"&gt;456&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;5&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;60&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;134.078&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;5.3080&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.1&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.2&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;12&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;103&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="td1" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;9&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;C&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td9" valign="top"&gt;&lt;P class="p2"&gt;432310&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td10" valign="top"&gt;&lt;P class="p2"&gt;525&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;5&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;61&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;129.407&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;7.8711&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.1&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.2&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;12&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;103&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="td1" valign="top"&gt;&lt;P class="p1"&gt;&lt;STRONG&gt;10&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;C&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td9" valign="top"&gt;&lt;P class="p2"&gt;8509368&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td10" valign="top"&gt;&lt;P class="p2"&gt;2390&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;13&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;6&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td8" valign="top"&gt;&lt;P class="p2"&gt;56&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;141.523&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td11" valign="top"&gt;&lt;P class="p2"&gt;3.8929&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.1&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td12" valign="top"&gt;&lt;P class="p2"&gt;0.5&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;12&lt;/P&gt;&lt;/TD&gt;&lt;TD class="td13" valign="top"&gt;&lt;P class="p2"&gt;57&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 10:49:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-do-loops-in-a-data-do-not-return-what-was-expected/m-p/139902#M261461</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-07-29T10:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple dummy variables to one dummy variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-dummy-variables-to-one-dummy-variable/m-p/138388#M261355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Data want ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set have ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outcome = max (anxiety, stress, multiple, etc1, etc2, etc3, etc4) ;&lt;/P&gt;&lt;P&gt;Run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 12:33:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-dummy-variables-to-one-dummy-variable/m-p/138388#M261355</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-07-28T12:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help Padding Blanks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-Padding-Blanks/m-p/176930#M264751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS does not "forget" the trailing blanks.&amp;nbsp; However, when making a comparison between two character variables as a convenience it in effect trims (removes trailing blanks) for the purpose of making the comparison and only during the comparison. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The alternative would be that you would have to extend the shorter variable with blanks in order to compare two variables of unequal length.&amp;nbsp; Maybe this is what SAS is doing "under the covers" anyway.&amp;nbsp; The effect is the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a convention that has been adopted by SAS and I think they made the right choice.&amp;nbsp; It would be tedious to have to check the length of each variable before making a comparison, in case the comparison would fail each time the lengths were different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An alternate design would have used byte(0) ( '00'x ) for padding in which case the number of trailing blanks would not change if the value is copied into a variable with longer length, and would be significant in comparisons.&amp;nbsp; It's one of the early design decisions that become fundamental to the language.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see that SAS retains trailing blanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; length var $ 12 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var = 'ABC' ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var = var || 'XYZ' ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put var= ;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because var is defined with length 12 the value ABC is padded with 9 blanks.&amp;nbsp; It then has no space left to add on the XYZ.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Macro variables, on the other hand, do not have fixed length and they can be extended, so you get a different result:&lt;/P&gt;&lt;P&gt;%Let var = %Str(ABC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) ;&lt;/P&gt;&lt;P&gt;%Let var = &amp;amp;var.XYZ ;&lt;/P&gt;&lt;P&gt;%Put &amp;amp;var ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 11:15:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-Padding-Blanks/m-p/176930#M264751</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-07-16T11:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: increment by subject using retain in a single datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/increment-by-subject-using-retain-in-a-single-datastep/m-p/167287#M263904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jag&lt;/P&gt;&lt;P&gt;Your main problem is you are entering month as a name rather than as a date, so the months will not sort properly.&amp;nbsp; The solution above works for a single subj provided all the months are in the same year and the data is in intuitive order. To generalise to more than one subject you need to reset the counter for each subj.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;data want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; by subj month notsorted;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; retain seq ;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if first.subj then seq=0 ;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if first.month then seq+1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;Richard&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Jul 2014 04:13:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/increment-by-subject-using-retain-in-a-single-datastep/m-p/167287#M263904</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-07-05T04:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: Create new observation from 'or' statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-new-observation-from-or-statement/m-p/150674#M262455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a one step solution&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Infile cards missover ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input id x $ @ ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; output ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input @'or' x ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; If not missing(x) then output ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;1&amp;nbsp; a&lt;/P&gt;&lt;P&gt;2&amp;nbsp; b&lt;/P&gt;&lt;P&gt;3&amp;nbsp; a or b&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jun 2014 08:01:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-new-observation-from-or-statement/m-p/150674#M262455</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2014-06-21T08:01:05Z</dc:date>
    </item>
  </channel>
</rss>

