View previous topic :: View next topic
|
Author |
Message |
Kalyan Padigala
New User
Joined: 15 Feb 2012 Posts: 4 Location: Raleigh, NC
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Kalyan Padigala
New User
Joined: 15 Feb 2012 Posts: 4 Location: Raleigh, NC
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Kalyan Padigala
New User
Joined: 15 Feb 2012 Posts: 4 Location: Raleigh, NC
|
|
|
|
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 |
|
|
Kalyan Padigala
New User
Joined: 15 Feb 2012 Posts: 4 Location: Raleigh, NC
|
|
|
|
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 |
|
|
|