Re: Unload a fixed width file
Posted in 2003
Easiest way :
select col1||col2||.... FROM ...
It will then extract as a single field width the widths as defined by the
display widths of the fields...
if you need to change the widths of the fields (eg a 2 character wide
integer) just knock up an SP which returns the right length...
create procedure to2char(a integer) returning char(2);define b char(2);
let b=a;
return b;
end procedure;
You'll need to strip the delimiter off the end though (or maybe make it a '
')...
Kennedy, Randy wrote:
>
> I have created a table to use as a repository for a SP. When it is all
> done, I want to unload that table to a file. I have searched through all
> manuals for the unload statement and can't find anything about how to
> unload to a fixed width file (based on field setups, they are all char(of> the correct length for layout) with NO delimiter.
>
> Is this possible using unload? IDS 9.21HC5 on HPUX11
>
> TIA,
> Randy
> sending to informix-list