115 pts.
 comparing data on as400
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?

Software/Hardware used:
ASKED: March 27, 2008  6:39 AM
UPDATED: March 28, 2008  2:30 PM

Answer Wiki:
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
Last Wiki Answer Submitted:  March 28, 2008  2:30 pm  by  bvining   6,055 pts.
All Answer Wiki Contributors:  bvining   6,055 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

I have collected data through Graph history by exporting data to a local pc
Thanks a lot for your suggestion. It works great.

 115 pts.

 

I believe you are refering to a different question that you posed. The one I’m refering to is this one.

Bruce

 6,055 pts.