Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DB2 error "SQLCA" WAS NOT DEFINED

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging
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    Post subject: DB2 error "SQLCA" WAS NOT DEFINED
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Wed Mar 14, 2012 9:29 pm    Post subject: Reply to: DB2 error
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: 6968
Location: porcelain throne

PostPosted: Wed Mar 14, 2012 9:32 pm    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Wed Mar 14, 2012 10:03 pm    Post subject: Reply to: DB2 error "SQLCA" WAS NOT DEFINED
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us