<?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: reading quotation marks from a text files in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309272#M1465</link>
    <description>&lt;P&gt;Based on&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom﻿&lt;/a&gt;&amp;nbsp;suggestion, attached is a tested code to read and create desired output:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;length row_names 3 pclass $3 survived 3 name $82 _age $3 age 3&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;embarked $3 home_dest $70 room $5 ticket $20 boat $3 sex $10; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; infile cards truncover;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;length a_row $250 word $90 var1-var11 $90;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;a_row = ' ';&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;input a_row $250.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; array varx $ var1 - var11;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;do i=1 to countw(a_row,',','qm');&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;word = scan(a_row,i,',','qm');&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if word =: '"' then word=substrn(word,2,length(word)-2);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;varx(i) = word; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;end ;&lt;BR /&gt;&lt;BR /&gt; /* 1*/ row_names = input(left(varx(1)),best3.);&lt;BR /&gt; /* 2*/ pclass = left(varx(2));&lt;BR /&gt; /* 3*/ survived = input(left(varx(3)),best3.);&lt;BR /&gt; /* 4*/ name = left(varx(4));&lt;BR /&gt; /* 5*/ _age = left(varx(5));&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if _age = 'NA' then age = . ;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else age = input(_age , 3.);&lt;BR /&gt; &lt;BR /&gt; /* 6*/ embarked = left(varx(6));&lt;BR /&gt; /* 7*/ home_dest = left(varx(7));&lt;BR /&gt; /* 8*/ room = left(varx(8));&lt;BR /&gt; /* 9*/ ticket = left(varx(9));&lt;BR /&gt; /*10*/ boat = left(varx(10));&lt;BR /&gt; /*11*/ sex = left(varx(11));&lt;BR /&gt; &lt;BR /&gt; drop _age a_row word var1-var11;&lt;/P&gt;
&lt;P&gt;/*-------------*/&lt;BR /&gt;cards;&lt;BR /&gt;"37","1st",1,"Brown, Mrs James Joseph (Margaret "Molly" Tobin)",44.0000,"Cherbourg","Denver, CO","","17610 L27 15s 5d","6","female"&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Nov 2016 14:02:31 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2016-11-04T14:02:31Z</dc:date>
    <item>
      <title>reading quotation marks from a text files</title>
      <link>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309092#M1444</link>
      <description>&lt;P&gt;hi, &amp;nbsp;below are my codes of importing a text files. One of the value from the name variabes consists of " " quotation mark which i need to output it. But i cant seems to get that output using the ~ function. As the example below, &amp;nbsp;my name variables must read the quotation mark --&amp;gt;&amp;nbsp;&lt;SPAN&gt;Brown, Mrs James Joseph (Margaret "Molly" Tobin) .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;example this row :&lt;/P&gt;&lt;P&gt;"37","1st",1,"Brown, Mrs James Joseph (Margaret "Molly" Tobin)",44.0000,"Cherbourg","Denver, CO","","17610 L27 15s 5d","6","female"&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;length row_names 3 pclass $3 survived 3 name $82 _age $3 age 3&lt;BR /&gt;embarked $3 home_dest $70 room $5 ticket $20 boat $3 sex $10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;infile '/home/yewkeong0/assignemnt/titanic.txt' dsd dlm=',' missover;&lt;BR /&gt;input row_names pclass $ survived name ~ $82. _age&lt;BR /&gt;embarked $ home_dest $ room $ ticket $ boat $ sex $;&lt;BR /&gt;if _age = 'NA' then age = . ;&lt;BR /&gt;else age = input(_age , 3.);&lt;BR /&gt;drop _age;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any suggestion guys??? =/&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 16:55:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309092#M1444</guid>
      <dc:creator>yewkeong</dc:creator>
      <dc:date>2016-11-03T16:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: reading quotation marks from a text files</title>
      <link>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309096#M1446</link>
      <description>&lt;P&gt;If you don't have many of these issues it may be better to just change the "Molly" to 'Molly' to read the file.&amp;nbsp; Then if you really really need double quotes you could replace the ' with ".&lt;/P&gt;
