Page 1 of 1

IGYDS0225-S An "EXEC SQL" statement was found

PostPosted: Thu Jul 14, 2016 2:19 pm
by CobDummy
Hi,

Could someone please guide.

I am getting following error
"IGYDS0225-S An "EXEC SQL" statement was found, but the "SQL" compiler option was not in effect. The statement was discarded."


ID DIVISION.            
PROGRAM-ID. CALLSP.    
                       
DATA DIVISION.          
WORKING-STORAGE SECTION.
    EXEC SQL            
         INCLUDE SQLCA  
    END-EXEC.          
                       
PROCEDURE DIVISION.    
PROGRAM-BEGIN.          
    EXEC SQL            
         CALL SQLPROC1  
    END-EXEC.          
                       
PROGRAM-DONE.          
    STOP RUN.          

Re: IGYDS0225-S An "EXEC SQL" statement was found

PostPosted: Thu Jul 14, 2016 3:24 pm
by Robert Sample
In order to compile SQL statements, the compiler option SQL MUST be specified. The error message is clear - what part of it do you have trouble understanding?

Re: IGYDS0225-S An "EXEC SQL" statement was found

PostPosted: Thu Jul 14, 2016 4:05 pm
by CobDummy
Hi.. actually I am new in mainframes.. not sure what needs to be done can you please help

Re: IGYDS0225-S An "EXEC SQL" statement was found

PostPosted: Thu Jul 14, 2016 4:59 pm
by Robert Sample
Talk to your site support group and get their help. There are so many ways to compile a COBOL program -- through a batch job stream or through a TSO command or through a Unix command or through an ISPF option and the source can come from a PDS, through CA-LIBRARIAN, through Endevor, through Panvalet, etc -- that every site has their own way to compile programs. You need to find out -- from co-workers, your team leader, your manager, or your site support group -- how to compile a COBOL program with SQL statements. Since this is site-specific, there's not really anything anyone on this - or any other - forum can do to help you since we don't work at your site and have no idea how things are set up there. But there is a way at your site to specify options to the COBOL compiler, and you need to find that way and use it to add SQL to the options for your compile.

Re: IGYDS0225-S An "EXEC SQL" statement was found

PostPosted: Thu Jul 14, 2016 6:52 pm
by CobDummy
Thank you Robert. I will try to find out.