× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks for suggestions.

I have looked at the documentation and actually lifted the original code
from the IBM site.
The error is occurring during the compilation process, and not the
syntax parsing phase.

I have tried it with and without the begin/end block, to no avail.

For example, dropping the using 'password' clause

4 connect to misi9001 user myuser;

causes the syntax parser to throw:

SQL0104 30 4 Position 32 Token ; was not valid. Valid tokens: USING.

The original error from the compiler listing seems to be an issue with what
happens to the password string. I encode the password in the using clause in the script:

4 connect to misi9001 user myuser using 'mypwd';

However the compiled listing shows:

79 EXEC SQL CONNECT TO MISI9001 USER MYUSER USING ' ;

And the errors generated are:

5722SS1 V5R4M0 060210 Create SQL ILE C Object TFRTBLDTA
DIAGNOSTIC MESSAGES
MSG ID SEV RECORD TEXT
SQL0010 35 79 Position 48 String constant beginning ' ; ' not
delimited.
SQL0107 30 79 Position 48 ' ; too long. Maximum 128 characters.
SQL0084 30 79 Position 10 SQL statement not allowed.
Message Summary

It seems like it's not expecting the password in the statement In fact the
EXEC statement hasn't just hidden it. It seems to have omitted the password
and the trailing quote. I'm presuming that a CONNECT is permitted in a script.


I presume you're doing the usual RUNSQLSTM stuff with your source in a
source file to create the procedure?

Is that source file the standard 80 characters or not? If not, make it
so.

The stored procedure one feeds to RUNSQLSTM cascades to C source and
that, in turn, is fed to the C SQL precompiler which really likes it
column limits (as does RUNSQLSTM as I recall). If your example goes out
past the column limits, some very strange stuff can happen to you. The
diagnostic you show sure looks like that kind of problem whether it is
in your own source or in the C source created by RUNSQLSTM.

It looks like most of the password string and the semi-colon following
it are being ignored. This happens to me if I get into that whole issue
of going past column 80 somehow.


Larry Loen
Application Performance Group



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.