<?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: Import File, Amend it, Export File in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Import-File-Amend-it-Export-File/m-p/4908#M1965</link>
    <description>since you need to use SAS, I assume there is more to this than stated. It appears possible to do what you need in any editor ~ notepad upward.&lt;BR /&gt;
Perhaps you can explain. &lt;BR /&gt;
Since the enquiry seems unrelated to this (and the other SAS) forums, you may find the most effective answer will come from addressing the fuller form of your question to your SAS Customer Support service.&lt;BR /&gt;
&lt;BR /&gt;
PeterC</description>
    <pubDate>Wed, 03 Oct 2007 14:11:27 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2007-10-03T14:11:27Z</dc:date>
    <item>
      <title>Import File, Amend it, Export File</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Import-File-Amend-it-Export-File/m-p/4907#M1964</link>
      <description>Hi All,&lt;BR /&gt;
&lt;BR /&gt;
I need to "import" a text file into Sas, replace some text (using placeholders.. e.g. [&amp;amp;firstname], [&amp;amp;lastname] ) then save the amended file back to disk under a new name. &lt;BR /&gt;
&lt;BR /&gt;
Firstly is this possible, secondly how?!!&lt;BR /&gt;
&lt;BR /&gt;
Any help is greatly appreciated!

Message was edited by: Paat</description>
      <pubDate>Wed, 03 Oct 2007 06:43:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Import-File-Amend-it-Export-File/m-p/4907#M1964</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-10-03T06:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Import File, Amend it, Export File</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Import-File-Amend-it-Export-File/m-p/4908#M1965</link>
      <description>since you need to use SAS, I assume there is more to this than stated. It appears possible to do what you need in any editor ~ notepad upward.&lt;BR /&gt;
Perhaps you can explain. &lt;BR /&gt;
Since the enquiry seems unrelated to this (and the other SAS) forums, you may find the most effective answer will come from addressing the fuller form of your question to your SAS Customer Support service.&lt;BR /&gt;
&lt;BR /&gt;
PeterC</description>
      <pubDate>Wed, 03 Oct 2007 14:11:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Import-File-Amend-it-Export-File/m-p/4908#M1965</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2007-10-03T14:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Import File, Amend it, Export File</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Import-File-Amend-it-Export-File/m-p/4909#M1966</link>
      <description>Hi:&lt;BR /&gt;
  This is not an ODS or Base Reporting proc question. You'll need the DATA step, INFILE and FILE statements, conditional logic, the INPUT statement, the PUT statement, and possibly the Macro facility (if you mean to use Macro variables) for your placeholder substitution.&lt;BR /&gt;
&lt;BR /&gt;
Your best best for help with this question is to contact Tech Support. To find out how to contact Tech Support, refer to:&lt;BR /&gt;
&lt;A href="http://support.sas.com/techsup/contact/index.html" target="_blank"&gt;http://support.sas.com/techsup/contact/index.html&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 03 Oct 2007 14:13:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Import-File-Amend-it-Export-File/m-p/4909#M1966</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-10-03T14:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Import File, Amend it, Export File</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Import-File-Amend-it-Export-File/m-p/4910#M1967</link>
      <description>THis is how i achieved what i wanted...&lt;BR /&gt;
&lt;BR /&gt;
/* LOAD IN HTML TEMPLATE */&lt;BR /&gt;
data WORK.abcde;&lt;BR /&gt;
  infile 'C:\Folder\File.htm'&lt;BR /&gt;
   LINESIZE=32000 TRUNCOVER;&lt;BR /&gt;
  input line $char32000.;  &lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
/* REPLACE TEXT */&lt;BR /&gt;
data WORK.abcdef;&lt;BR /&gt;
  set WORK.abcde;&lt;BR /&gt;
  length linefix $ 32000;&lt;BR /&gt;
  rx=rxparse("'[_Fullname_]' to '&amp;amp;Fullname'"); &lt;BR /&gt;
  call rxchange(rx,1,line,linefix);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
/* EXPORT */&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  file "C:\Folder\Output.htm";&lt;BR /&gt;
  set Work.abcdef;&lt;BR /&gt;
  put linefix;&lt;BR /&gt;
run;</description>
      <pubDate>Fri, 05 Oct 2007 03:26:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Import-File-Amend-it-Export-File/m-p/4910#M1967</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-10-05T03:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Import File, Amend it, Export File</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Import-File-Amend-it-Export-File/m-p/4911#M1968</link>
      <description>You can downsize your program using the automatic _INFILE_ variable that contains the line that is being read from the external file once the INPUT statement is executed.&lt;BR /&gt;
So everything can be done into a single Data step, without writing into a SAS dataset :&lt;BR /&gt;
&lt;BR /&gt;
data _NULL_ ;&lt;BR /&gt;
* LOAD IN HTML TEMPLATE */&lt;BR /&gt;
infile 'C:\Folder\File.htm' LINESIZE=32000 TRUNCOVER ;&lt;BR /&gt;
input ; &lt;BR /&gt;
/* REPLACE TEXT */&lt;BR /&gt;
rx=rxparse("'[_Fullname_]' to '&amp;amp;Fullname'") ; &lt;BR /&gt;
call rxchange(rx,1,_infile_,_infile_) ;&lt;BR /&gt;
/* EXPORT */&lt;BR /&gt;
file "C:\Folder\Output.htm" ;&lt;BR /&gt;
put _infile_  ;&lt;BR /&gt;
run ; &lt;BR /&gt;
&lt;BR /&gt;
As well as being prettier and shorter to write, this will same you time if your input file is long.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Olivier</description>
      <pubDate>Fri, 05 Oct 2007 09:25:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Import-File-Amend-it-Export-File/m-p/4911#M1968</guid>
      <dc:creator>Olivier</dc:creator>
      <dc:date>2007-10-05T09:25:54Z</dc:date>
    </item>
  </channel>
</rss>

