View previous topic :: View next topic
|
Author |
Message |
r2k1984
New User
Joined: 21 Jun 2005 Posts: 69 Location: chennai
|
|
|
|
All,
Currently Iam in conversion of COBOL to Native SQL stored procedure for ZIIP processor usage.
Iam facing the following issue in this.
In COBOL we have lots of para which are called when ever it is required. Equivalent of para's available in native SQL is labels.
but how to call the labels other than GOTO statement.
Below is the example of the the scenario
Create procedure PROCEDURE1(OUT B INT)
LANGUAGE SQL
READS SQL DATA
DISABLE DEBUG MODE
DYNAMIC RESULT SETS 1
P1: BEGIN
SET B = 1;
I need to call the procedure B to perform some actions . Goto is the one which I have found with redbooks. Is there any other way to the call the label.
END P1
P2: BEGIN
SET B = B*2;
END P2
Thanks in advance for your help |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
perhaps instead of imbedding 'paragraphs to be performed'
create additional SP's to be CALLed. |
|
Back to top |
|
|
r2k1984
New User
Joined: 21 Jun 2005 Posts: 69 Location: chennai
|
|
|
|
But there are lots of paragraphs in the cobol code . Which are been called multiple times.
If we create a stored procedure for each para, we will end up in multiple stored procedures. Which the DBA is not preferring.
Is there any other ways? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
It is quite common for a process to utilize multiple Stored Procedures. . .
Quote: |
Which the DBA is not preferring. |
Then this dba should tell you what you need to do. . . |
|
Back to top |
|
|
|