Hi,
I am trying to update a field with in the table with some where clause, when the where clause fails.....it gives me an return code of 1 which indicates failure.
If we look something of this sort from Mainframe point of view, we have some thing called as Communication area where in which we get the return code as +100 indicating that the is no record with the given where clause.
Do we have any thing of this sort while writing some script using the Unix box to get the actual SQL error codes rather then just 0 or 1.
If yes how can we achieve that.
Let me know if you need any further information to help you?
SQL Error codes from UNIX box
Moderators: chulett, rschirm, roy
SQL Error codes from UNIX box
Regards,
Shree
785-816-0728
Shree
785-816-0728
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Create a reject link from your Enterprise database stage. It will automatically contain the columns from its input link plus a column called sqlcode that will contain the SQL error code returned from the database server.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Then post your question on a UNIX script forum. DSXchange gives DataStage solutions!
How do you propose to capture the SQL code IN the UNIX script? You can use the exit command to return the value - that part's easy.
How do you propose to capture the SQL code IN the UNIX script? You can use the exit command to return the value - that part's easy.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.