By
Published: 25 Mar 2005
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)
Create a host variable of the where in statement on the fly with dynamic SQL.
Continue Reading
To solve the SQL error -321 on IBM i6.1, use the new values statement to overcome the error. If you are using an older release, declare a cursor ...
Continue Reading
When working with DB2 files with columns that have both short and long names, there is no option choose which column names are returned via ODBC ...
Continue Reading