I have posted a new utility to www.think400.dk/downloads.htm.

XVSETO (SetQueryOption) automates the process of setting a temporary
query option in file QAQQINI.

Normally to set a query option, you need to do the following steps.

1. Use CRTDUPOBJ to make a copy of QAQQINI into QTEMP.
2. Issue update to change query option to new value.
3. Issue CHGQRYA to point to copy in QTEMP.

All in all, a royal pain.

SetQueryOption automates this. For example, to set the default join
order, run the following in STRSQL.

CALL SETQUERYOPTION ('FORCE_JOIN_ORDER', '*YES')

To use in RPG program.

/Exec Sql CALL SETQUERYOPTION ('FORCE_JOIN_ORDER', '*YES');

or

/Exec Sql
+ CALL SETQUERYOPTION ('FORCE_JOIN_ORDER', '*YES')
/End-Exec

To reset the default,

CALL SETQUERYOPTION ('FORCE_JOIN_ORDER', '*DEFAULT')

Further information is in the readme packaged with the download.

Thanks to Leif for providing this great site.

This thread ...


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

This mailing list archive is Copyright 1997-2026 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.