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



Peter,
Did you create your own UDF of QCMDEXC? We did. IBM supplies a stored procedure for QCMDEXC but not a UDF. Therefore, without a home grown udf for QCMDEXC I don't think this will work.

I had to swap an apostrophe and a parenthesis to this:
SELECT QCMDEXC('CRTDTAQ DTAQ(rob/myDtq) MAXLEN('
concat trim(char(AVGROWSIZE)) concat ')')
FROM QSYS2.SYSPARTITIONSTAT
WHERE SYSTEM_TABLE_SCHEMA = 'SYSIBM'
AND SYSTEM_TABLE_NAME = 'SYSDUMMY1'
;
However I still get
 SQL State: 42704 Vendor Code: -204 Message: [SQL0204] QCMDEXC in *LIBL type *N not found.

But if I change this to use our UDF
SELECT routines.QCMDEXC('CRTDTAQ DTAQ(rob/mydtaq) MAXLEN('
concat trim(char(AVGROWSIZE)) concat ')')
FROM QSYS2.SYSPARTITIONSTAT
WHERE SYSTEM_TABLE_SCHEMA = 'SYSIBM'
AND SYSTEM_TABLE_NAME = 'SYSDUMMY1'
;
It tries to build the data queue. That fails only because the avgrowsize of SYSDUMMY1 is -1 and they don't like to create data queues with that size. However, if I pick a different table it works fine!
SELECT routines.QCMDEXC('CRTDTAQ DTAQ(rob/mydtaq) MAXLEN('
concat trim(char(AVGROWSIZE)) concat ')')
FROM QSYS2.SYSPARTITIONSTAT
WHERE SYSTEM_TABLE_SCHEMA = 'ROB'
AND SYSTEM_TABLE_NAME = 'A'
;


Rob Berendt

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.