Skip to main content

[archive] sqlcode -2 when I call a section the second time.

  • November 26, 2010
  • 9 replies
  • 0 views

[Migrated content. Thread originally posted on 25 November 2010]

Hello,

I get sqlcode -2 in my testprogram the second time I call a section. This does not make any sence to me. Can someone help me with this. The section is called TEST-CAPACITEIT and works fine the first time.

WORKING-STORAGE SECTION.
EXEC SQL INCLUDE SQLCA END-EXEC.

EXEC SQL BEGIN DECLARE SECTION END-EXEC.
01 pDepId PIC 9(10).
01 pDepId1 PIC 9(10).
01 pDepId2 PIC X(10).
01 dsn-name pic x(12).
01 userid pic x(8).
01 passwd.
49 passwd-length pic s9(4) comp-5 value 0.
49 passwd-name pic x(18).
EXEC SQL END DECLARE SECTION END-EXEC.
******************************************************************
PROCEDURE DIVISION.
Main Section.

perform initialization-routine.
perform make-connection.
perform select-data.
perform disconnect-connection.
Display "press Enter to Exit".
accept omitted.
stop run.

select-data.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
initialization-routine.
display "Enter datasource name: ",no.
accept dsn-name.
display "Enter your user id (default none): ",no.
accept userid.
display "Enter your password : ",no.
accept passwd-name.
inspect passwd-name tallying passwd-length for characters
before initial " ".
end-initialization-routine.

make-connection.
EXEC SQL CONNECT TO :dsn-name as C1
USER :userid USING :passwd
END-EXEC.

if sqlcode = 0 display "Connection successful...".
end-make-connection.

disconnect-connection.
EXEC SQL COMMIT END-EXEC.
EXEC SQL DISCONNECT ALL END-EXEC.

TEST-CAPACITEIT SECTION.
BEGIN.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
ENDS.
EXIT.

9 replies

[Migrated content. Thread originally posted on 25 November 2010]

Hello,

I get sqlcode -2 in my testprogram the second time I call a section. This does not make any sence to me. Can someone help me with this. The section is called TEST-CAPACITEIT and works fine the first time.

WORKING-STORAGE SECTION.
EXEC SQL INCLUDE SQLCA END-EXEC.

EXEC SQL BEGIN DECLARE SECTION END-EXEC.
01 pDepId PIC 9(10).
01 pDepId1 PIC 9(10).
01 pDepId2 PIC X(10).
01 dsn-name pic x(12).
01 userid pic x(8).
01 passwd.
49 passwd-length pic s9(4) comp-5 value 0.
49 passwd-name pic x(18).
EXEC SQL END DECLARE SECTION END-EXEC.
******************************************************************
PROCEDURE DIVISION.
Main Section.

perform initialization-routine.
perform make-connection.
perform select-data.
perform disconnect-connection.
Display "press Enter to Exit".
accept omitted.
stop run.

select-data.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
initialization-routine.
display "Enter datasource name: ",no.
accept dsn-name.
display "Enter your user id (default none): ",no.
accept userid.
display "Enter your password : ",no.
accept passwd-name.
inspect passwd-name tallying passwd-length for characters
before initial " ".
end-initialization-routine.

make-connection.
EXEC SQL CONNECT TO :dsn-name as C1
USER :userid USING :passwd
END-EXEC.

if sqlcode = 0 display "Connection successful...".
end-make-connection.

disconnect-connection.
EXEC SQL COMMIT END-EXEC.
EXEC SQL DISCONNECT ALL END-EXEC.

TEST-CAPACITEIT SECTION.
BEGIN.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
ENDS.
EXIT.
Sounds like some data is not reset the second round. Compare the data being used on the second round with the the data from the first round.

[Migrated content. Thread originally posted on 25 November 2010]

Hello,

I get sqlcode -2 in my testprogram the second time I call a section. This does not make any sence to me. Can someone help me with this. The section is called TEST-CAPACITEIT and works fine the first time.

WORKING-STORAGE SECTION.
EXEC SQL INCLUDE SQLCA END-EXEC.

EXEC SQL BEGIN DECLARE SECTION END-EXEC.
01 pDepId PIC 9(10).
01 pDepId1 PIC 9(10).
01 pDepId2 PIC X(10).
01 dsn-name pic x(12).
01 userid pic x(8).
01 passwd.
49 passwd-length pic s9(4) comp-5 value 0.
49 passwd-name pic x(18).
EXEC SQL END DECLARE SECTION END-EXEC.
******************************************************************
PROCEDURE DIVISION.
Main Section.

perform initialization-routine.
perform make-connection.
perform select-data.
perform disconnect-connection.
Display "press Enter to Exit".
accept omitted.
stop run.

