export fixed length file
John Esak
john at valar.com
Wed Nov 9 14:47:15 PST 2005
Dennis,
This looks more like basic filePro style than anything to do with import or
export. If you want one field to contain a list of other things that is too
long to fit on one line. You can do something like:
then: x=aa&bb&cc&dd&ee ... & xx <end of line happens here>
then: x=x&yy&zz&a&b&c&d&e ..& y <end of line happens here>
then: x=x&z&declared_var_1&declared_val_2&2 23&24 ... etc.
for as many lines as you need. Then do:
then: export blah blah
then: met(1)=x
I don't know what you mean by the data is being pushed left... but it is
probably something to do with your chr("10") at the end of the group of
items you are concatenating together. You mention this being a fixed length
export, but I'm not sure that is exactly what you mean or are actually
getting here. There is a very good Chapter on Fixed Length exports on the CD
set you hve... It's on the Advanced CD, but it is dead simple, only there
because it is not part of the step-by-step tutorial which starts on the
Beginner CD, continues on the Intermediate CD and is finished up on the
Advanced CD. Just after the tutorials are a whole bunch of chapters on
things like export and many other things.
John
> -----Original Message-----
> From: filepro-list-bounces at lists.celestial.com
> [mailto:filepro-list-bounces at lists.celestial.com]On Behalf Of Dennis
> Malen
> Sent: Wednesday, November 09, 2005 5:09 PM
> To: filepro-list at lists.celestial.com
> Subject: export fixed length file
>
>
> When doing an export on a fixed length ascii file I found that when using
> two export identifiers (not sure of the terminology) that the use of a
> second export identifier caused the values to be pushed left even
> though the
> respective fields were defined as certain lengths.
>
> The following should give you an idea of what I mean:
>
> 6 ne "" ~
> met(1)=a&b&c&d&e&f&g&h&i&j&k&l&m&na&o&p&q&r&s&t&u&v&w&x&ya&z ~
> - - - - - - - - - - - - - - - -
> 6 ne ""
> met(2)=aa&bb&cc&dd&ee&ff&gg&hh&ii&jj&kk&ll&ma&nn&oo&chr("10");write met
> - - - - - - - - - - - - - - - -
>
> Above, I had to use met(1) and met(2). This caused only z(30) and
> aa(27) to
> be corrupted concerning the lack of its ability to maintain the defined
> length of the respective fields. In order to fix the problem I
> had to do the
> following which was to create two dummy fields that held the
> value of each
> line and then send it out as met(1) only. I have not included the
> processing
> showing the dummy fields defined as that was not causing the problem.
>
> 6 ne "" ~
> xx=a&b&c&d&e&f&g&h&i&j&k&l&m&na&o&p&q&r&s&t&u&v&w&x&ya&z ~
> - - - - - - - - - - - - - - - -
> 6 ne ""
> yy=aa&bb&cc&dd&ee&ff&gg&hh&ii&jj&kk&ll&ma&nn&oo&chr("10")
> - - - - - - - - - - - - - - - -
> 6 ne "" ~
> met(1)=xx&yy;write met ~
>
> The above fixed the problem.
>
> Some of you may not be aware that this approach causes a problem
> and some of
> you may have a better fix.
>
> Regards,
>
> Dennis Malen
> 516.479.5912
>
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
More information about the Filepro-list
mailing list