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
 

 

EXEC SQL found, but SQL compiler was not in effect

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: EXEC SQL found, but SQL compiler was not in effect
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: 7932
Location: Bellevue, IA

PostPosted: Mon Aug 08, 2011 8:35 pm    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7254

PostPosted: Mon Aug 08, 2011 9:17 pm    Post subject: Reply to: EXEC SQL found, but SQL compiler was not in effect
Reply with quote

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

Senior Member


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

PostPosted: Tue Aug 09, 2011 7:10 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm
No new posts Any docs / links for isub- cobol comp... SRICOBSAS COBOL Programming 4 Fri Aug 26, 2016 2:35 pm
No new posts Problem Compiling cobol code with Cob... amitc23 COBOL Programming 2 Wed Aug 24, 2016 1:50 pm


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