Unix Technical Forum

Number of rows processed on unload

This is a discussion on Number of rows processed on unload within the Informix forums, part of the Database Server Software category; --> Hi: In 4gl when i make an UNLOAD does sqlca.sqlerrd[3] gets assigned with the number of rows processed ? ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 09:59 PM
sergio@moredata.pt
 
Posts: n/a
Default Number of rows processed on unload


Hi:

In 4gl when i make an UNLOAD does sqlca.sqlerrd[3] gets assigned with the
number of rows processed ?

My doubt is because SELECT(s) assign sqlca.sqlerrd[3] with estimated
number of rows processed, but since UNLOAD is runned on the 4gl process
(and not in engine), 4gl could easily know how rows was unloaded.

TIA
Sérgio
sending to informix-list
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 10:00 PM
Jonathan Leffler
 
Posts: n/a
Default Re: Number of rows processed on unload

sergio@moredata.pt wrote:
> In 4gl when i make an UNLOAD does sqlca.sqlerrd[3] gets assigned with the
> number of rows processed?
>
> My doubt is because SELECT(s) assign sqlca.sqlerrd[3] with estimated
> number of rows processed, but since UNLOAD is runned on the 4gl process
> (and not in engine), 4gl could easily know how rows was unloaded.


The mere fact that you are asking strongly suggests that it does not.

The likely source of trouble is that the UNLOAD statement also closes
and frees the cursor, and releases the prepared statement, and
otherwise does SQL operations after the final FETCH, so the SQLCA gets
clobbered. You have to be rather careful to preserve the correct
SQLCA value, allowing errors in the cleanup to show, but preserving
the SQLCA with the final row count if everything is OK.

You're right; it is not particularly hard to code it so I4GL sets the
count correctly. However, if you are asking, then either you haven't
tried it (please go and do so before asking next time) or it doesn't work.

--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:05 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com