0 Replies Latest reply on Mar 30, 2005 4:07 PM by 440714

    FTP Adapter to Flat File - preventing blank lines

    440714

      Hi,

      I have the following D3L file, which I use to create a file of employee details:

      <?xml version="1.0" encoding="US-ASCII"?>
      <!DOCTYPE message SYSTEM "d3l.dtd">
      <message name="employeeDetail" type="EmpRec" object="Employee">
      <imparray id="AddressArrayType">
      <struct>
      <field name="EmpID">
      <padstring length="8" padchar=" " padstyle="tail"/>
      </field>
      <field name="StreetName">
      <padstring length="20" padchar=" " padstyle="tail"/>
      </field>
      <field name="EOL"><termstring endchar="\n" /></field>
      </struct>
      </imparray>
      <imparray id="SalArrayType">
      <struct>
      <field name="EmpID">
      <padstring length="8" padchar=" " padstyle="tail"/>
      </field>
      <field name="Salary">
      <padstring length="10" padchar=" " padstyle="tail"/>
      </field>
      <field name="EOL"><termstring endchar="\n" /></field>
      </struct>
      </imparray>
      <imparray id="EmpArrayType">
      <struct>
      <field name="EmpAddrArray"> <typeref type="AddressArrayType" /> </field>
      <field name="EmpSalArray"> <typeref type="SalArrayType" /> </field>
      </struct>
      </imparray>
      <struct id="EmpRec">
      <field name="EmpArray"> <typeref type="EmpArrayType" /> </field>
      </struct>
      </message>

      Basically, an employee can have multiple address entries, and multiple salary entries, and there are multiple employees.

      The file produced is what I require, except where an employee has no address, but has a salary, or no salary, but has an address. In these cases, I get a blank line.

      How do I prevent a blank line appearing - by changing the D3L file, or by doing a conditional copy when I map from common view to application view?

      Anyone help? Thanks.