select-data.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
initialization-routine.
display "Enter datasource name: ",no.
accept dsn-name.
display "Enter your user id (default none): ",no.
accept userid.
display "Enter your password : ",no.
accept passwd-name.
inspect passwd-name tallying passwd-length for characters
before initial " ".
end-initialization-routine.

make-connection.
EXEC SQL CONNECT TO :dsn-name as C1
USER :userid USING :passwd
END-EXEC.

if sqlcode = 0 display "Connection successful...".
end-make-connection.

disconnect-connection.
EXEC SQL COMMIT END-EXEC.
EXEC SQL DISCONNECT ALL END-EXEC.

TEST-CAPACITEIT SECTION.
BEGIN.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
ENDS.
EXIT.
Sounds like some data is not reset the second round. Compare the data being used on the second round with the the data from the first round.

[Migrated content. Thread originally posted on 25 November 2010]

Hello,

I get sqlcode -2 in my testprogram the second time I call a section. This does not make any sence to me. Can someone help me with this. The section is called TEST-CAPACITEIT and works fine the first time.

WORKING-STORAGE SECTION.
EXEC SQL INCLUDE SQLCA END-EXEC.

EXEC SQL BEGIN DECLARE SECTION END-EXEC.
01 pDepId PIC 9(10).
01 pDepId1 PIC 9(10).
01 pDepId2 PIC X(10).
01 dsn-name pic x(12).
01 userid pic x(8).
01 passwd.
49 passwd-length pic s9(4) comp-5 value 0.
49 passwd-name pic x(18).
EXEC SQL END DECLARE SECTION END-EXEC.
******************************************************************
PROCEDURE DIVISION.
Main Section.

perform initialization-routine.
perform make-connection.
perform select-data.
perform disconnect-connection.
Display "press Enter to Exit".
accept omitted.
stop run.

select-data.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
initialization-routine.
display "Enter datasource name: ",no.
accept dsn-name.
display "Enter your user id (default none): ",no.
accept userid.
display "Enter your password : ",no.
accept passwd-name.
inspect passwd-name tallying passwd-length for characters
before initial " ".
end-initialization-routine.

make-connection.
EXEC SQL CONNECT TO :dsn-name as C1
USER :userid USING :passwd
END-EXEC.

if sqlcode = 0 display "Connection successful...".
end-make-connection.

disconnect-connection.
EXEC SQL COMMIT END-EXEC.
EXEC SQL DISCONNECT ALL END-EXEC.

TEST-CAPACITEIT SECTION.
BEGIN.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
ENDS.
EXIT.
Sounds like some data is not reset the second round. Compare the data being used on the second round with the the data from the first round.

[Migrated content. Thread originally posted on 25 November 2010]

Hello,

I get sqlcode -2 in my testprogram the second time I call a section. This does not make any sence to me. Can someone help me with this. The section is called TEST-CAPACITEIT and works fine the first time.

WORKING-STORAGE SECTION.
EXEC SQL INCLUDE SQLCA END-EXEC.

EXEC SQL BEGIN DECLARE SECTION END-EXEC.
01 pDepId PIC 9(10).
01 pDepId1 PIC 9(10).
01 pDepId2 PIC X(10).
01 dsn-name pic x(12).
01 userid pic x(8).
01 passwd.
49 passwd-length pic s9(4) comp-5 value 0.
49 passwd-name pic x(18).
EXEC SQL END DECLARE SECTION END-EXEC.
******************************************************************
PROCEDURE DIVISION.
Main Section.

perform initialization-routine.
perform make-connection.
perform select-data.
perform disconnect-connection.
Display "press Enter to Exit".
accept omitted.
stop run.

select-data.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
initialization-routine.
display "Enter datasource name: ",no.
accept dsn-name.
display "Enter your user id (default none): ",no.
accept userid.
display "Enter your password : ",no.
accept passwd-name.
inspect passwd-name tallying passwd-length for characters
before initial " ".
end-initialization-routine.

make-connection.
EXEC SQL CONNECT TO :dsn-name as C1
USER :userid USING :passwd
END-EXEC.

if sqlcode = 0 display "Connection successful...".
end-make-connection.

disconnect-connection.
EXEC SQL COMMIT END-EXEC.
EXEC SQL DISCONNECT ALL END-EXEC.

TEST-CAPACITEIT SECTION.
BEGIN.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
ENDS.
EXIT.
There is no difference the second time I perform the section.
I tried comp-5 and comp-3. The value this function returns is a numeric field without decimals and is always positive.

[Migrated content. Thread originally posted on 25 November 2010]

Hello,

I get sqlcode -2 in my testprogram the second time I call a section. This does not make any sence to me. Can someone help me with this. The section is called TEST-CAPACITEIT and works fine the first time.

WORKING-STORAGE SECTION.
EXEC SQL INCLUDE SQLCA END-EXEC.

