|
you need to use the following APIs QSYGETPH - Retrieve profile handle QWTSETP - Switch user ID (This one inputs the handle obtained from above api) hope this helps. -----Original Message----- From: Mike Wills [mailto:koldark@xxxxxxxxx] Sent: Tuesday, June 28, 2005 12:00 PM To: RPG programming on the AS400 / iSeries Subject: Re: Hoping there is an answer to this. I would want to change the user. I can easily figure out who the user is. On 6/28/05, Jonathan Mason <jonathan.mason@xxxxxxxxxxxxxxxx> wrote: > > Mike > > If you use the Retrieve Job Attributes API (QUSRJOBI) and use either > record format JOBI0300 or JOBI0400 you can find the qualified job name > of the submitting job. That may help. > > All the best > > Jonathan > www.astradyne-uk.com <http://www.astradyne-uk.com> > > > -----Original Message----- > From: rpg400-l-bounces@xxxxxxxxxxxx > [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Mike Wills > Sent: 28 June 2005 16:29 > To: RPG programming on the AS400 / iSeries > Subject: Re: Hoping there is an answer to this. > > The only way I can really describe it is that it is a server. I am > hacking a > vendor delivered program to write a customized report. It is run under > one > user for all users. In their printing it comes out under the user's > username. In my printing, it comes out under the server's username. Is > there > an API or something I can use to change this username? > > On 6/28/05, Paul Morgan <pmorgan@xxxxxxxxxxxxxx> wrote: > > > > Mike, > > > > Is the program adopting authority of the generic user to run in the > same > > job > > as the user (I doubt it)? Is the program being submitted by the users > to a > > batch job with the generic user? Is the report being run from a data > queue > > or something similar instead of being submitted? > > > > Paul > > > > -- > > Paul Morgan > > Senior Programmer Analyst - Retail > > J. Jill Group > > 100 Birch Pond Drive, PO Box 2009 > > Tilton, NH 03276-2009 > > Phone: (603) 266-2117 > > Fax: (603) 266-2333 > > > > Mike wrote > > > > I have a program that is run as a generic user (I can't control this). > I > > this program produces a report, but I want the report to come out as > the > > user running it (many different users run this). Is this possible? Do > you > > understand what I am trying to ask? > > > > > > > > -- > > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing > list > > To post a message email: RPG400-L@xxxxxxxxxxxx > > To subscribe, unsubscribe, or change list options, > > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > > or email: RPG400-L-request@xxxxxxxxxxxx > > Before posting, please take a moment to review the archives > > at http://archive.midrange.com/rpg400-l. > > > > > > > -- > Mike Wills > koldark@xxxxxxxxx > http://mikewills.name > Want Gmail? Email koldark+gmail@xxxxxxxxx to get on my waiting list. > -- > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing > list > To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > > > -- > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > >
As an Amazon Associate we earn from qualifying purchases.
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.