<?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 Initializing a Character Variable in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Initializing-a-Character-Variable/m-p/70597#M8099</link>
    <description>Hi All:&lt;BR /&gt;
&lt;BR /&gt;
This may be a rather basic question, but how do I initialize a large character variable with data?&lt;BR /&gt;
&lt;BR /&gt;
My variable is 4000 bytes and I am writing specific values in parts of the record using the SUBSTR function.  I want to pack bytes 3001 to 4000 with '0' (zeros) or some other character.&lt;BR /&gt;
&lt;BR /&gt;
If it was a PUT statement I could use 1000*'0' and it would write 1000 zeros, but I can't use:&lt;BR /&gt;
&lt;BR /&gt;
     substr(text,3001,1000) = 1000*'0';&lt;BR /&gt;
&lt;BR /&gt;
because that returns a missing value.&lt;BR /&gt;
&lt;BR /&gt;
I would rather not do it manually and a DO loop sounds like a lot of processing for what I'm trying to do.</description>
    <pubDate>Wed, 24 Mar 2010 14:16:53 GMT</pubDate>
    <dc:creator>OS2Rules</dc:creator>
    <dc:date>2010-03-24T14:16:53Z</dc:date>
    <item>
      <title>Initializing a Character Variable</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Initializing-a-Character-Variable/m-p/70597#M8099</link>
      <description>Hi All:&lt;BR /&gt;
&lt;BR /&gt;
This may be a rather basic question, but how do I initialize a large character variable with data?&lt;BR /&gt;
&lt;BR /&gt;
My variable is 4000 bytes and I am writing specific values in parts of the record using the SUBSTR function.  I want to pack bytes 3001 to 4000 with '0' (zeros) or some other character.&lt;BR /&gt;
&lt;BR /&gt;
If it was a PUT statement I could use 1000*'0' and it would write 1000 zeros, but I can't use:&lt;BR /&gt;
&lt;BR /&gt;
     substr(text,3001,1000) = 1000*'0';&lt;BR /&gt;
&lt;BR /&gt;
because that returns a missing value.&lt;BR /&gt;
&lt;BR /&gt;
I would rather not do it manually and a DO loop sounds like a lot of processing for what I'm trying to do.</description>
      <pubDate>Wed, 24 Mar 2010 14:16:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Initializing-a-Character-Variable/m-p/70597#M8099</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2010-03-24T14:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Initializing a Character Variable</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Initializing-a-Character-Variable/m-p/70598#M8100</link>
      <description>Have you tried the REPEAT function? e.g. &lt;BR /&gt;
&lt;BR /&gt;
substr(text,3001,1000)=repeat(‘0’,999);&lt;BR /&gt;
&lt;BR /&gt;
This repeats the character ‘0’ 999 times making 1+999=1,000 characters altogether.</description>
      <pubDate>Wed, 24 Mar 2010 14:41:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Initializing-a-Character-Variable/m-p/70598#M8100</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-24T14:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: Initializing a Character Variable</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Initializing-a-Character-Variable/m-p/70599#M8101</link>
      <description>Thanks - that seems to have done it.&lt;BR /&gt;
&lt;BR /&gt;
Must have missed that one ....</description>
      <pubDate>Wed, 24 Mar 2010 15:24:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Initializing-a-Character-Variable/m-p/70599#M8101</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2010-03-24T15:24:56Z</dc:date>
    </item>
  </channel>
</rss>

