<?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: Try to split a log data file line into next line in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Try-to-split-a-log-data-file-line-into-next-line/m-p/515097#M2871</link>
    <description>&lt;P&gt;What do you actually want to achieve from this?&amp;nbsp; You can control various output parts of a program either in the code or in the options.&amp;nbsp; If you need to find inputs/outputs and such like, then use proc scaproc which is a code analyzer, once the code is run with that running it provides a lot of information.&amp;nbsp; As for how to create new lines, you can control where the output occurs with the output statement, e.g.:&lt;/P&gt;
&lt;PRE&gt;if input_ds =: "NOTE: The data set" then do;
  line=substr(input_ds,1,findw(input_ds,"has"));
  output;
  line=subsrt(input_ds,findw(input_ds,"has"));
  output;
end;&lt;/PRE&gt;
&lt;P&gt;Will output a row for text up to the word has.&amp;nbsp; Then output another row for all text after the word has.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Nov 2018 14:15:58 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-11-21T14:15:58Z</dc:date>
    <item>
      <title>Try to split a log data file line into next line</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Try-to-split-a-log-data-file-line-into-next-line/m-p/515088#M2869</link>
      <description>&lt;P&gt;Good day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a log's code that i am trimming to not show unnecessary data .&lt;/P&gt;&lt;P&gt;I want to split a step that was found example is attached&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That whole step is shown in 1 column after the proc print.&lt;/P&gt;&lt;P&gt;How can i split it so it makes 2 columns under each other that looks like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.STUFF&amp;nbsp;&lt;/P&gt;&lt;P&gt;has 62 observations and 40 variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is the start point of my code ATM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;length input_ds $32767.;&lt;BR /&gt;infile "/home/jdebeer/stuff.log.txt" lrecl=32767 truncover;&lt;BR /&gt;input @1 input_ds $32767.;&lt;BR /&gt;if input_ds =: "NOTE: The data set" then do;&lt;BR /&gt;ds=scan(input_ds,5," ");&lt;BR /&gt;no_obs=scan(input_ds,7," ");&lt;BR /&gt;end;&lt;BR /&gt;if input_ds =: "NOTE: SAS initialization used:" then do;&lt;BR /&gt;siu=substr(input_ds,index(input_ds,":")+1,24);&lt;BR /&gt;end;&lt;BR /&gt;if input_ds =: "NOTE: PROCEDURE SQL" then do;&lt;BR /&gt;ps=substr(input_ds,index(input_ds,":")+1,14);&lt;BR /&gt;end;&lt;BR /&gt;if input_ds =: "NOTE: DATA statement used" then do;&lt;BR /&gt;dsm=substr(input_ds,index(input_ds,":")+1,15);&lt;BR /&gt;end;&lt;BR /&gt;if input_ds =: "NOTE: PROCEDURE FORMAT used" then do;&lt;BR /&gt;end;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 13:49:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Try-to-split-a-log-data-file-line-into-next-line/m-p/515088#M2869</guid>
      <dc:creator>Jomar28</dc:creator>
      <dc:date>2018-11-21T13:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Try to split a log data file line into next line</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Try-to-split-a-log-data-file-line-into-next-line/m-p/515097#M2871</link>
      <description>&lt;P&gt;What do you actually want to achieve from this?&amp;nbsp; You can control various output parts of a program either in the code or in the options.&amp;nbsp; If you need to find inputs/outputs and such like, then use proc scaproc which is a code analyzer, once the code is run with that running it provides a lot of information.&amp;nbsp; As for how to create new lines, you can control where the output occurs with the output statement, e.g.:&lt;/P&gt;
&lt;PRE&gt;if input_ds =: "NOTE: The data set" then do;
  line=substr(input_ds,1,findw(input_ds,"has"));
  output;
  line=subsrt(input_ds,findw(input_ds,"has"));
  output;
end;&lt;/PRE&gt;
&lt;P&gt;Will output a row for text up to the word has.&amp;nbsp; Then output another row for all text after the word has.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 14:15:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Try-to-split-a-log-data-file-line-into-next-line/m-p/515097#M2871</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-11-21T14:15:58Z</dc:date>
    </item>
  </channel>
</rss>

