comparing data on as400

115 pts.
Tags:
AS/400
comparison
profiles
I have list of employee numbers. We create IDs on AS400 based on employee numbers. I want to compare if the employee numbers which I have, have the IDs on the AS400 system. If anyone has any script, where I an input the numbers and run it such that I get a result if those numbers of there on the system or not. Please let me know how can I accomplish this?
ASKED: March 27, 2008  6:39 AM
UPDATED: March 28, 2008  2:30 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Get a user profiles list with the folowing command:

DSPUSRPRF USRPRF(*ALL) OUTPUT(*OUTFILE) OUTFILE(<YOURLIB>/USRPRF)

In order to do that, I’lll recommend you to have a power profile (SECADM or SECOFR) on your 400 so you wont get security issues and get a complete list of user profiles.

Then, get into SQL using STRSQL on the command line and match / unmatch your profile with employee list like that:

To match user profile with employee list:

SELECT substr(UPuprf,4,5) as empno, UPTEXT FROM usrprf where empno in (SELECT digits( EMP#) from (<YOURLIB>/EMPLIST)

To see which user profile is not matching:

SELECT substr(UPuprf,4,5) as empno, UPTEXT FROM usrprf where empno not in (SELECT digits( EMP#) from (<YOURLIB>/EMPLIST)

Hope it help’s !
Have fun !
_________
Taz

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Srinivas naikk
    I have collected data through Graph history by exporting data to a local pc Thanks a lot for your suggestion. It works great.
    115 pointsBadges:
    report
  • bvining
    I believe you are refering to a different question that you posed. The one I'm refering to is this one. Bruce
    6,240 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following