Solved

ODBC "Connections" and Submintting Jobs from a PC

Posted on 2004-03-26
5
654 Views
Last Modified: 2011-04-14
I have been useing ODBC Connections for a long time.  One thing that has always buged me is the "UserName" is always QUSER.

Well I have lived with it.  Until now.
Today I started calling AS/400 Programs from inside MS Acess.
Basicly I call a CL that submits a RPG program.
My issue is that the "Username" the job is running under is QUSER and not the person who signed in to the AS/400 when prompted to run the job.

Is there any way to change this??
0
Comment
Question by:ScottParker
  • 3
5 Comments
 
LVL 32

Expert Comment

by:shalomc
ID: 10696527
Are you concerned about security, or does your application need the actual user name?
0
 
LVL 14

Expert Comment

by:daveslater
ID: 10697993
Hi

the easy way is to pass the user id as a parm to the cl, then use the user id parm on the smbjob command.

Dave
0
 
LVL 32

Accepted Solution

by:
shalomc earned 500 total points
ID: 10698067
Hey,
try

DCL VAR(&CURUSER) TYPE(*CHAR) LEN(10)
RTVJOBA CURUSER(&CURUSER)

to find who the real user is.

ShalomC
0
 
LVL 6

Expert Comment

by:dedy_djajapermana
ID: 10703547
Hi,

AFAIK, the job name is always under QUSER, however, inside the job, there's a step that call some API to "change" the job state to run under the submitting user (although it still appear as running under QUSER job).
I may be wrong, i haven't tested it, but if you want to make sure, try to explicitly exclude QUSER from the file that your RPG program referring to (i think it will run successfully), and try to explicitly exclude the submitting user from the file and run it again (this time it should fail).
Sorry that i didn't have time to test it, I'll test it tomorrow if you're willing to wait.

regards,
dd
0
 
LVL 32

Expert Comment

by:shalomc
ID: 10705858
Hey,
Although the job name in wrkactjob is QUSER, the job actually runs under all the privileges and authorizations of the logged in user. If you look at the system data structure in RPG, you will see the logged in user rather than QUSER.

In a CL, you should check the CURUSER attribute of a job (like I indicated previously).

Therefore, there is no security breach And there is a way for the application to find out who the logged in user is.

ShalomC
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A safe way to clean winsxs folder from your windows server 2008 R2 editions
Use of TCL script on Cisco devices:  - create file and merge it with running configuration to apply configuration changes
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now