<?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 in a  non data file and editing in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-in-a-non-data-file-and-editing/m-p/299789#M63276</link>
    <description>&lt;P&gt;I never got a satisfactory reply so I submitted the question to SAS technical support a week ago and still have not received an answer which is very unusual.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Sep 2016 10:17:14 GMT</pubDate>
    <dc:creator>jacksonan123</dc:creator>
    <dc:date>2016-09-21T10:17:14Z</dc:date>
    <item>
      <title>Reading in a  non data file and editing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-in-a-non-data-file-and-editing/m-p/298759#M62879</link>
      <description>&lt;P&gt;I have the following program which works on the file ref &amp;nbsp;below but does not seem to work on nref &amp;nbsp;attached which is not output as a continuous file but seems to be wrapping around. &amp;nbsp;Can anyone tell me why and how to correct the problem?&lt;/P&gt;&lt;P&gt;data _null_ ;&lt;/P&gt;&lt;P&gt;infile '/folders/myfolders/bootnew/nREF.CTL' truncover;&lt;BR /&gt;/* INPUT CHARACTER FILE*/&lt;BR /&gt;input c $1000.;&lt;BR /&gt;do i=1 to 2;&lt;BR /&gt;myfile='/folders/myfolders/bootnew/nREF' || trim(left(put(i,8.))) || '.ctl';&lt;/P&gt;&lt;P&gt;file dummy filevar=myfile MOD ;&lt;BR /&gt;if _n_=2 then do;&lt;BR /&gt;if i=1 then do;&lt;BR /&gt;amp_loc=index(c,'&amp;amp;');&lt;BR /&gt;first_half=substr(c,1,amp_loc-1);&lt;BR /&gt;last_half=substr(c,amp_loc+2);&lt;BR /&gt;end;&lt;BR /&gt;c= trim(first_half) || trim(left(put(i,8.))) || last_half;&lt;BR /&gt;end;&lt;BR /&gt;put c $;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="5"&gt;FILE REF:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;$PROBLEM TWO PEAK SEQUENTIAL ZERO AND FIRST ORDER&lt;BR /&gt;$DATA ..\TFIT&amp;amp;i.CSV IGNORE=W&lt;BR /&gt;$INPUT ID TIME DV DOSE CMT AMT EVID MDV&lt;BR /&gt;$SUB ADVAN5 TRANS1&lt;BR /&gt;$MODEL&lt;BR /&gt;COMP=(1);DOSE1&lt;BR /&gt;COMP=(2);DOSE2&lt;BR /&gt;COMP=(CENTRAL,DEFOBS);CENTRAL,DEFDOSE)&lt;BR /&gt;&lt;BR /&gt;$PK&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;KAS= THETA(1)&lt;BR /&gt;KAF= THETA(2)&lt;BR /&gt;CL = THETA(3)&lt;BR /&gt;V3 = THETA(4)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;TLAG2= THETA(5)&lt;BR /&gt;LOGITT = THETA(6)&lt;BR /&gt;TVF1 = 1/(1+EXP(-LOGITT))&lt;BR /&gt;F1 = TVF1&lt;BR /&gt;&lt;BR /&gt;S3= V3/1000&lt;BR /&gt;&lt;BR /&gt;F2=1-F1&lt;BR /&gt;K23=KAF ;FIRST ORDER MR TO CENTRAL&lt;BR /&gt;K13=KAS ;FLOW FROM MR TO CENTRAL&lt;BR /&gt;K30=CL/V3 ;ELIMINATION FROM CENTRAL&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ERROR&lt;BR /&gt;&lt;BR /&gt;CP=A(3)/S3&lt;BR /&gt;Y=CP +CP*ERR(1) + ERR(2)&lt;BR /&gt;&lt;BR /&gt;$THETA (0.05,0.5) ;1)K0&lt;BR /&gt;$THETA (0.05,0.8) ;2)KAS&lt;BR /&gt;$THETA (60, 200) ;3)CL L/HR&lt;BR /&gt;$THETA (30,100) ;4)V3 L&lt;BR /&gt;&lt;BR /&gt;$THETA (0.1,2) ;5)LAG2 HR&lt;BR /&gt;$THETA (-10.0 -0.04 1 ) ;6)LOGIT F1&lt;BR /&gt;&lt;BR /&gt;$OMEGA 0.01 0.1&lt;BR /&gt;&lt;BR /&gt;$EST METH=0 MAXEVAL=9999 PRINT=5&lt;BR /&gt;;$COVARIANCE&lt;BR /&gt;;$SIM (123456) ONLYSIM SUBPROBLEMS=1&lt;BR /&gt;$TABLE ID AMT TIME DV CMT Y DOSE KAF KAS CL V3 TLAG2 LOGITT&lt;BR /&gt;ONEHEADER NOPRINT FILE=MOD.FIT&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 18:58:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-in-a-non-data-file-and-editing/m-p/298759#M62879</guid>
      <dc:creator>jacksonan123</dc:creator>
      <dc:date>2016-09-15T18:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Reading in a  non data file and editing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-in-a-non-data-file-and-editing/m-p/298783#M62891</link>
      <description>&lt;P&gt;It can be very hard to diagnosis file layout issues when you use a file format other than the original file. A Word document is going to do lots of things when saved that would not occur in a text file.&lt;/P&gt;
