<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#330099" bgcolor="#FFFFFF">
    <tt>Josh,<br>
      <br>
      The ANSI files can be difficult, but you will find that they want
      most of the lines to be as short as possible, with spaces removed
      as fill.<br>
      <br>
      I think the first couple lines are exceptions.<br>
      <br>
      We use ANSI files for the medical electronic claims, but the
      protocol and structure is used in many industries for exchanging
      orders, inventories and such.<br>
      <br>
      You do have a record delimiter, the tilde ~.<br>
      <br>
      export ascii xxx=file r=~ f=,<br>
      <br>
      xxx(1)=wl; write xxx<br>
      <br>
      wl=""<br>
      <br>
      Then all your fields are concatenated into WL as you build each
      record.  wl=wl{"*"{field1{"*"{field2<br>
      <br>
      Will work for ANSI.  <br>
      <br>
      The field delimiter is never inserted because you are only every
      writing one field, you are using wl and loading it with all the
      fields for one line on each pass.<br>
      <br>
      I hope that helps.<br>
      <br>
      Nancy<br>
    </tt><br>
    <div class="moz-cite-prefix">On 6/6/2019 2:20 PM, Josh Reader via
      Filepro-list wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:BN6PR11MB1844BB2D780F2CFE5C294DC596170@BN6PR11MB1844.namprd11.prod.outlook.com">
      <pre class="moz-quote-pre" wrap="">Hi All,

Is it possible to export to a delimited file and pad a few of the fields with spaces?  The command I'm using is:

export ascii file=(fn) f=*

(Note the requirement is to run all data on one long line, hence no r=\n)

I tried using named variables with a set length, using chr("32"), and setting an edit using {*} \20\ and nothing worked.  It doesn't honor the spaces and butts the delimiter right up against the end of the data (or other delimiter).  I'm doing this for an 856 ASN EDI document.  The trading partner needs fields 3 and 5 to have 10 blank spaces and fields 7 and 9 to be a 15 characters (I only have 14 characters worth of data).  Those two fields should have a space between the end of the data and the delimiter.  The rest, however, should be delimited normally so I can't use fixed width.

Here's a sample of what I'm trying to do:
ISA*00*          *00*          *12*1111111111TEST *12*2222222222TEST *190528*1447*U*00401*000001036*0*P*>~

Here's what it's doing:
ISA*00**00**12*1111111111TEST*12*2222222222TEST*190528*1447*U*00401*000001036*0*P*>~

Thanks,
Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <a class="moz-txt-link-rfc2396E" href="http://mailman.celestial.com/pipermail/filepro-list/attachments/20190606/5434228e/attachment.html"><http://mailman.celestial.com/pipermail/filepro-list/attachments/20190606/5434228e/attachment.html></a>
_______________________________________________
Filepro-list mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Filepro-list@lists.celestial.com">Filepro-list@lists.celestial.com</a>
Subscribe/Unsubscribe/Subscription Changes
<a class="moz-txt-link-freetext" href="http://mailman.celestial.com/mailman/listinfo/filepro-list">http://mailman.celestial.com/mailman/listinfo/filepro-list</a>

</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Nancy Palmquist         MOS & filePro Training Available
Virtual Software Systems    Web Based Training and Consulting   
PHONE: (412) 835-9417           Web site:  <a class="moz-txt-link-freetext" href="http://www.vss3.com">http://www.vss3.com</a> 
</pre>
  </body>
</html>