export pipe delimitted
Mike Schwartz
mschw at athenet.net
Wed Jan 21 08:35:47 PST 2009
From: filepro-list-bounces+mschw=athenet.net at lists.celestial.com
[mailto:filepro-list-bounces+mschw=athenet.net at lists.celestial.com] On
Behalf Of scooter6 at gmail.com
> So, should it look like:
> John|Smith|1234|field1|field2|
> or just:
> John|Smith|1234|field1|field2 ??
You have to ask the person who asked you for the file whether or not to
add the last pipe onto the end.
If they don't care, then I would suggest adding it anyway, especially if
your data line building code is complex. I've had a couple of instances
where I didn't add one when I initially wrote a delimited export. Weeks
later, I came back to add more fields to the data lines but forgot that I
hadn't added the pipe to the end of the original line. Oops!
Tip of the day:
If you have a lot of fields to export, rather than adding the pipes as
literals, such as:
op(200,*)=dt{"|"{du{"|"
put the pipe (or other delimiter) into a variable:
p(1,*)="|"
so your code looks like:
op(200,*)=dt{p{du{p
Doing this can save you a lot of typing and headaches, especially if
you miss a quote mark someplace along the way.
Mike Schwartz
More information about the Filepro-list
mailing list