EXEC SQL BEGIN DECLARE SECTION END-EXEC.
01 pDepId PIC 9(10).
01 pDepId1 PIC 9(10).
01 pDepId2 PIC X(10).
01 dsn-name pic x(12).
01 userid pic x(8).
01 passwd.
49 passwd-length pic s9(4) comp-5 value 0.
49 passwd-name pic x(18).
EXEC SQL END DECLARE SECTION END-EXEC.
******************************************************************
PROCEDURE DIVISION.
Main Section.

perform initialization-routine.
perform make-connection.
perform select-data.
perform disconnect-connection.
Display "press Enter to Exit".
accept omitted.
stop run.

select-data.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
initialization-routine.
display "Enter datasource name: ",no.
accept dsn-name.
display "Enter your user id (default none): ",no.
accept userid.
display "Enter your password : ",no.
accept passwd-name.
inspect passwd-name tallying passwd-length for characters
before initial " ".
end-initialization-routine.

make-connection.
EXEC SQL CONNECT TO :dsn-name as C1
USER :userid USING :passwd
END-EXEC.

if sqlcode = 0 display "Connection successful...".
end-make-connection.

disconnect-connection.
EXEC SQL COMMIT END-EXEC.
EXEC SQL DISCONNECT ALL END-EXEC.

TEST-CAPACITEIT SECTION.
BEGIN.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
ENDS.
EXIT.
:confused:Anyone?

[Migrated content. Thread originally posted on 25 November 2010]

Hello,

I get sqlcode -2 in my testprogram the second time I call a section. This does not make any sence to me. Can someone help me with this. The section is called TEST-CAPACITEIT and works fine the first time.

WORKING-STORAGE SECTION.
EXEC SQL INCLUDE SQLCA END-EXEC.

EXEC SQL BEGIN DECLARE SECTION END-EXEC.
01 pDepId PIC 9(10).
01 pDepId1 PIC 9(10).
01 pDepId2 PIC X(10).
01 dsn-name pic x(12).
01 userid pic x(8).
01 passwd.
49 passwd-length pic s9(4) comp-5 value 0.
49 passwd-name pic x(18).
EXEC SQL END DECLARE SECTION END-EXEC.
******************************************************************
PROCEDURE DIVISION.
Main Section.

perform initialization-routine.
perform make-connection.
perform select-data.
perform disconnect-connection.
Display "press Enter to Exit".
accept omitted.
stop run.

select-data.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
initialization-routine.
display "Enter datasource name: ",no.
accept dsn-name.
display "Enter your user id (default none): ",no.
accept userid.
display "Enter your password : ",no.
accept passwd-name.
inspect passwd-name tallying passwd-length for characters
before initial " ".
end-initialization-routine.

make-connection.
EXEC SQL CONNECT TO :dsn-name as C1
USER :userid USING :passwd
END-EXEC.

if sqlcode = 0 display "Connection successful...".
end-make-connection.

disconnect-connection.
EXEC SQL COMMIT END-EXEC.
EXEC SQL DISCONNECT ALL END-EXEC.

TEST-CAPACITEIT SECTION.
BEGIN.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
ENDS.
EXIT.
What version of AcuSQL are you running?

What database are you running against?

It will also be helpful to obtain a level 9 Runtime trace file. To do that add "-dlxe run.log" on the Runtime command line. Then, at the debugger prompt enter 'tf9', then 't flush', then 'g'.

[Migrated content. Thread originally posted on 25 November 2010]

Hello,

I get sqlcode -2 in my testprogram the second time I call a section. This does not make any sence to me. Can someone help me with this. The section is called TEST-CAPACITEIT and works fine the first time.

WORKING-STORAGE SECTION.
EXEC SQL INCLUDE SQLCA END-EXEC.

EXEC SQL BEGIN DECLARE SECTION END-EXEC.
01 pDepId PIC 9(10).
01 pDepId1 PIC 9(10).
01 pDepId2 PIC X(10).
01 dsn-name pic x(12).
01 userid pic x(8).
01 passwd.
49 passwd-length pic s9(4) comp-5 value 0.
49 passwd-name pic x(18).
EXEC SQL END DECLARE SECTION END-EXEC.
******************************************************************
PROCEDURE DIVISION.
Main Section.

perform initialization-routine.
perform make-connection.
perform select-data.
perform disconnect-connection.
Display "press Enter to Exit".
accept omitted.
stop run.

select-data.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
initialization-routine.
display "Enter datasource name: ",no.
accept dsn-name.
display "Enter your user id (default none): ",no.
accept userid.
display "Enter your password : ",no.
accept passwd-name.
inspect passwd-name tallying passwd-length for characters
before initial " ".
end-initialization-routine.

