?
Solved

ODBC "Connections" and Submintting Jobs from a PC

Posted on 2004-03-26
5
Medium Priority
?
682 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 2000 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Applications for our next round of the Experts Exchange Scholarship Contest are starting to roll in. It made us wonder what our past winners are up to these days. Here's a look at what four winners experienced with the contest and what they're doing…
If anyone asked you to network diagram of the internet, it was drawn in the form of a fluffy cloud which further became known as cloud computing. Popularly cloud computing is defined as workloads that run over the internet in a commercial provider’s…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month15 days, 9 hours left to enroll

850 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