Problem solve Get help with specific problems with your technologies, process and projects.

Syntax check your SQL statements in a source member

SQL is a wonderful tool, but a typo can burn us all. Don't let this happen to you. Check out this tip for a safety net.

You Can View User Feedback To This Tip

SQL is a wonderful tool, but a typo can burn us all. To ensure you have correctly typed SQL source statements you want to process via the RUNSQLTM command, use the RUNSQLSTM parameter PROCESS(*SYN) to first syntax check your statements. Just prompt the command and enter your parameters. If there are errors, you'll receive a message SQL9010. A report is also generated indicating the individual statement errors.

RUNSQLSTM SRCFILE(LIB/SOURCE) SRCMBR(MYSQLSRC) COMMIT(*NONE) PROCESS(*SYN)

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

The Best Web Links: tips, tutorials and more.

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

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.

Search400's targeted search engine: Get relevant information on SQL.

USER FEEDBACK TO THIS TIP

  • A similar facility is available in interactive SQL. Also, *VLD is more useful than *SYN.— Nick Hobson


Dig Deeper on iSeries CL programming

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close