Export ASCII delimited with some padded fields
Josh Reader
josh.reader at mercuryelectronics.com
Thu Jun 6 12:41:57 PDT 2019
That's a good idea to put it all into one field and just concatenate within that field with the needed delimiter. I was doing this:
file(1)="ISA"; file(2)="00"; file(3)=" "; file(4)="12"; etc
Instead I can do this
file(1)= "ISA"{"*"{"00"{"*"&" "&"*"{"12"
Thanks!
Josh
-----Original Message-----
From: Filepro-list <filepro-list-bounces+josh.reader=mercuryelectronics.com at lists.celestial.com> On Behalf Of Walter Vaughan Jr via Filepro-list
Sent: Thursday, June 6, 2019 2:25 PM
To: filepro-list at lists.celestial.com
Subject: RE: Export ASCII delimited with some padded fields
You're going to have to show us what your concatenation looks like Are you using & or < or what to join the fields
-----Original Message-----
From: Filepro-list <filepro-list-bounces+wvaughan=steelerubber.com at lists.celestial.com> On Behalf Of Josh Reader via Filepro-list
Sent: Thursday, June 6, 2019 2:21 PM
To: filepro-list at lists.celestial.com
Subject: Export ASCII delimited with some padded fields
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
_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
Subscribe/Unsubscribe/Subscription Changes http://mailman.celestial.com/mailman/listinfo/filepro-list
More information about the Filepro-list
mailing list