<?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: File Writer Operation Creates unwanted rows. in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131106#M35670</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your initial post you're showing us a SAS table but the problem you flag is with a text file. I believe Tom's suggestion that you actually look directly at the text file produced using a text editor like Notepad++ is a good one. Notepad++ allows you also to visualise "whitespace" characters like CR and LF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the code you've posted you're only compressing hex 'OD'. May be you need also to include hex 'OA' (a line feed).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Monotonic() is an unsupported function. You shouldn't use it for production worthy code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've realised that in the code you've posted you changed over to "user written" in the "file writer" node. If so then you could streamline your program a bit by removing unnecessary passes through data. Simply extract your data and then give below code a try (user written as part of your file writer node).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;&amp;nbsp; set &amp;amp;SYSLAST;&lt;BR /&gt;&amp;nbsp; attrib DMT_RECORD_NUM length = 8 ;&lt;BR /&gt;&amp;nbsp; attrib ECATS_CNTRCT_ID length = $128;&lt;BR /&gt;&amp;nbsp; attrib ECATS_LEGAL_ENTITY_CODE length = $128;&lt;BR /&gt;&amp;nbsp; attrib ECATS_LEGAL_ENTITY_DESCR length = $128;&lt;BR /&gt;&amp;nbsp; attrib AD_ID length = $128;&lt;BR /&gt;&amp;nbsp; attrib AD_NAME length = $128;&lt;BR /&gt;&amp;nbsp; attrib AD_REP_NAME length = $128;&lt;BR /&gt;&amp;nbsp; attrib DM_NAME length = $128;&lt;BR /&gt;&amp;nbsp; attrib STATUS_NAME length = $128;&lt;BR /&gt;&amp;nbsp; attrib OTHER_COMMITMENT length = $128;&lt;BR /&gt;&amp;nbsp; attrib CUST_LISTED_NAME length = $100;&lt;BR /&gt;&amp;nbsp; attrib CPE_DELIVERY_DT length = $128;&lt;BR /&gt;&amp;nbsp; attrib CPE_INSTALLATION_DT length = $128;&lt;BR /&gt;&amp;nbsp; attrib CPE_MAINT_END_DT length = $128;&lt;BR /&gt;&amp;nbsp; attrib CPE_MAINT_START_DT length = $128;&lt;BR /&gt;&amp;nbsp; attrib ECRM_CONTRACT_TYPE length = $128;&lt;BR /&gt;&amp;nbsp; attrib ECRM_CONTRACT_SUB_TYPE length = $128;&lt;BR /&gt;&amp;nbsp; file '/staging/econ/PD817_Project/Dev/OutputFiles/CDR_Files_06042013/LE/LE_FINAL_OP_07102013.dat' dlm='|' DSD;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DMT_RECORD_NUM=_n_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array charvars _character_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do over charvars;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; charvars=compress(charvars,,'c');&lt;BR /&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CUST_LISTED_NAME=SUBSTRN(CUST_LISTED_NAME ,1,100);&lt;/P&gt;&lt;P&gt;&amp;nbsp; put &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMT_RECORD_NUM&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ECATS_CNTRCT_ID&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ECATS_LEGAL_ENTITY_CODE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ECATS_LEGAL_ENTITY_DESCR&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AD_ID&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AD_NAME&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AD_REP_NAME&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DM_NAME&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; STATUS_NAME&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHER_COMMITMENT&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CUST_LISTED_NAME&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CPE_DELIVERY_DT&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CPE_INSTALLATION_DT&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CPE_MAINT_END_DT&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CPE_MAINT_START_DT&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ECRM_CONTRACT_TYPE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ECRM_CONTRACT_SUB_TYPE&lt;BR /&gt;&amp;nbsp; ;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Jul 2013 23:31:48 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2013-07-10T23:31:48Z</dc:date>
    <item>
      <title>File Writer Operation Creates unwanted rows.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131100#M35664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Rockwell','serif';"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Rockwell','serif';"&gt;I have an issue in the&amp;nbsp; File Writer operation in my SAS Job; I am trying to write the data from a table to a file with pipe delimited. Total number of records are 1.7M;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Rockwell','serif';"&gt;There are few empty rows created after every row and in some cases values from a row is copied to a second row with&amp;nbsp; randomly populated values on the columns.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Rockwell','serif';"&gt;Don’t understand what is wrong in the file writer operation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Rockwell','serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Rockwell','serif';"&gt;Tried below alternatives but found that File Operation step is giving the issues.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-family: 'Rockwell','serif';"&gt;Removed the carriages return by using the compress expression COMPRESS(ECATS_CNTRCT_ID ,'0D'x) on the Extract Step.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: 'Rockwell','serif';"&gt;Output splitted into 2 files with less columns and read from 2 files and combined to a single file. But still same issues.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Rockwell','serif';"&gt;Please help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Rockwell','serif';"&gt;Attached&lt;/SPAN&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;&lt;SPAN style="font-family: 'Rockwell','serif';"&gt;Screen shot of the job&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: 'Rockwell','serif';"&gt;SAS Job S&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Rockwell','serif';"&gt;cript&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: 'Rockwell','serif';"&gt;File table rows errors highlighted for ref.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Rockwell','serif';"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Rockwell','serif';"&gt;Arun&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11371i82DFA03DA301C8FA/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="LE Write to File.png" title="LE Write to File.png" /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11372i49BE0D358ADED91B/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Result file table.JPG" title="Result file table.JPG" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2013 18:06:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131100#M35664</guid>
      <dc:creator>aj113c_att_com</dc:creator>
      <dc:date>2013-07-10T18:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: File Writer Operation Creates unwanted rows.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131101#M35665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One cause, especially with "random values" repeating in wrong columns could well be either linefeed or carriage return characters or both in one or more of the data fields. This is a very likely condition if you have people typing into a data entry program that allows those characters, usually from pressing an Enter key.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2013 20:09:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131101#M35665</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-07-10T20:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: File Writer Operation Creates unwanted rows.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131102#M35666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did the File Writer step generate a SAS log?&amp;nbsp; If so then look at the log and/or the SAS code that it generated.&lt;/P&gt;&lt;P&gt;What type of file did you write? The screen shot is of what looks like Excel or some other spreadsheet program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2013 20:22:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131102#M35666</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-07-10T20:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: File Writer Operation Creates unwanted rows.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131103#M35667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its a pipe delimited flat file with .dat extension; we are loading this file to our Siebel database.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2013 20:27:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131103#M35667</guid>
      <dc:creator>aj113c_att_com</dc:creator>
      <dc:date>2013-07-10T20:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: File Writer Operation Creates unwanted rows.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131104#M35668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also think so, but why is that not showing in table; total number of rows are correct on table, row is complete; nothing is rolling over to the next row in table.&lt;/P&gt;&lt;P&gt;but when write to a file, it all messes up.&lt;/P&gt;&lt;P&gt;Is there any property I have to look at it on the file level.&lt;/P&gt;&lt;P&gt;See the attached property of file.&lt;IMG alt="File Properties.JPG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/3874_File Properties.JPG" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2013 20:32:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131104#M35668</guid>
      <dc:creator>aj113c_att_com</dc:creator>
      <dc:date>2013-07-10T20:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: File Writer Operation Creates unwanted rows.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131105#M35669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) Try clicking that "Treat consecutive delimiter...." box and see if it generates the DSD option in the SAS code it generates.&lt;/P&gt;&lt;P&gt;2) Check your character variables for "pipe" characters in addition to carriage returns.&lt;/P&gt;&lt;P&gt;3) Look at the file with a text editor to see if the file is actually messed up or if it is just Siebel that is messed up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2013 21:20:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131105#M35669</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-07-10T21:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: File Writer Operation Creates unwanted rows.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131106#M35670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your initial post you're showing us a SAS table but the problem you flag is with a text file. I believe Tom's suggestion that you actually look directly at the text file produced using a text editor like Notepad++ is a good one. Notepad++ allows you also to visualise "whitespace" characters like CR and LF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the code you've posted you're only compressing hex 'OD'. May be you need also to include hex 'OA' (a line feed).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Monotonic() is an unsupported function. You shouldn't use it for production worthy code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've realised that in the code you've posted you changed over to "user written" in the "file writer" node. If so then you could streamline your program a bit by removing unnecessary passes through data. Simply extract your data and then give below code a try (user written as part of your file writer node).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;&amp;nbsp; set &amp;amp;SYSLAST;&lt;BR /&gt;&amp;nbsp; attrib DMT_RECORD_NUM length = 8 ;&lt;BR /&gt;&amp;nbsp; attrib ECATS_CNTRCT_ID length = $128;&lt;BR /&gt;&amp;nbsp; attrib ECATS_LEGAL_ENTITY_CODE length = $128;&lt;BR /&gt;&amp;nbsp; attrib ECATS_LEGAL_ENTITY_DESCR length = $128;&lt;BR /&gt;&amp;nbsp; attrib AD_ID length = $128;&lt;BR /&gt;&amp;nbsp; attrib AD_NAME length = $128;&lt;BR /&gt;&amp;nbsp; attrib AD_REP_NAME length = $128;&lt;BR /&gt;&amp;nbsp; attrib DM_NAME length = $128;&lt;BR /&gt;&amp;nbsp; attrib STATUS_NAME length = $128;&lt;BR /&gt;&amp;nbsp; attrib OTHER_COMMITMENT length = $128;&lt;BR /&gt;&amp;nbsp; attrib CUST_LISTED_NAME length = $100;&lt;BR /&gt;&amp;nbsp; attrib CPE_DELIVERY_DT length = $128;&lt;BR /&gt;&amp;nbsp; attrib CPE_INSTALLATION_DT length = $128;&lt;BR /&gt;&amp;nbsp; attrib CPE_MAINT_END_DT length = $128;&lt;BR /&gt;&amp;nbsp; attrib CPE_MAINT_START_DT length = $128;&lt;BR /&gt;&amp;nbsp; attrib ECRM_CONTRACT_TYPE length = $128;&lt;BR /&gt;&amp;nbsp; attrib ECRM_CONTRACT_SUB_TYPE length = $128;&lt;BR /&gt;&amp;nbsp; file '/staging/econ/PD817_Project/Dev/OutputFiles/CDR_Files_06042013/LE/LE_FINAL_OP_07102013.dat' dlm='|' DSD;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DMT_RECORD_NUM=_n_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array charvars _character_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; do over charvars;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; charvars=compress(charvars,,'c');&lt;BR /&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CUST_LISTED_NAME=SUBSTRN(CUST_LISTED_NAME ,1,100);&lt;/P&gt;&lt;P&gt;&amp;nbsp; put &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMT_RECORD_NUM&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ECATS_CNTRCT_ID&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ECATS_LEGAL_ENTITY_CODE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ECATS_LEGAL_ENTITY_DESCR&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AD_ID&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AD_NAME&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AD_REP_NAME&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DM_NAME&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; STATUS_NAME&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHER_COMMITMENT&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CUST_LISTED_NAME&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CPE_DELIVERY_DT&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CPE_INSTALLATION_DT&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CPE_MAINT_END_DT&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CPE_MAINT_START_DT&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ECRM_CONTRACT_TYPE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ECRM_CONTRACT_SUB_TYPE&lt;BR /&gt;&amp;nbsp; ;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2013 23:31:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131106#M35670</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-07-10T23:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: File Writer Operation Creates unwanted rows.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131107#M35671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The OP posted the full code as zip file. The zipped file simply misses the .sas extension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DI Studio allows you to define job flows on metadata level. But to actually execute it you need to generate SAS code. Sometimes it's necessary to modify DI transformation generated SAS code. The nodes give you an option to switch over to "user written" mode. You then can modify the generated code as you wish. DI Studio will then use the user written code as part of code generation but marks it in the code as comment /*---- Start of User Written Code&amp;nbsp; ----*/&lt;/P&gt;&lt;P&gt;That's what you can see in the code the OP posted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As the relevant part of the code where the issue needs resolution is "user written" we can provide advise and code as if this were any code written outside of DI studio. Once user written any changes on metadata level for this node (eg. checking "Treat consecutive delimiter...") has no more an effect on what code gets generated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2013 23:41:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131107#M35671</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-07-10T23:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: File Writer Operation Creates unwanted rows.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131108#M35672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did not see the code before.&lt;/P&gt;&lt;P&gt;Two big problems with the code.&lt;/P&gt;&lt;P&gt;1) Use of ATTRIB statements and their location. The SET statement should be after the ATTRIB statement, otherwise they will not have have any effect. SAS will have already defined the variables lengths when it reads the metadata from the input data set. In fact since you have no code that requires changing the length of any of these variables you do not need any of them.&amp;nbsp; I would just delete them as they are not needed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) There is no LRECL specified in the FILE statement. So SAS could be inserting extra line breaks because the line has gotten longer than the default of 256.&amp;nbsp; If you variables are all really 128 characters long then your probability of exceeding 256 is very high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;options missing='';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data _null_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; set &amp;amp;SYSLAST;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; file '/staging/econ/PD817_Project/Dev/OutputFiles/CDR_Files_06042013/LE/LE_FINAL_OP_07102013.dat'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dlm='|' DSD lrecl=32500&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; put&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMT_RECORD_NUM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ECATS_CNTRCT_ID&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ECATS_LEGAL_ENTITY_CODE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ECATS_LEGAL_ENTITY_DESCR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AD_ID&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AD_NAME&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AD_REP_NAME&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DM_NAME&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; STATUS_NAME&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHER_COMMITMENT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CUST_LISTED_NAME&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CPE_DELIVERY_DT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CPE_INSTALLATION_DT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CPE_MAINT_END_DT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CPE_MAINT_START_DT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ECRM_CONTRACT_TYPE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ECRM_CONTRACT_SUB_TYPE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 01:46:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131108#M35672</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-07-11T01:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: File Writer Operation Creates unwanted rows.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131109#M35673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep - you're of course right. Missed that the lrecl had only been defined as metadata but not actually in the code - so it appears the OP set this only after changing to "user written".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 04:52:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131109#M35673</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-07-11T04:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: File Writer Operation Creates unwanted rows.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131110#M35674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the late reply; &lt;/P&gt;&lt;P&gt;Thanks Tom, it worked for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 19:44:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Writer-Operation-Creates-unwanted-rows/m-p/131110#M35674</guid>
      <dc:creator>aj113c_att_com</dc:creator>
      <dc:date>2013-07-17T19:44:23Z</dc:date>
    </item>
  </channel>
</rss>

