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



<snip>
But today I tried creating a file in QTEMP from DDL. The procedure (CL)

issued a SQL9010 error (RUNSQLSTM command failed). Higher up in the
joblog is CPD32B0 (Constraint is not valid):
</snip>

The correct way to do this is to use a

Exec Sql Declare Global Temporary Table TempError
( MsgID Dec(7,0) Not Null with Default ,
MsgType Char(32) Not Null with Default ,
MsgText Char(1024) Not Null with Default );

Global tables are quicker to run and they are not put into the database
so they create very quickly. For years this was a major weakness of SQL
on the AS/400 is that we did not have temporary tables. Now we do. I
believe this was V5R2.

You reference them in your code, for example, as

Exec Sql Select <your list> From Qtemp/TempError;




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.