View previous topic :: View next topic |
Author |
Message |
vinnay Beginner
Joined: 13 Mar 2006 Posts: 15 Topics: 9
|
Posted: Fri Jun 30, 2006 1:37 am Post subject: Stored Procedures for REBIND |
|
|
Hi,
I want to write a stored procedure which resolves the -805 probelm during the DB2 program execution.
i.e My code looks like:
EXEC SQL
SELECT STATEMENT
END-EXEC
EVALUATE SQLCODE
WHEN -805
CALL "STORED-PROC" USING WS-PROG-NAME
WHEN 100
DISPLAY ' NO ROWS'
WHEN OTHERS
CALL 'ABEND-ROUTIN' USING SQLCODE
END-EVALUATE.
----
So whenever -805 occured my stored procedure will REBIND the given program. ( i will use same DBRM library for all programs).
In future i dont want to see my program abended with -805.
Please help me in writing the stored procedure for this request. |
|
Back to top |
|
 |
shekar123 Advanced
Joined: 22 Jul 2005 Posts: 528 Topics: 90 Location: Bangalore India
|
Posted: Fri Jun 30, 2006 2:05 am Post subject: |
|
|
vinnay,
If you do not want to execute the condition for -805 in the Evaluate statement ,can you make use of skipping that statement that is continue further execution .
Code: |
EVALUATE SQLCODE
WHEN -805
CONTINUE
WHEN 100
DISPLAY ' NO ROWS'
WHEN OTHER
CALL 'ABEND-ROUTIN' USING SQLCODE
END-EVALUATE.
|
_________________ Shekar
Grow Technically |
|
Back to top |
|
 |
vinnay Beginner
Joined: 13 Mar 2006 Posts: 15 Topics: 9
|
Posted: Fri Jun 30, 2006 2:36 am Post subject: |
|
|
Hi Shekar123,
If i continue with -805 sqlcode it will not fetch any data in program. My question is, i want to resolve -805 in my program itself in stead of doing a seperate BIND process thru JCL or Online. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Jun 30, 2006 5:01 am Post subject: |
|
|
Quote: |
If i continue with -805 sqlcode it will not fetch any data in program. My question is, i want to resolve -805 in my program itself in stead of doing a seperate BIND process thru JCL or Online.
|
vinnay,
You just cannot solve the BIND errors within the program.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
vinnay Beginner
Joined: 13 Mar 2006 Posts: 15 Topics: 9
|
Posted: Fri Jun 30, 2006 6:00 am Post subject: |
|
|
Kolusu,
Is there any other way to BIND the program without submitting JCL or thru Interactive panel? It would be a great help for me if you could answer for this .
Thanks in advance. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Jun 30, 2006 6:51 am Post subject: |
|
|
Quote: |
Is there any other way to BIND the program without submitting JCL or thru Interactive panel? It would be a great help for me if you could answer for this .
|
NO
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|