make-connection.
EXEC SQL CONNECT TO :dsn-name as C1
USER :userid USING :passwd
END-EXEC.

if sqlcode = 0 display "Connection successful...".
end-make-connection.

disconnect-connection.
EXEC SQL COMMIT END-EXEC.
EXEC SQL DISCONNECT ALL END-EXEC.

TEST-CAPACITEIT SECTION.
BEGIN.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
ENDS.
EXIT.
What version of AcuSQL are you running?

What database are you running against?

It will also be helpful to obtain a level 9 Runtime trace file. To do that add "-dlxe run.log" on the Runtime command line. Then, at the debugger prompt enter 'tf9', then 't flush', then 'g'.

[Migrated content. Thread originally posted on 25 November 2010]

Hello,

I get sqlcode -2 in my testprogram the second time I call a section. This does not make any sence to me. Can someone help me with this. The section is called TEST-CAPACITEIT and works fine the first time.

WORKING-STORAGE SECTION.
EXEC SQL INCLUDE SQLCA END-EXEC.

EXEC SQL BEGIN DECLARE SECTION END-EXEC.
01 pDepId PIC 9(10).
01 pDepId1 PIC 9(10).
01 pDepId2 PIC X(10).
01 dsn-name pic x(12).
01 userid pic x(8).
01 passwd.
49 passwd-length pic s9(4) comp-5 value 0.
49 passwd-name pic x(18).
EXEC SQL END DECLARE SECTION END-EXEC.
******************************************************************
PROCEDURE DIVISION.
Main Section.

perform initialization-routine.
perform make-connection.
perform select-data.
perform disconnect-connection.
Display "press Enter to Exit".
accept omitted.
stop run.

select-data.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
initialization-routine.
display "Enter datasource name: ",no.
accept dsn-name.
display "Enter your user id (default none): ",no.
accept userid.
display "Enter your password : ",no.
accept passwd-name.
inspect passwd-name tallying passwd-length for characters
before initial " ".
end-initialization-routine.

make-connection.
EXEC SQL CONNECT TO :dsn-name as C1
USER :userid USING :passwd
END-EXEC.

if sqlcode = 0 display "Connection successful...".
end-make-connection.

disconnect-connection.
EXEC SQL COMMIT END-EXEC.
EXEC SQL DISCONNECT ALL END-EXEC.

TEST-CAPACITEIT SECTION.
BEGIN.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
ENDS.
EXIT.
What version of AcuSQL are you running?

What database are you running against?

It will also be helpful to obtain a level 9 Runtime trace file. To do that add "-dlxe run.log" on the Runtime command line. Then, at the debugger prompt enter 'tf9', then 't flush', then 'g'.

[Migrated content. Thread originally posted on 25 November 2010]

Hello,

I get sqlcode -2 in my testprogram the second time I call a section. This does not make any sence to me. Can someone help me with this. The section is called TEST-CAPACITEIT and works fine the first time.

WORKING-STORAGE SECTION.
EXEC SQL INCLUDE SQLCA END-EXEC.

EXEC SQL BEGIN DECLARE SECTION END-EXEC.
01 pDepId PIC 9(10).
01 pDepId1 PIC 9(10).
01 pDepId2 PIC X(10).
01 dsn-name pic x(12).
01 userid pic x(8).
01 passwd.
49 passwd-length pic s9(4) comp-5 value 0.
49 passwd-name pic x(18).
EXEC SQL END DECLARE SECTION END-EXEC.
******************************************************************
PROCEDURE DIVISION.
Main Section.

perform initialization-routine.
perform make-connection.
perform select-data.
perform disconnect-connection.
Display "press Enter to Exit".
accept omitted.
stop run.

select-data.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
PERFORM TEST-CAPACITEIT.
initialization-routine.
display "Enter datasource name: ",no.
accept dsn-name.
display "Enter your user id (default none): ",no.
accept userid.
display "Enter your password : ",no.
accept passwd-name.
inspect passwd-name tallying passwd-length for characters
before initial " ".
end-initialization-routine.

make-connection.
EXEC SQL CONNECT TO :dsn-name as C1
USER :userid USING :passwd
END-EXEC.

if sqlcode = 0 display "Connection successful...".
end-make-connection.

disconnect-connection.
EXEC SQL COMMIT END-EXEC.
EXEC SQL DISCONNECT ALL END-EXEC.

TEST-CAPACITEIT SECTION.
BEGIN.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
move 254274 to pdepid1.
EXEC SQL
SELECT Bis$DSV.Bis$Get_DSV_Pct_Gevuld(:pDepId1)
INTO :PDEPID
FROM DUAL
END-EXEC.
ENDS.
EXIT.
I had help from Piet Henskens (Holland) and we found out that there had to be a bug in runtime version 8.11.
With 8.12 it works fine.

Andre.