Re: Preparing an unload statement
Posted in 1996
costrom@solair1.inter.NL.net (Craig Ostrom) wrote:
>As Online 5 does not have a table-level backup facility, I am writing one in
>4gl. Problem is, I get a syntax error when trying to prepare the unload
>statement for subsequent execution. The statement is:
> unload to "ae.unl" select * from ae;>This works in isql but not in 4gl. Does anyone know if unload statements are
>invalid in 4gl?
It depends on your version. Prior to (I believe) 4.12 of RDS the unload
command does not work. We have used two workarounds. One is to call a
unix script which does the unload using isql (or dbaccess), the other is to
write a report which effectively does an unload.
Another trap in some versions of sql (4.10 maybe) is that load ignores the
DBDATE environment variable but unload does not. So unloading a table with
a DATE field, requires an awk or sed script to manipulate it to allow load
to load it.
Hope this helps.
Cheers,
Brent Jackson.
brent@hypercom.co.nz Phone : 64-9-3603593 Fax : 64-9-3602840