Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ODBC "Connections" and Submintting Jobs from a PC

Posted on 2004-03-26
5
Medium Priority
?
678 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Working from home is a dream for many people who aren’t happy about getting up early, going to the office, and spending long hours at work. There are lots of benefits of remote work for employees.
Tech spooks aren't just for those who are tech savvy, it also happens to those of us running a business. Check out the top tech spooks for business owners.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

618 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