<?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: Read Value with inverted comma in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/374567#M89707</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;&amp;nbsp;I'm getting issue when my first column is blank...even though i've tried missover, truncover but issue still persist.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jul 2017 15:42:11 GMT</pubDate>
    <dc:creator>atul_desh</dc:creator>
    <dc:date>2017-07-10T15:42:11Z</dc:date>
    <item>
      <title>Read Value with inverted comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370577#M88508</link>
      <description>&lt;P&gt;I've want to read var2 &amp;amp; var8 with (") in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think dsd considering inverted comma as delimeter.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can I read value ? please help !!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data ds2;&lt;BR /&gt;infile datalines dsd dlm="|" missover;&lt;BR /&gt;input (var1-var8) ($);&lt;BR /&gt;datalines;&lt;BR /&gt;2|"28 |4|||||29" |&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=ds2;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 13:50:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370577#M88508</guid>
      <dc:creator>atul_desh</dc:creator>
      <dc:date>2017-06-26T13:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Read Value with inverted comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370593#M88511</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ds2;
infile datalines ;
input;
var1=scan(_infile_,1,'|','m');
var2=scan(_infile_,2,'|','m');
var3=scan(_infile_,3,'|','m');
var4=scan(_infile_,4,'|','m');
var5=scan(_infile_,5,'|','m');
var6=scan(_infile_,6,'|','m');
var7=scan(_infile_,7,'|','m');
var8=scan(_infile_,8,'|','m');

datalines;
2|"28 |4|||||29" |
run;

proc print data=ds2;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Jun 2017 14:12:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370593#M88511</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-06-26T14:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Read Value with inverted comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370595#M88512</link>
      <description>&lt;P&gt;If your data does not contain any Pipe characters as part of the actual data then you probably do not need DSD to read it.&lt;/P&gt;
&lt;P&gt;If you data is not pipe delimited then you should indicate how the data is actually structured.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 14:13:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370595#M88512</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-06-26T14:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Read Value with inverted comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370596#M88513</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt; the problem comes from the dual function of dsd; one needs dsd so that two or more successive delimiters are read as missing values. But then SAS also drops the quotes.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 14:16:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370596#M88513</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-06-26T14:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Read Value with inverted comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370597#M88514</link>
      <description>My data is in tab delimited text file... but I shown here as pipe delimited just to more readable.</description>
      <pubDate>Mon, 26 Jun 2017 14:18:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370597#M88514</guid>
      <dc:creator>atul_desh</dc:creator>
      <dc:date>2017-06-26T14:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Read Value with inverted comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370598#M88515</link>
      <description>&lt;P&gt;The following should work:&lt;/P&gt;
&lt;PRE&gt;data ds2;
  infile datalines dsd dlm="|" missover;
  input @;
  _infile_=translate(_infile_,'~','"');
  input (var1-var8) ($);
  array have(*) $ var1-var8;
  do i=1 to dim(have);
    have(i)=translate(have(i),'"','~');
  end;
datalines;
2|"28 |4|||||29" |
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 14:19:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370598#M88515</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-06-26T14:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Read Value with inverted comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370605#M88517</link>
      <description>thank you but Actual data which I'm having is having 180 variable and 85 million observation.. so using array make them more difficult to run...longer to run.</description>
      <pubDate>Mon, 26 Jun 2017 14:28:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370605#M88517</guid>
      <dc:creator>atul_desh</dc:creator>
      <dc:date>2017-06-26T14:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Read Value with inverted comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370608#M88518</link>
      <description>&lt;P&gt;Do you need to keep the quotation marks? If not, the array isn't needed as they could just be compressed rather than converted to a tilde.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 14:33:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370608#M88518</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-06-26T14:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Read Value with inverted comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370624#M88519</link>
      <description>Yes I do need quotation mark !! &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;</description>
      <pubDate>Mon, 26 Jun 2017 15:02:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370624#M88519</guid>
      <dc:creator>atul_desh</dc:creator>
      <dc:date>2017-06-26T15:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Read Value with inverted comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370628#M88520</link>
      <description>&lt;P&gt;Then you could use:&lt;/P&gt;
&lt;PRE&gt;data ds2;&lt;BR /&gt; infile datalines dlm="|" missover;&lt;BR /&gt; input @;&lt;BR /&gt; do while (index(_infile_,'||') gt 0);&lt;BR /&gt; _infile_=tranwrd(_infile_,"||","|.|");&lt;BR /&gt; end;&lt;BR /&gt; input (var1-var8) ($);&lt;BR /&gt;datalines;&lt;BR /&gt;2|"28 |4|||||29" |&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 17:50:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370628#M88520</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-06-26T17:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Read Value with inverted comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370633#M88521</link>
      <description>In Actaul file it is tab delimeted... I'm trying to replace | with '09'x..</description>
      <pubDate>Mon, 26 Jun 2017 15:34:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370633#M88521</guid>
      <dc:creator>atul_desh</dc:creator>
      <dc:date>2017-06-26T15:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Read Value with inverted comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370638#M88523</link>
      <description>yup.. is there any way so that dsd don't consider double quotes &amp;amp; single quotes as delimiter and only consider Pipe or '09'x ??</description>
      <pubDate>Mon, 26 Jun 2017 15:50:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370638#M88523</guid>
      <dc:creator>atul_desh</dc:creator>
      <dc:date>2017-06-26T15:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Read Value with inverted comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370677#M88534</link>
      <description>&lt;P&gt;My original code had an uncorrected oversight which I'll correct after posting this. The following will work with your tab delimited file:&lt;/P&gt;
&lt;PRE&gt;data ds2;
  infile datalines dlm='09'x missover;
  input @;
  do while (index(_infile_,'0909'x) gt 0);
    _infile_=tranwrd(_infile_,'0909'x,'092E09'x);
  end;
  input (var1-var8) ($);
  datalines;
2	"28 	4					29"	
;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 17:50:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/370677#M88534</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-06-26T17:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Read Value with inverted comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/374567#M89707</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;&amp;nbsp;I'm getting issue when my first column is blank...even though i've tried missover, truncover but issue still persist.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2017 15:42:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/374567#M89707</guid>
      <dc:creator>atul_desh</dc:creator>
      <dc:date>2017-07-10T15:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Read Value with inverted comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/374572#M89709</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/94664"&gt;@atul_desh&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;&amp;nbsp;I'm getting issue when my first column is blank...even though i've tried missover, truncover but issue still persist.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Add code to handle that case.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if _infile_=: '09'x then _infile_='.'||_infile_;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Jul 2017 15:56:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/374572#M89709</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-07-10T15:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Read Value with inverted comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/374574#M89711</link>
      <description>&lt;P&gt;I agree with&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;:&lt;/P&gt;
&lt;PRE&gt;data ds2;
  infile datalines dlm='09'x missover;
  input @;
  do while (index(_infile_,'0909'x) gt 0);
    _infile_=tranwrd(_infile_,'0909'x,'092E09'x);
  end;
  if _infile_=: '09'x then _infile_='.'||_infile_;  input (var1-var8) ($);
  datalines;
2	"28 	4					29"	
	"28 	4					29"	
2	"28 	4					29"	
;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2017 16:00:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/374574#M89711</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-07-10T16:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Read Value with inverted comma</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/374842#M89802</link>
      <description>&lt;P&gt;Thank you so much&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;and&amp;nbsp;@Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2017 08:49:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-Value-with-inverted-comma/m-p/374842#M89802</guid>
      <dc:creator>atul_desh</dc:creator>
      <dc:date>2017-07-11T08:49:02Z</dc:date>
    </item>
  </channel>
</rss>

