<?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: new to SAS in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/new-to-SAS/m-p/69223#M19862</link>
    <description>The special variable _INFILE_ only contains the information from the input buffer.  Although the information from the input buffer is written to the Program Data Vector, PDV,  _INFILE_ does not receive any information from  the program data vector.  Modified variable values are contained in the PDV not in _INFILE_ as is shown here:&lt;BR /&gt;
[pre}data a;&lt;BR /&gt;
input x  z$;&lt;BR /&gt;
put _infile_;&lt;BR /&gt;
put x=;&lt;BR /&gt;
x = x+1;&lt;BR /&gt;
put _infile_;&lt;BR /&gt;
put x=;&lt;BR /&gt;
datalines;&lt;BR /&gt;
1  a&lt;BR /&gt;
5  b&lt;BR /&gt;
run;[/pre]&lt;BR /&gt;
&lt;BR /&gt;
You need to write the values directly from the PDV not the input buffer.</description>
    <pubDate>Thu, 02 Sep 2010 19:04:19 GMT</pubDate>
    <dc:creator>ArtC</dc:creator>
    <dc:date>2010-09-02T19:04:19Z</dc:date>
    <item>
      <title>new to SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/new-to-SAS/m-p/69222#M19861</link>
      <description>I am new to SAS. &lt;BR /&gt;
&lt;BR /&gt;
What I want to do is to read in an xls file, then either update the existing xls file or create a new xls file. But it seems only created a new xls file, didn't update the records.&lt;BR /&gt;
&lt;BR /&gt;
Here is my code:&lt;BR /&gt;
&lt;BR /&gt;
filename input "replace.xls";&lt;BR /&gt;
filename output "replaceout.xls";&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data testdata;&lt;BR /&gt;
infile input recfm=f ignoreDOSeof;&lt;BR /&gt;
input ;&lt;BR /&gt;
RegularExperssionId=prxparse('s/M[. ]/MA/');&lt;BR /&gt;
call prxchange(RegularExperssionId, -1, input);&lt;BR /&gt;
file output recfm=f;&lt;BR /&gt;
put _infile_;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Thanks for all your help. And do let me know if I post the message in the wrong group.</description>
      <pubDate>Thu, 02 Sep 2010 10:10:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/new-to-SAS/m-p/69222#M19861</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-09-02T10:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: new to SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/new-to-SAS/m-p/69223#M19862</link>
      <description>The special variable _INFILE_ only contains the information from the input buffer.  Although the information from the input buffer is written to the Program Data Vector, PDV,  _INFILE_ does not receive any information from  the program data vector.  Modified variable values are contained in the PDV not in _INFILE_ as is shown here:&lt;BR /&gt;
[pre}data a;&lt;BR /&gt;
input x  z$;&lt;BR /&gt;
put _infile_;&lt;BR /&gt;
put x=;&lt;BR /&gt;
x = x+1;&lt;BR /&gt;
put _infile_;&lt;BR /&gt;
put x=;&lt;BR /&gt;
datalines;&lt;BR /&gt;
1  a&lt;BR /&gt;
5  b&lt;BR /&gt;
run;[/pre]&lt;BR /&gt;
&lt;BR /&gt;
You need to write the values directly from the PDV not the input buffer.</description>
      <pubDate>Thu, 02 Sep 2010 19:04:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/new-to-SAS/m-p/69223#M19862</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2010-09-02T19:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: new to SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/new-to-SAS/m-p/69224#M19863</link>
      <description>You can use PROCs to read and write to excel files. I have included an example code here for your reference.&lt;BR /&gt;
&lt;BR /&gt;
PROC IMPORT OUT= WORK.excelout&lt;BR /&gt;
            DATAFILE= "D:\Finance\Analysis\Historydata.xls" &lt;BR /&gt;
            DBMS=EXCEL2000 REPLACE;&lt;BR /&gt;
            RANGE="RegDta$"; &lt;BR /&gt;
           GETNAMES=YES;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
The first line tells the dataset to be created.The second lline tells the location of the excel file to be read.The third line tells SAS the type of DBMS, in this case it is excel file.The fourth line tells which work sheet needs to be selected from the excel file. First line of the work sheet will be used as variable names, this is mentioned in the fifth line.&lt;BR /&gt;
&lt;BR /&gt;
Like this you can PROC EXPORT to export your SAS dataset to an excel file.&lt;BR /&gt;
&lt;BR /&gt;
PROC EXPORT DATA= WORK.ESTIMATES &lt;BR /&gt;
                     OUTFILE= "C:\Documents and Settings\carreir\Desktop\SASestimates.xls" &lt;BR /&gt;
            DBMS=EXCEL2000 REPLACE;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks &lt;BR /&gt;
&lt;BR /&gt;
Dhanasekaran R&lt;BR /&gt;
Allianz Cornhill Information Services&lt;BR /&gt;
Trivandrum</description>
      <pubDate>Fri, 03 Sep 2010 05:04:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/new-to-SAS/m-p/69224#M19863</guid>
      <dc:creator>dhana</dc:creator>
      <dc:date>2010-09-03T05:04:38Z</dc:date>
    </item>
  </channel>
</rss>

