Ask the Expert

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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

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: