<?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 Read a file in SAS and save in ms sql server as XML in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Read-a-file-in-SAS-and-save-in-ms-sql-server-as-XML/m-p/461257#M117309</link>
    <description>&lt;P&gt;Dear Folk,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a requirement to read a text file(.sas code file) and save in to MS SQL server DB table(complete file in xml object column)by converting to xml format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As of now I can create XML file on disk by SAS program and I can connect to MS SQL serve for DB transactions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But here challenges in step wise way(all in SAS code) are ,&lt;/P&gt;&lt;P&gt;1) Read text file via SAS - Done&lt;/P&gt;&lt;P&gt;2) Convert aboveto xml object (not file) - How to do ?&lt;/P&gt;&lt;P&gt;3) Save this object to MS SQL DB - How to do ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Requesting to please have the suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tushar Jain&lt;/P&gt;</description>
    <pubDate>Thu, 10 May 2018 06:33:26 GMT</pubDate>
    <dc:creator>Piku</dc:creator>
    <dc:date>2018-05-10T06:33:26Z</dc:date>
    <item>
      <title>Read a file in SAS and save in ms sql server as XML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-file-in-SAS-and-save-in-ms-sql-server-as-XML/m-p/461257#M117309</link>
      <description>&lt;P&gt;Dear Folk,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a requirement to read a text file(.sas code file) and save in to MS SQL server DB table(complete file in xml object column)by converting to xml format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As of now I can create XML file on disk by SAS program and I can connect to MS SQL serve for DB transactions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But here challenges in step wise way(all in SAS code) are ,&lt;/P&gt;&lt;P&gt;1) Read text file via SAS - Done&lt;/P&gt;&lt;P&gt;2) Convert aboveto xml object (not file) - How to do ?&lt;/P&gt;&lt;P&gt;3) Save this object to MS SQL DB - How to do ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Requesting to please have the suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tushar Jain&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 06:33:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-file-in-SAS-and-save-in-ms-sql-server-as-XML/m-p/461257#M117309</guid>
      <dc:creator>Piku</dc:creator>
      <dc:date>2018-05-10T06:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Read a file in SAS and save in ms sql server as XML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-file-in-SAS-and-save-in-ms-sql-server-as-XML/m-p/461264#M117312</link>
      <description>Just out of curiosity, what is the benefit of storing your SAS programs in XML objects?&lt;BR /&gt;Also, SAS programs is in clear text, so I can't see any benefit from having SAS to create the XML object. Go directly to SQL Server tools for this.</description>
      <pubDate>Thu, 10 May 2018 07:29:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-file-in-SAS-and-save-in-ms-sql-server-as-XML/m-p/461264#M117312</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-05-10T07:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Read a file in SAS and save in ms sql server as XML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-file-in-SAS-and-save-in-ms-sql-server-as-XML/m-p/461265#M117313</link>
      <description>XML object is required to save in Database table for reporting and archival purpose.</description>
      <pubDate>Thu, 10 May 2018 07:31:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-file-in-SAS-and-save-in-ms-sql-server-as-XML/m-p/461265#M117313</guid>
      <dc:creator>Piku</dc:creator>
      <dc:date>2018-05-10T07:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: Read a file in SAS and save in ms sql server as XML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-file-in-SAS-and-save-in-ms-sql-server-as-XML/m-p/461272#M117317</link>
      <description>&lt;P&gt;Define "XML object". For me a XML object (see DOM) is either a data island, a tree or a node.&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 09:45:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-file-in-SAS-and-save-in-ms-sql-server-as-XML/m-p/461272#M117317</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-05-10T09:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Read a file in SAS and save in ms sql server as XML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-file-in-SAS-and-save-in-ms-sql-server-as-XML/m-p/461280#M117323</link>
      <description>&lt;P&gt;I am assuming SAS will have xml object&amp;nbsp; like DB or C#.&lt;/P&gt;&lt;P&gt;If not, then by using SAS code how can we insert the complete file (by reading from disk) in to MS sql database(pass-through or lib name) ?&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 10:24:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-file-in-SAS-and-save-in-ms-sql-server-as-XML/m-p/461280#M117323</guid>
      <dc:creator>Piku</dc:creator>
      <dc:date>2018-05-10T10:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: Read a file in SAS and save in ms sql server as XML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-file-in-SAS-and-save-in-ms-sql-server-as-XML/m-p/461288#M117324</link>
      <description>&lt;P&gt;SAS has two data types: character and numeric. Since XML is text, you can store it in a character variable, provided that the XML in question does not exceed 32767 characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 11:07:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-file-in-SAS-and-save-in-ms-sql-server-as-XML/m-p/461288#M117324</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-05-10T11:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Read a file in SAS and save in ms sql server as XML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-file-in-SAS-and-save-in-ms-sql-server-as-XML/m-p/461298#M117332</link>
      <description>&lt;P&gt;You are going to have a problem moving a complete SAS program file (which could be thousands of lines long) into a single XML "object" in the server.&amp;nbsp; SAS has a 32K limit on the size of character variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So either move the original file line by line into an SQL server table and have the database transform it into an XML object.&lt;/P&gt;
&lt;P&gt;Or move the XML file line by line into the SQL server and have the server combine the lines into a single blob/clob or whatever they use to store XML.&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 12:19:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-file-in-SAS-and-save-in-ms-sql-server-as-XML/m-p/461298#M117332</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-05-10T12:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Read a file in SAS and save in ms sql server as XML</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-file-in-SAS-and-save-in-ms-sql-server-as-XML/m-p/461308#M117335</link>
      <description>Hell Tom,&lt;BR /&gt;&lt;BR /&gt;If there is no way to move complete xml in one go then line by line is only option left(but i have not chose it because of it's inefficient).&lt;BR /&gt;I here want to convert complete file in to some xml object, just like xml output file and then move then object to db column in single update uery.&lt;BR /&gt;&lt;BR /&gt;Or if you can think any other solution then it will be appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks,</description>
      <pubDate>Thu, 10 May 2018 13:11:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-file-in-SAS-and-save-in-ms-sql-server-as-XML/m-p/461308#M117335</guid>
      <dc:creator>Piku</dc:creator>
      <dc:date>2018-05-10T13:11:28Z</dc:date>
    </item>
  </channel>
</rss>

