<?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: ...an identifier after a quoted string might change in a future SAS release.  Macro errors in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/an-identifier-after-a-quoted-string-might-change-in-a-future-SAS/m-p/709317#M218095</link>
    <description>&lt;P&gt;Thank you very much for the helpful suggestion. I really wish I was better at this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jan 2021 20:50:50 GMT</pubDate>
    <dc:creator>Jeff_DOC</dc:creator>
    <dc:date>2021-01-04T20:50:50Z</dc:date>
    <item>
      <title>...an identifier after a quoted string might change in a future SAS release.  Macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/an-identifier-after-a-quoted-string-might-change-in-a-future-SAS/m-p/709259#M218064</link>
      <description>&lt;P&gt;Good morning. I've inherited code from long ago that suddenly has stopped running. I can't seem to figure out what's happened here. The issue, as noted in the log is "The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended." However, this doesn't appear to be the only error. I'm not good with macros so I can't seem to figure this one out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One thing I had thought of, based on other posts, was the format of the data in &amp;amp;report_date_txt. This date is&amp;nbsp;03/2002 and so has a special character.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As I said, I'm not good with macros so I don't really understand what's potentially happening here. Can anyone offer some suggestions?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe the first section is from the compiler and the second is from the actual run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 17:56:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/an-identifier-after-a-quoted-string-might-change-in-a-future-SAS/m-p/709259#M218064</guid>
      <dc:creator>Jeff_DOC</dc:creator>
      <dc:date>2021-01-04T17:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: ...an identifier after a quoted string might change in a future SAS release.  Macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/an-identifier-after-a-quoted-string-might-change-in-a-future-SAS/m-p/709261#M218065</link>
      <description>&lt;P&gt;To enter a constant or literal value you use quotes.&amp;nbsp; If the value is not a character string the the character(s) immediately after the closing quote tell SAS what type of value it is.&amp;nbsp; So D means DATE and T means TIME and there are others. The warning is because you have a P immediately after the quote in the second line below, but not in the first line.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;put """OC"""','"""&amp;amp;report_date_txt."""','"""PrisonerHousedBydoC"""',' prisoners_housed_by_doc ',';
put """OC"""','"""&amp;amp;report_date_txt."""','"""PrisonersOutsourced"""','prisoners_outsourced ',';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You should probably just go ahead and insert spaces around all of the items in your PUT statements, that should solve the issue.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;put """OC""" ',' """&amp;amp;report_date_txt.""" ',' """PrisonerHousedBydoC""" ',' prisoners_housed_by_doc ',';
put """OC""" ',' """&amp;amp;report_date_txt.""" ',' """PrisonersOutsourced""" ',' prisoners_outsourced ',';&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Jan 2021 18:15:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/an-identifier-after-a-quoted-string-might-change-in-a-future-SAS/m-p/709261#M218065</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-01-04T18:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: ...an identifier after a quoted string might change in a future SAS release.  Macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/an-identifier-after-a-quoted-string-might-change-in-a-future-SAS/m-p/709263#M218067</link>
      <description>&lt;P&gt;Please note that the word "error" does not appear anywhere in that warning.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would be much more concerned about the conversion of numeric to character values in the first note. The rules for converting such numeric values may not always be what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't believe I have ever seen code with as many quotes around a single value as your code uses.&lt;/P&gt;
&lt;P&gt;I am sure there must be some reason but seeing code like:&lt;/P&gt;
&lt;PRE&gt;put """OC"""','"""&amp;amp;report_date_txt."""','"""OperationalCapacity"""',' operational_capacity ',';
&lt;/PRE&gt;
&lt;P&gt;makes me cringe.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 18:22:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/an-identifier-after-a-quoted-string-might-change-in-a-future-SAS/m-p/709263#M218067</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-01-04T18:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: ...an identifier after a quoted string might change in a future SAS release.  Macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/an-identifier-after-a-quoted-string-might-change-in-a-future-SAS/m-p/709305#M218092</link>
      <description>&lt;P&gt;Define a sufficiently long variable to hold a complete line of text, and build each line by using the QUOTE and CATX functions; then PUT that single variable. This will reduce the size and complexity of your code greatly.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 20:07:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/an-identifier-after-a-quoted-string-might-change-in-a-future-SAS/m-p/709305#M218092</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-01-04T20:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: ...an identifier after a quoted string might change in a future SAS release.  Macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/an-identifier-after-a-quoted-string-might-change-in-a-future-SAS/m-p/709312#M218093</link>
      <description>&lt;P&gt;Does the target system really needs the extra quotes?&amp;nbsp; Most systems (and the actual standard for delimited files) does not need those extra quotes around the values of the first three fields in the comma delimited file.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could probably make the code much easier to maintain if you just made the names (or labels) of the variables match the values you want to write.&amp;nbsp; So something like this instead:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
