Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Benny, on Informix 7.23 under HP-UX 10.20, wanted to export a stored procedure's computed results to a text file, but TRACE added a 'trace expression:' prefix to each line. Art S. Kagel said it could not be avoided (UNLOAD is a dbaccess command) and advised a shell, 4GL or ESQL program that calls the procedure and writes the file. Bashar Chalabi suggested invoking a shell from the procedure to append; Art called that impractical.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
benlag@my-deja.com — — source: Informix-list mailing list archive (1991-1998)
I have what seems to me to be a simple request. I am using Informix 7.23
on a HP-UX 10.20 box. I have created a stored procedure which has
created a recordset which I want to export to a text file. My only
problem is that the only way I know of writing to a file in a stored
procedure would be using the "TRACE" command. ("Unload" will not work
because most of the data being exported is stored in variables within
the procedure whose value depends on a number of conditions.) The
problem is that this command adds a "trace expression:" to the file
every time it is called.
How can I prevent this from happening or maybe there is a better way of
doing this??
Your help or suggestions would be greatly appreciated,
Benny
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
↪ replying to benlag@my-deja.com
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
benlag@my-deja.com wrote:
>
> I have what seems to me to be a simple request. I am using Informix 7.23
> on a HP-UX 10.20 box. I have created a stored procedure which has
> created a recordset which I want to export to a text file. My only
> problem is that the only way I know of writing to a file in a stored
> procedure would be using the "TRACE" command. ("Unload" will not work
> because most of the data being exported is stored in variables within
> the procedure whose value depends on a number of conditions.) The
Actually UNLOAD would not work anyway since it is NOT an SQL command
but a dbaccess built-in command.
> problem is that this command adds a "trace expression:" to the file
> every time it is called.
>
> How can I prevent this from happening or maybe there is a better way of
> doing this??
Nope no way at all. The best way to handle this would be to have a
shell script, 4GL program, or ESQL program that calls the stored
procedure and formats the output to a file.
Art S. Kagel
↪ replying to Art S. Kagel
Bashar Chalabi — — source: Informix-list mailing list archive (1991-1998)
>> How can I prevent this from happening or maybe there is a better way of
>> doing this??
>
>Nope no way at all. The best way to handle this would be to have a
>shell script, 4GL program, or ESQL program that calls the stored
>procedure and formats the output to a file.
Or, from the stored procedure, you can repeatedly invoke a shell that
appends to the file.
Bashar Chalabi
CTL, London
↪ replying to Bashar Chalabi
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
Bashar Chalabi wrote:
>
> >> How can I prevent this from happening or maybe there is a better way of
> >> doing this??
> >
> >Nope no way at all. The best way to handle this would be to have a
> >shell script, 4GL program, or ESQL program that calls the stored
> >procedure and formats the output to a file.
>
> Or, from the stored procedure, you can repeatedly invoke a shell that
> appends to the file.
Not exactly a practical solution, but in a pinch...
Art S. Kagel
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.