Q

Error with MYLIB function

I created the following function successfully in green screen STRSQL:

CREATE FUNCTION MYLIB/FrstMthDay
(DateIn DATE)
RETURNS Date
LANGUAGE SQL
RETURN Date(DateIn - Day(DateIn) Days + 1 Day)

When I tried to create the same function (after dropping it) through OpsNav GUI interface I received the error:

Token SQL was not valid. Valid tokens: C CL COBOL COBOLLE FORTRAN PLI RPG RPGLE JAVA.

Message ID: SQL0104

Cause . . . . . : A syntax error was detected at token SQL. Token SQL is not a valid token. A partial list of valid tokens is C CL COBOL COBOLLE FORTRAN PLI RPG RPGLE JAVA. This list assumes that the statement is correct up to the token. The error may be earlier in the statement, but the syntax of the statement appears to be valid up to this point.

We were not able to reproduce the problem when we tried it. It sounds like a bug. I would suggest applying the latest Database Group PTF on the server and installing the latest service pack for iSeries access. If the problem persists, report the problem to IBM support.

==================================
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.

This was first published in September 2005

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.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close