&lt;P&gt;If your source file is not text, i.e. is a .docx, then that is the first problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lines appearing to wrap are often a symptom of using a UNIX or Apple generated file and reading it on a Windows machine as the line (record) termination is different. Or reading a Windows file on Unix. Hard to say with the attached&amp;nbsp;file as it is not text.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 20:09:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-in-a-non-data-file-and-editing/m-p/298783#M62891</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-09-15T20:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Reading in a  non data file and editing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-in-a-non-data-file-and-editing/m-p/298802#M62893</link>
      <description>&lt;P&gt;I am not sure that I follow your answer since the ref file contained in the post &amp;nbsp;has similar code just more of it. &amp;nbsp;In both files only line do is worked on by the do loop with the rest to be just output unchanged.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The *.docx was posted since the orginal format was not accepted by the post.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 21:03:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-in-a-non-data-file-and-editing/m-p/298802#M62893</guid>
      <dc:creator>jacksonan123</dc:creator>
      <dc:date>2016-09-15T21:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reading in a  non data file and editing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-in-a-non-data-file-and-editing/m-p/298814#M62896</link>
      <description>&lt;P&gt;Do you get errors when running the code? Please post the log if so.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the DOC is a CODE file then do you see a difference between:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_ ;

infile '/folders/myfolders/bootnew/nREF.CTL' truncover;
/* INPUT CHARACTER FILE*/
input c $1000.;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;$DATA ..\FPLASMA&amp;amp;i.CSV IGNORE=W
$INPUT ID TIME CMT DV  DROP  AMT=DOSE  EVID MDV RATE SEX WT 
$SUBR ADVAN13 TRANS1 TOL=6
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note the $ at the start of staments, no semicolon at thend of statements in the second.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not beleive that second file is SAS code at all.&lt;/P&gt;
&lt;P&gt;If you are attempting to Read the DOC file, or a text version then there may be issues with layout such as no end of line character recognized by your SAS system.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 22:20:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-in-a-non-data-file-and-editing/m-p/298814#M62896</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-09-15T22:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Reading in a  non data file and editing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-in-a-non-data-file-and-editing/m-p/299789#M63276</link>
      <description>&lt;P&gt;I never got a satisfactory reply so I submitted the question to SAS technical support a week ago and still have not received an answer which is very unusual.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 10:17:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-in-a-non-data-file-and-editing/m-p/299789#M63276</guid>
      <dc:creator>jacksonan123</dc:creator>
      <dc:date>2016-09-21T10:17:14Z</dc:date>
    </item>
  </channel>
</rss>

