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



Hi Jerry,

I would be very surprised if you could define a constraint in a QTEMP
library. Constraints are not objects - they are SQL entries in the cross
reference tables (QSYS/QADBFCST IIRC) - and I don't know how one of those
entries could "point" to a QTEMP library for a specific job.

Regards

Paul Tuohy
ComCon
www.comconadvisor.com
www.systemideveloper.com


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jerry Adams
Sent: 06 December 2007 17:13
To: Midrange-L
Subject: QTEMP and SQL DDL

Whenever I try to use RUNSQLSTM to create a table from DDL statements
and use DFTRDBCOL(QTEMP), it fails - but only if the table has a key
constraint. Non-keyed tables are created without incident.

The error in the listing is: SQL0199 30 46 Position 29 Keyword
KEY not expected. Valid tokens: (.

The statement is: CONSTRAINT APOITM UNIQUE KEY( ASCO# , ASDIV# ,
ASDP# , ASACCT , ASSUB , ASVEN# , ASVREF , ASTRCD )
Not much in the job log except RUNSQLSTM failed.

Now, when is use PRIMARY, instead of UNIQUE, I get a job log message
CPD32B0 with reason code 15 - The file cannot be in the QTEMP library.
And the listing has: SQL7008 30 1 Position 1 APOITM in QTEMP not
valid for operation.

I've use RUNSQLSTM to process the DDL statements against other libraries
and the table gets created. And I have created, as I said, non-keyed
tables with DDL in QTEMP.

For what it's worth, I created the table using iNav and then generated
the SQL using iNav over that table.

Did I fubar the definition, or is this an SQL limitation?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.