We help IT Professionals succeed at work.
Get Started

SQL Disconnect statement in COBOL on the AS400

Last Modified: 2020-04-13
I have a COBOL program running on the AS400 which calls a SQL stored procedure. I just tried to add a statement to close the database connection and I'm getting compile errors. I'm also having trouble finding more information on the compilation errors. Is there a compile log created?

Here is the statement I've added:

              EXEC SQL
                              DISCONNECT DEFAULT


Here is the error message I'm getting:

Message ID . . . . . . :   LNC2903       Severity . . . . . . . :   40        
Message type . . . . . :   Information                                        
Date sent  . . . . . . :   06/14/11      Time sent  . . . . . . :   08:11:06  
Message . . . . :   Module VI918L not created in library QGPL because of      
  source statement errors.                                                    
Cause . . . . . :   The module was not stored because messages were issued    
  that were greater than or equal to the value specified for the GENLVL      
Recovery  . . . :   Correct the source statement errors and compile again.    

Watch Question
This problem has been solved!
Unlock 1 Answer and 7 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE