Q
Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Using RUNSQLSTM in a CL program

I'm just learning how to use RUNSQLSTM in a CL program. In my SQL source member I'm trying to INSERT into a file using a SELECT statement and I'm using the function TRANSLATE on one of the fields I'm selecting. When I call my CL program I'm getting error: "IBM SQL Flagging -- Reserved word TRANSLATE used as an SQL identifier."

Is there a way around this? I really like the fact that I can run multiple SQL statements in one call.

Take a look at the "IBM SQL Flagging" parm (SAAFLAG) in the RUNSQLSTM command and make sure the value is set to *NOFLAG (which is the default). If this parm is set to *FLAG, it basically instructs the system to first check to the statement syntax to determine if conforms to IBM SQL syntax. If it does not conform, you will get the error that you described.

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

Visit the ITKnowledge Exchange and get answers to your DB2 questions fast.

Check out this Search400.com Featured Topic: Expert advice on DB2

Search400.com's targeted search engine: Get relevant information on DB2/400.

The Best Web Links: Tips, tutorials and more.

Dig Deeper on DB2 UDB (universal databases)

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close