Solved

ODBC "Connections" and Submintting Jobs from a PC

Posted on 2004-03-26
5
657 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 33

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 33

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 33

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Some of the SEO trends we might expect in 2017.
The business world is becoming increasingly integrated with tech. It’s not just for a select few anymore — but what about if you have a small business? It may be easier than you think to integrate technology into your small business, and it’s likely…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

832 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