IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DB2 error "SQLCA" WAS NOT DEFINED


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Kalyan Padigala

New User


Joined: 15 Feb 2012
Posts: 4
Location: Raleigh, NC

PostPosted: Wed Mar 14, 2012 9:15 pm
Reply with quote

Hi,

I am getting the following error when compiling cobol-db2 program.

IGYPS2121-S "SQLCA" WAS NOT DEFINED AS A DATA-NAME.
THE STATEMENT WAS DISCARDED.

i read some of the answers specified in this blog but could not find the solution to my problem.

Please help.

Thanks
Kalyan
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Mar 14, 2012 9:29 pm
Reply with quote

It is not really an abend-or-debugging-situation is it?

You are trying to reference something called SQLCA in your program. Nothing has defined it. So the Compiler moans. It'll do it every time.

If you want SQLCA (although if you don't have other errors, you don't seem to be using it) find out how you should define it.

If you don't want it, consider how to delete the line containing it.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Mar 14, 2012 9:32 pm
Reply with quote

well, first of all this is a forum, not a blog.

sounds as if you do not have an EXEC SQL INCLUDE SQLCA END-EXEC
statement.

but if you have that,
then you have skipped the db2 pre-compiler step prior to cobol compiler,
or if you are using Enterprise COBOL, then you have not optioned db2.

if the first, insert the SQL INCLUDE statement.
if the second, ask someone at your site.
Back to top
View user's profile Send private message
Kalyan Padigala

New User


Joined: 15 Feb 2012
Posts: 4
Location: Raleigh, NC

PostPosted: Wed Mar 14, 2012 9:59 pm
Reply with quote

Hi,

I have the SQLCA defined in my program.

EXEC SQL
INCLUDE SQLCA
END-EXEC.


and I use Endevor for compiling the program and I am also getting errors like

THE PARAGRAPH OR SECTION PRIOR TO PARAGRAPH OR SECTION "99000-DB2-ERROR-OR-WARNING" DID NOT CONTAIN ANY
STATEMENTS.


Please advise.


Thanks
Kalyan
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Mar 14, 2012 10:03 pm
Reply with quote

It should help if you can do some things we can't.


    Look at your output listing
    Find out from colleagues how they do something similar

If still stuck, come back and show us the lines from the output listing in error, and a few on either side.
Back to top
View user's profile Send private message
Kalyan Padigala

New User


Joined: 15 Feb 2012
Posts: 4
Location: Raleigh, NC

PostPosted: Thu Mar 15, 2012 12:44 am
Reply with quote

Hi Bill,

Thank you very much for the response.

I have compiled the program with the correct processor group and that solved the problem of getting error.

But still I get the following error saying that

IGYPS2015-I THE PARAGRAPH OR SECTION PRIOR TO PARAGRAPH OR SECTION "99000-DB2-ERROR-OR-WARNING" DID NOT CONTAIN ANY
STATEMENTS.

Even though I have statements in that para.

Please advise.

Thanks
Kalyan
Back to top
View user's profile Send private message
Kalyan Padigala

New User


Joined: 15 Feb 2012
Posts: 4
Location: Raleigh, NC

PostPosted: Thu Mar 15, 2012 12:53 am
Reply with quote

Thank you everyone for helping me. The program is working fine for me. I read the forum with the same error and it is resolved now.

Thanks
Kalyan
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
Search our Forums:

Back to Top