* Define variable names and labels ;
  label
    OPERATIONAL_CAPACITY ="OperationalCapacity"
    PRISONERS_HOUSED_BY_DOC ="PrisonerHousedBydoC"
    PRISONERS_OUTSOURCED ="PrisonersOutsourced"
    MALE_SECURITY_STAFF ="MaleSecurityStaff"
    FEMALE_SECURITY_STAFF ="FemaleSecurityStaff"
    AGENCY_FACILITY_STAFF ="InstitutionalStaff"
    zero1 ="Jails"
    zero2 ="CommunityBasedCorrections"
    one1 ="Prisons"
    zero3 ="CivilCommitments"
    zero4 ="Probation"
    zero5 ="Parole"
    zero6 ="Juvenile"
    zero7 ="ParoleBoard"
    AVG_SENT_LENGTH ="AvgLengthOfSentence"
    AVG_LOS ="AvgLengthOfStaySentencedOffenders"
    AVG_LOS_PRETRIAL ="AvgLengthOfStayPretrial"
    LESS_ONE_YEAR ="LessThan1Year"
    ONE_TO_THREE ="1To3Years"
    THREE_TO_FIVE ="3To5Years"
    FIVE_TO_TEN ="5To10Years"
    TEN_TO_TWENTY ="10To20Years"
    TWENTY_TO_FORTY ="20To40Years"
    OVER_FORTY ="MoreThan40Years"
    LIFE ="LifeWithParole"
    LIFE_NO_PAROLE ="LifeWithoutParole"
    DEATH ="Death"
    PART_I_VIOLENT ="PartIViolentCrime"
    OTHER_VIOLENT ="OtherViolentCrime"
    PROPERTY ="PropertyCrime"
    DRUG ="DrugCrime"
    PRE_TRIAL ="PretrialNonConvicted"
    OTHER_PUBLIC_ORDER ="OtherPublicOrderCrime"
    OTHER ="OtherCrime"
    AVERAGE_AGE ="AverageAge"
    MALE ="Male"
    FEMALE ="Female"
    WHITE ="White"
    BLACK ="BlackOrAfricanAmerican"
    zero8 ="NativeHawaiianOrPacificIslander"
    NATIVE_AMERICAN_ALASKAN_NATIVE ="NativeAmericanAlaskanNative"
    HISPANIC ="HispanicOrLatino"
    ASIAN ="Asian"
    zero9 ="Other"
    UNKNOWN ="UnknownMissing"
    NON_CITIZENS ="NonCitizens"
    NEW_CONVICTION ="NewConviction"
    TECH_NEW_SENTENCE ="TechnicalViolationWithNewSentence"
    TECH_NO_NEW_SENTENCE ="TechnicalViolationWithNoNewSentence"
    zero10 ="PretrialAdmission"
  ;
  array all OPERATIONAL_CAPACITY -- zero10 ;

* Set values of zero and one variables ;
  one1=1;
  array zero [10 ] zero1-zero10 (10 *0);
  retain zero1-zero10;

  set org_char11;
  file "\\temp\org_char&amp;amp;report_date_num..txt" dsd ;

* Write one line per variable ;
  length col1-col5 $50 ;
  col1="OC";
  col2="&amp;amp;report_date_txt.";
  col5=' ';
  do index=1 to dim(all);
    col3=vlabel(all[index]);
    col4=vvalue(all[index]);
    put col1 ~ col2 ~ col3 ~ col4 col5 ;
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The ~ modifier in the PUT statement is what is adding the quotes.&amp;nbsp; The empty COL5 is what is adding the trailing comma.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 20:41:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/an-identifier-after-a-quoted-string-might-change-in-a-future-SAS/m-p/709312#M218093</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-01-04T20:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: ...an identifier after a quoted string might change in a future SAS release.  Macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/an-identifier-after-a-quoted-string-might-change-in-a-future-SAS/m-p/709316#M218094</link>
      <description>&lt;P&gt;I so wish this forum had a "thanks for the helpful efficiency suggestions" button.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for the advice!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 20:49:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/an-identifier-after-a-quoted-string-might-change-in-a-future-SAS/m-p/709316#M218094</guid>
      <dc:creator>Jeff_DOC</dc:creator>
      <dc:date>2021-01-04T20:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: ...an identifier after a quoted string might change in a future SAS release.  Macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/an-identifier-after-a-quoted-string-might-change-in-a-future-SAS/m-p/709317#M218095</link>
      <description>&lt;P&gt;Thank you very much for the helpful suggestion. I really wish I was better at this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 20:50:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/an-identifier-after-a-quoted-string-might-change-in-a-future-SAS/m-p/709317#M218095</guid>
      <dc:creator>Jeff_DOC</dc:creator>
      <dc:date>2021-01-04T20:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: ...an identifier after a quoted string might change in a future SAS release.  Macro errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/an-identifier-after-a-quoted-string-might-change-in-a-future-SAS/m-p/709320#M218096</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3264"&gt;@Jeff_DOC&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you very much for the helpful suggestion. I really wish I was better at this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Don't feel bad. I've been programming off and on in different languages since 1978 and still learning things. Sometimes relearning.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 21:32:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/an-identifier-after-a-quoted-string-might-change-in-a-future-SAS/m-p/709320#M218096</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-01-04T21:32:08Z</dc:date>
    </item>
  </channel>
</rss>

