<snip>
Using QCMDEXC as a stored procedure would work except that I do not want

to hardcode the library name in the GRTOBJAUT cmd. Also, I cannot use
the
libl that is active when the RUNSQLSTM cmd is executed. Looks like I'll

just have to put some comments in the source telling the next person to
be
sure and execute the GRTOBJAUT after running the RUNSQLSTM cmd. Thanks
for the idea, though.
</snip>

You can use my Compile command available at
www.think400.dk/downloads.htm to solve this problem.

I put something like this into my header and use compile to create the
object. In this example, I am creating a view but something could be
applied to an index. Just add the GRTOBJAUT to the end.

/* *_> CNLLSTSPLF SRCFILE(@2/@1) SRCMBR(@3)
*/
/* *_> DLTF FILE(@5/@4)
*/
/* *_> RUNSQLSTM SRCFILE(@2/@1) SRCMBR(@3) +
*/
/* *_> DFTRDBCOL(*NONE) CLOSQLCSR(*ENDMOD) ERRLVL(20)
*/
/* *_> MOVOBJ OBJ(*LIBL/@4) OBJTYPE(*FILE) TOLIB(@5)
*/
/* *_> CHGLF FILE(@5/@4) WAITFILE(*IMMED)
*/
Create View APPAYSUM As
Select VNDNR,
EPAYD,
Sum(BAGRS) As Gross,
Sum(BADIS) As Discount,
Sum(BAGRS - BADIS) As NetAmount,
CHKNO
From OPNPAYP
Group By VNDNR,
EPAYD,
CHKNO;

Just add a GRTOBJAUT, etc.

/* *_> GRTOBJAUT OBJ(@5/@4) OBJTYPE(*FILE) USER(*PUBLIC) AUT(*ALL) */





This thread ...


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

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