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

EXEC SQL found, but SQL compiler was not in effect


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
madhan r

New User


Joined: 29 Jul 2011
Posts: 4
Location: INDIA

PostPosted: Mon Aug 08, 2011 8:30 pm
Reply with quote

hi friends i have got an error like
an EXEC SQL statement was found, but SQL COMPILER WAS NOT IN EFFECT...
******************************************************************
* WORKING STORAGE INCLUDE FOR SQL COMMUNICATION AREA *
******************************************************************
EXEC SQL
INCLUDE SQLCA
END-EXEC.
******************************************************************
* WORKING STORAGE INCLUDE FOR CAT MAINT *
******************************************************************
EXEC SQL
INCLUDE CATMAINT
END-EXEC.
******************************************************************
HELP ME
with regards
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Aug 08, 2011 8:35 pm
Reply with quote

You need to talk to your site support group, team leader, or coworkers about using a site-standard compile procedure rather dthan developing your own. If you are using a site-standard compile procedure, you need to find out (from one of them) how to modify it to use the COBOL option SQL instead of NOSQL.
Back to top
View user's profile Send private message
madhan r

New User


Joined: 29 Jul 2011
Posts: 4
Location: INDIA

PostPosted: Mon Aug 08, 2011 9:02 pm
Reply with quote

can anyone explain wat r the causes for this error........... am using dclgen copybook
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: Mon Aug 08, 2011 9:17 pm
Reply with quote

I suggest you re-read Robert's reply.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Aug 09, 2011 7:10 pm
Reply with quote

Robert has explained it well, re-read Robert's reply.

Quote:
an EXEC SQL statement was found, but SQL COMPILER WAS NOT IN EFFECT...
This is a plain English - a COBOL-DB2, as mesage says too, has SQL too and COBOL compiler does not understand SQLs.

As a first step, you use DB2 Precompile; which performs three functions. First, it checks the SQL in the program for errors. Second, it adds working storage areas and source code compatible statements that are used to invoke DB2. One of the working storage areas contains a literal "timestamp" called a consistency token. Finally, all of the SQL statements are extracted from the program source and placed into a member called the DataBase Request Module, or DBRM, which also contains the consistency token.

Second step is compile and third is link-edit. Then you've step-4, DB2 BIND.

As this is a "standard process", to do all this every shop has its own way of doing it, as Robert has alos mentioned. We, from a Forum, can give such a JCL which will do this BUT it's not advisable to use such JCL. So as Robert says, "talk to your site support group, team leader, or coworkers about using a site-standard compile procedure rather dthan developing your own."
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How I Found a Bug in a FORTRAN Compiler All Other Mainframe Topics 4
No new posts JCL EXEC PARM data in C Java & MQSeries 2
No new posts A directory in the pathname was not f... ABENDS & Debugging 0
No new posts I need a 4 lines block where substrin... DFSORT/ICETOOL 12
No new posts Issue with EXEC CICS QUERY SECURITY c... CICS 6
Search our Forums:

Back to Top