Export ASCII delimited with some padded fields
Nancy Palmquist
nancy.palmquist at vss3.com
Tue Jun 11 07:28:28 PDT 2019
Josh,
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.
I think the first couple lines are exceptions.
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.
You do have a record delimiter, the tilde ~.
export ascii xxx=file r=~ f=,
xxx(1)=wl; write xxx
wl=""
Then all your fields are concatenated into WL as you build each record.
wl=wl{"*"{field1{"*"{field2
Will work for ANSI.
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.
I hope that helps.
Nancy
On 6/6/2019 2:20 PM, Josh Reader via Filepro-list wrote:
> 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: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20190606/5434228e/attachment.html>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
--
Nancy Palmquist MOS & filePro Training Available
Virtual Software Systems Web Based Training and Consulting
PHONE: (412) 835-9417 Web site: http://www.vss3.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20190611/06211ee5/attachment.html>
More information about the Filepro-list
mailing list