<?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: How to dequote a value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783870#M250056</link>
    <description>&lt;P&gt;So it is an external file. Please post your code that reads it.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Dec 2021 10:13:33 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-12-03T10:13:33Z</dc:date>
    <item>
      <title>How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783843#M250037</link>
      <description>Hi all,&lt;BR /&gt;I've a temp dataset whose structure is like below&lt;BR /&gt;sno name.&lt;BR /&gt;1 "Xyz":"123"&lt;BR /&gt;2 "gef":"abc23"&lt;BR /&gt;3 "rod":"124899"&lt;BR /&gt;4. "Xyz":"567"&lt;BR /&gt;5. "gef":"ijk67"&lt;BR /&gt;6. "rod":"800775"&lt;BR /&gt;Likewise it has multiple records&lt;BR /&gt;which are repeated what I would like to do is dequote each name variable value and put it as a separate variable, value to create a dataset which is like this&lt;BR /&gt;Sno Xyz gef rod&lt;BR /&gt;1 123 abc23 124899&lt;BR /&gt;2 567 ijk67 800775&lt;BR /&gt;Does anyone help me out on how to do this. Any help would be greatly appreciated.&lt;BR /&gt;</description>
      <pubDate>Fri, 03 Dec 2021 07:10:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783843#M250037</guid>
      <dc:creator>Pandu2</dc:creator>
      <dc:date>2021-12-03T07:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783845#M250039</link>
      <description>&lt;P&gt;So, you don't care about the&amp;nbsp;&lt;SPAN&gt;"Xyz",&amp;nbsp;"gef" and so on?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 07:27:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783845#M250039</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-12-03T07:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783848#M250041</link>
      <description>I do care about them as they must act as a columns in a dataset</description>
      <pubDate>Fri, 03 Dec 2021 07:48:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783848#M250041</guid>
      <dc:creator>Pandu2</dc:creator>
      <dc:date>2021-12-03T07:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783850#M250042</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data HAVE;
 input A B :$20.;
 COL=scan(B,1,'":');
 VAL=scan(B,2,'":');
 if COL='Xyz' then ROW+1;
cards;
1 "Xyz":"123"
2 "gef":"abc23"
3 "rod":"124899"
4. "Xyz":"567"
5. "gef":"ijk67"
6. "rod":"800775"
;
proc transpose data=HAVE out=WANT; 
  var VAL; 
  id COL;
  by ROW;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Print: Data Set WORK.WANT" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="r header" scope="col"&gt;ROW&lt;/TH&gt;
&lt;TH class="l header" scope="col"&gt;_NAME_&lt;/TH&gt;
&lt;TH class="l header" scope="col"&gt;Xyz&lt;/TH&gt;
&lt;TH class="l header" scope="col"&gt;gef&lt;/TH&gt;
&lt;TH class="l header" scope="col"&gt;rod&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="l data"&gt;VAL&lt;/TD&gt;
&lt;TD class="l data"&gt;123&lt;/TD&gt;
&lt;TD class="l data"&gt;abc23&lt;/TD&gt;
&lt;TD class="l data"&gt;124899&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;TD class="l data"&gt;VAL&lt;/TD&gt;
&lt;TD class="l data"&gt;567&lt;/TD&gt;
&lt;TD class="l data"&gt;ijk67&lt;/TD&gt;
&lt;TD class="l data"&gt;800775&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 08:04:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783850#M250042</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-12-03T08:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783852#M250043</link>
      <description>Exactly but quite few changes are required in your code and output dataset please remove the name variable and also xyz,gef, rod column values must be taken from a dataset instead of entering manually cuz they're multiple records which are repeated</description>
      <pubDate>Fri, 03 Dec 2021 08:08:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783852#M250043</guid>
      <dc:creator>Pandu2</dc:creator>
      <dc:date>2021-12-03T08:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783854#M250045</link>
      <description>&lt;P&gt;Suggestion: Copy a few lines, if the example you show is good, 12 or 15 should do as text from your and on the forum open a text box using the &amp;lt;/&amp;gt; icon above the message window and paste the example text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The message windows on this forum &lt;STRONG&gt;will&lt;/STRONG&gt; reformat pasted text and may acquire non-printable characters making the example that you posted very likely not exactly as the source file actually is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any description you may have, such as the types of values, numeric or character, and the maximum lengths would be a good idea if available. Note: "123" might need to be numeric for you or character, we can't tell.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, were the 1 through 6 &lt;STRONG&gt;your example&lt;/STRONG&gt; line numbers or do they appear in the data file, same with your "want" example.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 08:13:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783854#M250045</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-12-03T08:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783857#M250047</link>
      <description>Those values must be character like 123,abc23 etc. And also 1through 6 are serial numbers</description>
      <pubDate>Fri, 03 Dec 2021 08:17:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783857#M250047</guid>
      <dc:creator>Pandu2</dc:creator>
      <dc:date>2021-12-03T08:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783864#M250051</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/405593"&gt;@Pandu2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Those values must be character like 123,abc23 etc. And also 1through 6 are serial numbers&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So, if the 1 through 6 are in your data where to did the 3, 4, 5 and 6 go?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Character variables have length. If you don't tell what the longest expected length is for any value then you may not have the entire value represented.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Variables you don't want can always be DROPped from the data set.&lt;/P&gt;
