View previous topic :: View next topic
|
Author |
Message |
alluri12
New User
Joined: 15 Aug 2006 Posts: 44 Location: Virginia, USA
|
|
|
|
I need to execute around 400 SQL statements in spufi or thru jcl. when executing if any 1 error occurs it stops executing in Spufi. If i u DSNSTEP in JCL it allows only 11 errors and stops executing.
My question is, Is there anyway to execute all the sql statements even if error out some sql statements.
For example
Select col1 from ta table;
Select col2 from tb table;
...
I really appriciate if somebody can provide me with solution
Thanks
Suresh |
|
Back to top |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
What kind of errors are you experiencing?
Dave |
|
Back to top |
|
|
alluri12
New User
Joined: 15 Aug 2006 Posts: 44 Location: Virginia, USA
|
|
|
|
SQLCODE = -204 Table not found |
|
Back to top |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
I guess I have a question as to why you are running queries against tables that do not exists. What is your objective in doing this ? |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Quote: |
Is there anyway to execute all the sql statements even if error out some sql statements. |
Apart from what Mr. David asked, why would you not like to abend, in case such error occurs... Anyway, code them all in a COBOL-DB2 program, and keep execution even if you get SQL Code other than ZERO until last Query. |
|
Back to top |
|
|
alluri12
New User
Joined: 15 Aug 2006 Posts: 44 Location: Virginia, USA
|
|
|
|
I know some of the tables does not exist. But I don't know which one of them in my envirment. I am expecing that -204 sqlerror code. The only thing i want to know is there a way to bypass all the errors and execute next sql statement in DB2. |
|
Back to top |
|
|
vijayamadhuri
Active User
Joined: 06 Apr 2005 Posts: 180
|
|
|
|
If u wnat to run u r queries even if u r table do not exist just code
if any other error code apart from 0 just continue...
However u r results will not be as exepected ...
What I dont understand is is why are running queries aganist tables that do not exist... |
|
Back to top |
|
|
|