&lt;P&gt;Another option would be if the input file was exported from another program to see if there would be if the data could be exported witha&amp;nbsp; different delimiter such as | or even connect using ODBC.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or use _infile_ and spend hours if not days writing code to parse a file line by line to implement rules that resolve to fields are separated by comma unless the comma occurs between two " but if there is more words without a comma but have more" keep reading.&lt;/P&gt;
&lt;P&gt;I wouldn't spend the time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have a lot of files doing this then you need to go to the source and find out why and fix it there. Perhaps have them actually use left and right quotes instead of ".&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 17:44:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309096#M1446</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-11-03T17:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: reading quotation marks from a text files</title>
      <link>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309114#M1447</link>
      <description>&lt;P&gt;your row example is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"37","1st",1,"&lt;STRONG&gt;Brown, Mrs&lt;/STRONG&gt; James Joseph (Margaret "Molly" Tobin)",44.0000,"Cherbourg","Denver, CO","","17610 L27 15s 5d","6","female"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;your problem is because there is a comma in the name field which splits it into two variables.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;using DLM=',' is not good enough for your data and input method.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 18:51:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309114#M1447</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-11-03T18:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: reading quotation marks from a text files</title>
      <link>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309118#M1448</link>
      <description>did you try import your data by PROC IMPORT or directly from the excel file ?</description>
      <pubDate>Thu, 03 Nov 2016 18:53:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309118#M1448</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-11-03T18:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: reading quotation marks from a text files</title>
      <link>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309142#M1450</link>
      <description>&lt;P&gt;The issue is the embedded double quote characters. Like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;"Margaret "Molly" Tobin"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;If you want to include the quoting characters into a quoted string they need to be doubled so SAS can tell that they do not mark the end of the string.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;"Margaret ""Molly"" Tobin"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you get the generator of the file to fix that bug? &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might be able to fix the issue. Probably it would take a human to figure out what was intended for some of the more messy strings. But if you are limited to just this type of issue and only for one particular field you might &amp;nbsp;be able to make a program to fix it. &amp;nbsp;For example you could use the COUNTW() function to see how many fields SAS sees in the line and if it is more than expected then you know there is a quoting issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 20:07:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309142#M1450</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-11-03T20:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: reading quotation marks from a text files</title>
      <link>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309173#M1452</link>
      <description>&lt;PRE&gt;
Did you check this ?


https://communities.sas.com/t5/SAS-Studio/How-to-read-nested-double-quotation-in-txt-files/td-p/308211

&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Nov 2016 03:24:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309173#M1452</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-11-04T03:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: reading quotation marks from a text files</title>
      <link>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309185#M1455</link>
      <description>hi. u said using dlm= ',' is not good enough for my data input method? then what is the best for this??? and no i didnt try the proc import method, i straight import directly from text files</description>
      <pubDate>Fri, 04 Nov 2016 06:00:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309185#M1455</guid>
      <dc:creator>yewkeong</dc:creator>
      <dc:date>2016-11-04T06:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: reading quotation marks from a text files</title>
      <link>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309187#M1456</link>
      <description>yes i did. is the same data sets surprisingly, but i think is not the output i want. My output is :&lt;BR /&gt;&lt;BR /&gt;"37","1st",1,"Brown, Mrs James Joseph (Margaret "Molly" Tobin)",44.0000,"Cherbourg","Denver, CO","","17610 L27 15s 5d","6","female"&lt;BR /&gt;&lt;BR /&gt;rowname = 37&lt;BR /&gt;pclass = 1st&lt;BR /&gt;survived = 1&lt;BR /&gt;name = Brown, Mrs James Joseph (Margaret "Molly" Tobin)&lt;BR /&gt;age = 44&lt;BR /&gt;embarked = Cherbourg&lt;BR /&gt;homedest = Denver, CO&lt;BR /&gt;room = .&lt;BR /&gt;ticket = 17610 L27 15s 5d&lt;BR /&gt;boat = 6&lt;BR /&gt;sex = female&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Nov 2016 06:11:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309187#M1456</guid>
      <dc:creator>yewkeong</dc:creator>
      <dc:date>2016-11-04T06:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: reading quotation marks from a text files</title>
      <link>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309188#M1457</link>
      <description>hi. I will show u the example of the output.&lt;BR /&gt;&lt;BR /&gt;"37","1st",1,"Brown, Mrs James Joseph (Margaret "Molly" Tobin)",44.0000,"Cherbourg","Denver, CO","","17610 L27 15s 5d","6","female"&lt;BR /&gt;&lt;BR /&gt;rowname = 37&lt;BR /&gt;pclass = 1st&lt;BR /&gt;survived = 1&lt;BR /&gt;name = Brown, Mrs James Joseph (Margaret "Molly" Tobin)&lt;BR /&gt;age = 44&lt;BR /&gt;embarked = Cherbourg&lt;BR /&gt;homedest = Denver, CO&lt;BR /&gt;room = .&lt;BR /&gt;ticket = 17610 L27 15s 5d&lt;BR /&gt;boat = 6&lt;BR /&gt;sex = female&lt;BR /&gt;&lt;BR /&gt;And yes this is the only field that consist of quotation mark in the name variables.</description>
      <pubDate>Fri, 04 Nov 2016 06:13:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309188#M1457</guid>
      <dc:creator>yewkeong</dc:creator>
      <dc:date>2016-11-04T06:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: reading quotation marks from a text files</title>
      <link>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309189#M1458</link>
      <description>hi. i also dont mind but i asked my lecture, she said cannot touch the data sets. so we need to output excaly the same as the text files given. my output example is this :&lt;BR /&gt;&lt;BR /&gt;"37","1st",1,"Brown, Mrs James Joseph (Margaret "Molly" Tobin)",44.0000,"Cherbourg","Denver, CO","","17610 L27 15s 5d","6","female"&lt;BR /&gt;&lt;BR /&gt;rowname = 37&lt;BR /&gt;pclass = 1st&lt;BR /&gt;survived = 1&lt;BR /&gt;name = Brown, Mrs James Joseph (Margaret "Molly" Tobin)&lt;BR /&gt;age = 44&lt;BR /&gt;embarked = Cherbourg&lt;BR /&gt;homedest = Denver, CO&lt;BR /&gt;room = .&lt;BR /&gt;ticket = 17610 L27 15s 5d&lt;BR /&gt;boat = 6&lt;BR /&gt;sex = female&lt;BR /&gt;&lt;BR /&gt;wow. i would'nt spend so much time also but btw thanks for the suggestion.</description>
      <pubDate>Fri, 04 Nov 2016 06:15:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309189#M1458</guid>
      <dc:creator>yewkeong</dc:creator>
      <dc:date>2016-11-04T06:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: reading quotation marks from a text files</title>
      <link>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309203#M1460</link>
      <description>&lt;P&gt;OK. Appearntly Someone made such a file purposely .&lt;/P&gt;
&lt;P&gt;Try this one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename x '/folders/myfolders/titanic.txt';
filename y temp;
data _null_;
 infile x lrecl=2000 length=len;
 file y lrecl=2000;
 input x $varying2000. len;
 p='s/,(?=")|(?&amp;lt;="),'||"/|/";
 x=prxchange(p,-1,strip(x));
 put x;
run;


proc import datafile=y dbms=csv out=have replace;
delimiter='|';
guessingrows=max;
run;
data have;
 set have;
 array x{*} $ _character_;
 do i=1 to dim(x);
  x{i}=prxchange('s/^"|"$//',-1,strip(x{i}));
 end;
drop i;
run;
proc print noobs;run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 08:28:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309203#M1460</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-11-04T08:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: reading quotation marks from a text files</title>
      <link>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309249#M1464</link>
      <description>&lt;P&gt;The SCAN() and COUNTW() function can handle those incorrectly quoted fields. &amp;nbsp;So use them to generate a new version of the file that properly doubles up the embedded quotes. &amp;nbsp;This code will do that. It will also get rid of the many unneeded quotes that are in the original. &amp;nbsp;You can then read the converted file using data step or even PROC IMPORT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_ ;
  infile 'badfile.csv' ;
  file 'goodfile.csv' dsd ;
  length word $200 ;
  input ;
  do i=1 to countw(_infile_,',','qm');
    word = scan(_infile_,i,',','qm');
    if word =: '"' then word=substrn(word,2,length(word)-2);
    put word @;
  end;
  put;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 13:23:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309249#M1464</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-11-04T13:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: reading quotation marks from a text files</title>
      <link>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309272#M1465</link>
      <description>&lt;P&gt;Based on&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom﻿&lt;/a&gt;&amp;nbsp;suggestion, attached is a tested code to read and create desired output:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;length row_names 3 pclass $3 survived 3 name $82 _age $3 age 3&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;embarked $3 home_dest $70 room $5 ticket $20 boat $3 sex $10; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; infile cards truncover;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;length a_row $250 word $90 var1-var11 $90;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;a_row = ' ';&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;input a_row $250.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; array varx $ var1 - var11;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;do i=1 to countw(a_row,',','qm');&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;word = scan(a_row,i,',','qm');&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if word =: '"' then word=substrn(word,2,length(word)-2);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;varx(i) = word; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;end ;&lt;BR /&gt;&lt;BR /&gt; /* 1*/ row_names = input(left(varx(1)),best3.);&lt;BR /&gt; /* 2*/ pclass = left(varx(2));&lt;BR /&gt; /* 3*/ survived = input(left(varx(3)),best3.);&lt;BR /&gt; /* 4*/ name = left(varx(4));&lt;BR /&gt; /* 5*/ _age = left(varx(5));&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if _age = 'NA' then age = . ;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else age = input(_age , 3.);&lt;BR /&gt; &lt;BR /&gt; /* 6*/ embarked = left(varx(6));&lt;BR /&gt; /* 7*/ home_dest = left(varx(7));&lt;BR /&gt; /* 8*/ room = left(varx(8));&lt;BR /&gt; /* 9*/ ticket = left(varx(9));&lt;BR /&gt; /*10*/ boat = left(varx(10));&lt;BR /&gt; /*11*/ sex = left(varx(11));&lt;BR /&gt; &lt;BR /&gt; drop _age a_row word var1-var11;&lt;/P&gt;
&lt;P&gt;/*-------------*/&lt;BR /&gt;cards;&lt;BR /&gt;"37","1st",1,"Brown, Mrs James Joseph (Margaret "Molly" Tobin)",44.0000,"Cherbourg","Denver, CO","","17610 L27 15s 5d","6","female"&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 14:02:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/reading-quotation-marks-from-a-text-files/m-p/309272#M1465</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-11-04T14:02:31Z</dc:date>
    </item>
  </channel>
</rss>