&lt;P&gt;The example solution posted by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt; uses inline data because &lt;STRONG&gt;we do not have a file. &lt;/STRONG&gt;Use an INFILE statement to point to your data file instead of using the datalines. Basic SAS programming.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 09:28:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783864#M250051</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-12-03T09:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783865#M250052</link>
      <description>I tried using infile statement but in the end the dataset seemed blank nd also the length of the character supposed to 50</description>
      <pubDate>Fri, 03 Dec 2021 09:34:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783865#M250052</guid>
      <dc:creator>Pandu2</dc:creator>
      <dc:date>2021-12-03T09:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783866#M250053</link>
      <description>&lt;P&gt;Basics first.&lt;/P&gt;
&lt;P&gt;Is this a SAS dataset you get from somewhere without having control over it, or do you get an external (to SAS) file that you import into SAS yourself?&lt;/P&gt;
&lt;P&gt;If the first, are the quotes actually part of the data, and not caused by some kind of format?&lt;/P&gt;
&lt;P&gt;If the latter, we need to see an example of the source; if it is some kind of text, open the file with a &lt;U&gt;text editor&lt;/U&gt; and copy/paste it into a code box opened with this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" style="width: 715px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54552i914D97BE1B0F21E5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 09:40:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783866#M250053</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-12-03T09:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783869#M250055</link>
      <description>I've got that file which I've no control over it as it is from servers.</description>
      <pubDate>Fri, 03 Dec 2021 10:10:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783869#M250055</guid>
      <dc:creator>Pandu2</dc:creator>
      <dc:date>2021-12-03T10:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783870#M250056</link>
      <description>&lt;P&gt;So it is an external file. Please post your code that reads it.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 10:13:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783870#M250056</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-12-03T10:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783871#M250057</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/405593"&gt;@Pandu2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I tried using infile statement but in the end the dataset seemed blank nd also the length of the character supposed to 50&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the "&amp;lt;/&amp;gt;" to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the "&amp;lt;/&amp;gt;" icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Include all the code to read the file submitted along with all messages&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 10:16:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783871#M250057</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-12-03T10:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783872#M250058</link>
      <description>Sure,&lt;BR /&gt;Data work.want&lt;BR /&gt;Infile srct dad lrecl=30000000 dlm ='[{}}';&lt;BR /&gt;Input js : $2000.@@;&lt;BR /&gt;do i =1 to countw(js, ' , ');&lt;BR /&gt;name =scan(js,i, ' , ');&lt;BR /&gt;Output;&lt;BR /&gt;end;&lt;BR /&gt;drop js i ;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;So, it creates a temp dataset and has multiple observations but I kept few only. Please have a look at the data which I posted above.</description>
      <pubDate>Fri, 03 Dec 2021 10:22:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783872#M250058</guid>
      <dc:creator>Pandu2</dc:creator>
      <dc:date>2021-12-03T10:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783873#M250059</link>
      <description>Wrong type it's dsd.</description>
      <pubDate>Fri, 03 Dec 2021 10:23:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783873#M250059</guid>
      <dc:creator>Pandu2</dc:creator>
      <dc:date>2021-12-03T10:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783874#M250060</link>
      <description>&lt;P&gt;What you posted earlier is what you&amp;nbsp;&lt;EM&gt;think is in the dataset&lt;/EM&gt;, not what&amp;nbsp;&lt;EM&gt;is in the file&lt;/EM&gt;. Open the file with a text editor and copy a few lines into a code box. I will not repeat this a third time.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 10:32:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783874#M250060</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-12-03T10:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783875#M250061</link>
      <description>&lt;P&gt;BTW your data as posted has three columns, while this code will create only one.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 10:35:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783875#M250061</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-12-03T10:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783876#M250062</link>
      <description>Didn't I say it's not in my control. It was on the server side I've got no access for that</description>
      <pubDate>Fri, 03 Dec 2021 10:35:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783876#M250062</guid>
      <dc:creator>Pandu2</dc:creator>
      <dc:date>2021-12-03T10:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783877#M250063</link>
      <description>I posted the data which has one column and I need the final dataset which should have 3 columns</description>
      <pubDate>Fri, 03 Dec 2021 10:36:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783877#M250063</guid>
      <dc:creator>Pandu2</dc:creator>
      <dc:date>2021-12-03T10:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to dequote a value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783878#M250064</link>
      <description>&lt;P&gt;If you don't have access to it, you can't read it. If you can read it from SAS, you can download it to your desktop, either with SAS Studio or the Copy Files task in Enterprise Guide.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 10:38:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-dequote-a-value/m-p/783878#M250064</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-12-03T10:38:32Z</dc:date>
    </item>
  </channel>
</rss>

