Skip to main content

All Questions

-4 votes
1 answer
190 views

DB2 contention issues

We are experiencing serious performance degrades and sometimes outages due to DB2 contention issues. Covol DB2 batch program is having contentions with distributed threads from Stored procedures ...
user23568506's user avatar
1 vote
0 answers
93 views

Why is the Character output in out parameter getting substringed to some limit in DB2

I have created a stored procedure to call with some input parameters and get out related to that. The maximum limit of characters I have given 5000. But on calling the procedure the Output parameter ...
Aditya Kumar's user avatar
1 vote
1 answer
383 views

ATOMIC INSERT in STORED PROCEDURE

I'm fairly new to stored procedure. I have to design a stored procedure for ATOMIC insert (Mass insert). I'm using COBOL program to call the stored procedure in DB2. I will store values in array and ...
Prabhu's user avatar
  • 81
1 vote
1 answer
555 views

How to have optional OUTPUT parameter

I have a dynamic stored procedure, which I'm using to run multiple select queries. I have defined something like below. CREATE PROCEDURE DYNAMIC (IN IN_COLUMN1 ...
Prabhu's user avatar
  • 81
0 votes
3 answers
1k views

Alternative ideas for INTO CLAUSE in DYNAMIC SQL

I just learned,I will not able to use INTO CLAUSE in stored procedure,while using dynamic sql. Below is my Dynamic SQL. SET V_SELECT = 'SELECT ' || SELECT_FIELDS || ' FROM ...
Prabhu's user avatar
  • 81
1 vote
1 answer
1k views

INTO CLAUSE IS NOT PERMITTED

I created Dynamic DB2 Stored procedure for select. I'm going to use this generic query to execute multiple select statement, by passing the parameter. SET V_SELECT = 'SELECT ' || ...
Prabhu's user avatar
  • 81
0 votes
1 answer
655 views

THE CURSOR CURSOR NAME IS NOT IN A PREPARED STATE

I created Dynamic Stored procedure for select. I'm going to use this generic query for execute multiple select statement, by passing the parameter. DECLARE DESC_CSR CURSOR WITH HOLD FOR V_SQL; ...
Prabhu's user avatar
  • 81
2 votes
1 answer
1k views

I have to delete 30 days old data based on timestamp in DB2

I have a requirement to delete 30 days old record in DB2. I used below code to delete, It worked fine but current timestamp keep changing. This cause my procedure to go on loop. DELETE FROM TABLE ...
Prabhu's user avatar
  • 81
0 votes
1 answer
518 views

How to reflect changes made to a cobol DB2 stored procedure?

I'm getting a -805 when trying to run the changed stored procedure. The bind process that is done is: stop stored procedure, compile and bind stored proc, start stored procedure, refresh wlm area. I ...
Tonan's user avatar
  • 157
0 votes
1 answer
1k views

external stored procedure db2 on cobol

I would ask about calling external stored procedure on cobol z/os This is my code , the stored procedure code *----------------------------------------------------------------* IDENTIFICATION ...
Adrian Eka's user avatar
3 votes
1 answer
5k views

How to call a COBOL batch program from a COBOL stored procedure on DB2

Quick disclaimer: I'm a .Net developer and may not have provided all the information you need about the environment, but can get the information on request. We have COBOL programmers, but they have ...
Rusty Divine's user avatar
  • 3,492