Home > Ask the AS/400 Experts > iSeries Web Development Questions & Answers > Stored procedure that calls CLP program with STRQMQRY causes errors
Ask The iSeries 400 Expert: Questions & Answers
EMAIL THIS

Stored procedure that calls CLP program with STRQMQRY causes errors

Jim Mason EXPERT RESPONSE FROM: Jim Mason

Pose a Question
Other iSeries 400 Categories
Meet all iSeries 400 Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 16 April 2003
I've created a stored procedure that calls a CLP program with STRQMQRY. The query creates an output file.

 CREATE PROCEDURE QGPL/TEST1(IN DATE_FROM CHAR (7 ),
 IN DATE_TO CHAR 
 (7 )) NOT DETERMINISTIC NO SQL EXTERNAL NAME
 QGPL/GIONATA1          
 PARAMETER STYLE GENERAL 

When I try to call this procedure, the command STRQMQRY finds the following error: SQLCODE -487. What's going on?


>

Based on the error code, it looks like you're missing a clause on the create procedure statement. I've attached the options below you can use. I suspect the last one listed is the one you want (modifies SQL data). If that gives an error, try the first (contains SQL). I've done calls to host programs running SQL returning result sets but not calling strqmqry...

*******************************************

CONTAINS SQL, READS SQL DATA, MODIFIES SQL DATA, or NO SQL

Specifies which SQL statements, if any, may be executed in the procedure or any routine called from this procedure. See Appendix C, Characteristics of SQL Statements for a detailed list of the SQL statements that can be executed under each data access indication.

CONTAINS SQL
Specifies that SQL statements that neither read nor modify SQL data can be executed by the procedure.

NO SQL
Specifies that the procedure cannot execute any SQL statements.

READS SQL DATA
Specifies that SQL statements that do not modify SQL data can be included in the procedure.

MODIFIES SQL DATA
Specifies that the procedure can execute any SQL statement except statements that are not supported in procedures.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

Ask your Web development questions--or help out your peers by answering them--in our live discussion forums.

The Best Web Links: tips, tutorials and more.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
iSeries Web Development
JDBCODBC functionality -- Java to Excel for complex workbooks
Accessing AS/400 data using Excel ODBC drivers
IBM WebSphere Studio Application Developer error
Database pooling on iSeries
Connecting WebSphere to AS/400 for image retrieval
Retrieving the value selected by a user
Condense ILE service program procedures
WebSphere error during login process
Connecting WebSphere to a DB2 database
WebFacing error: User ID or password invalid

Web Development
Implementing a browser interface in COBOL: Creating your graphic Web page
Implementing a browser interface in COBOL: Getting started
IBM i shop boosts online sales with RPG-based Web platform
Migrating from RPG to EGL on IBM i
Groovy programming on IBM i
Running PHP open source applications: NOBODY needs authority
Zend Web software teams up with IBM System i
The best technologies and tools for System i programmers in 2009
Seven IBM i project lessons learned in 2008
AS/400 lessons from the past, present, and future: A holiday tale

iSeries Java programming
Groovy programming on IBM i
EGL Rich UI on IBM i: Do you Dojo?
Programming for the Web on the IBM i, what is possible
Database performance comparisons on IBM i
Database drivers on the i: MySQL vs. IBM Toolbox
How to: Output SQL script to a text file from an AS/400
Application modernization for the iSeries: Why bother?
JDBCODBC functionality -- Java to Excel for complex workbooks
Necessity leads to iSeries Watchdog development
Accessing AS/400 data using Excel ODBC drivers
iSeries Java programming Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
WebSphere Development Studio Client (WDSC)  (Search400.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



iSeries Networking - Printing, Remote Access, TCP/IP
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts