[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ORA -2108

Posted on 2004-11-11
5
Medium Priority
?
3,206 Views
Last Modified: 2008-01-09
Hi Experts,

I am trying to get SEQ_table.nextval in a Net Express 4.0 COBOL program, which uses Oracle 10 Pro COBOL pre-compiler. I am getting ORA-2108 without any description of the error. Have any one got the similar kind of problem before. I need help in this matter since nobody seems to know whats wrong with SQL...

Below is my SQL:

I am using a working storage varaible: to store the following SQL:

WS-SQL = 'SELECT SEQ_TABLE.nextval
                    into :WS-RSLT-VALUE from DUAL '

EXEC SQL
        EXECUTE IMMEDIATE : WS-SQL
END-EXEC

Thanks,
Baluch.
 
0
Comment
Question by:baluch
5 Comments
 
LVL 5

Expert Comment

by:Zopilote
ID: 12558442
ORA-02108: PCC: invalid descriptor passed to run-time library
Cause: This internal error typically indicates a memory-related error.
Action: Check the program for memory-related errors, such as invalid pointers or array-bounds violations.

Did you try directly?

EXEC SQL
        EXECUTE IMMEDIATE  'SELECT SEQ_TABLE.nextval into :WS-RSLT-VALUE from DUAL '
END-EXEC

Z;D
0
 
LVL 13

Expert Comment

by:anand_2000v
ID: 12563011
In Pro-Cobol I think you have to use
EXEC SQL
        EXECUTE IMMEDIATE :WS-SQL  USING :WS-RSLT-VALUE
END-EXEC
0
 

Author Comment

by:baluch
ID: 12598446
Instead of EXECUTE IMMEDIATE, I change the SELECT SQL into a PREPARE statement and that did the trick.
Thanks,
Baluch.
0
 
LVL 13

Expert Comment

by:anand_2000v
ID: 12624007
I have requested for a PAQ....The answer was obtained by the asker and I do not want points for this.
http://www.experts-exchange.com/Community_Support/Q_21213037.html
0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 12624161
baluch, a request was made to refund your points and PAQ this question.

Question PAQ'd
125 points refunded.

CetusMOD
Community Support Moderator
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Suggested Courses
Course of the Month19 days, 14 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question