There is a SQL special register - USER. She can use that if she's
interested in "this", current user:

INSERT INTO library.myfile (DEVGFT, DEVPLG, DEVPG, DEVTOTC, DEVDOD)
(SELECT SUM(TOTAMT), SUM(PLBALD), SUM(PGEAMT), COUNT(TOTAMT), USER
FROM library.MMRGDB201)

Elvis

Mike Cain - DB2 for i5/OS Temporary Indexes - The Good, The Bad, The Ugly
October 16
2007 System i Fall Technical Conference | Orlando | November 4-7
Celebrating 10-Years of SQL Performance Excellence on IBM System i, eServer
iSeries and the server affectionately known as the AS/400

-----Original Message-----
Subject: Re: SQL Insert summary data from a file plus "other" data

Mary,

I don't know a strictly SQL solution (there may be one), but if this is
run from a CL, you could use the RTVJOBA USER(&DEVDOD). From within an
RPG IV program, the current user is in positions 358 - 367 pf the PSDS
(Program Status Data Structure).


* Jerry C. Adams


This thread ...

Replies:

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