Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Embedded SQL

Embedded SQL

Embedded SQL


Does anyone know if I can get to the completion details of an embedded delete statement? e.g. 300 record deleted.

I am writing a purge program that has parameters Lib, file and where clause and I want write an advice record of the deletion.




RE: Embedded SQL


Sqlrpgle provides you with following:

SQLErrD(1) - treated as Char(4); last 4 characters of
CPF or other escape message
SQLErrD(2) - treated as Char(4); last 4 characters of
CPF or other diagnostic message
SQLErrD(3) - for Fetch, Insert, Update or Delete,
number of rows retrieved or updated
SQLErrD(4) - for Prepare, relative number indicating
resources required for execution
SQLErrD(5) - for multiple-row Fetch, contains 100 if
last available row is fetched; for Delete,
number of rows affected by referential
constraints; for Connect or Set
Connection, contains t-1 if unconnected,
0 if local and 1 if connection is remote
SQLErrD(6) - when SQLCode is 0, contains SQL
completion message id

SQLErrD(3) seems to be what you are looking for.

- - - - - - - - - - - - - - - - - -
Im three apples high, Im blue, and I really like that cold beer that should be every mans right after a hard days work!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close