View previous topic :: View next topic
|
Author |
Message |
madhan r
New User
Joined: 29 Jul 2011 Posts: 4 Location: INDIA
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
madhan r
New User
Joined: 29 Jul 2011 Posts: 4 Location: INDIA
|
|
|
|
can anyone explain wat r the causes for this error........... am using dclgen copybook |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
I suggest you re-read Robert's reply. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
|