AS400 Mid Range/userprofile user/authority on a cl
Expert: Concise Systems/Laird Scranton - 12/22/2007
QuestionQUESTION: i am using the following
dclf file(qaobjaut)
dcl var(&usroprf) type(*char) len(10)
dcl var(&authority) type(*char) len(1)
chgvar var(&authority) value(n') /*user profile +
not authorised. */
if cond(usrprf *eq 'qsecofr') then(goto+
cmdlibl(authorized))
dspobjaut obl(*libl/pramtp) objtype(*file)+
output(OUTFILE ) outfile(qtemp/qaobjaut)+
ovrdbf file(qaobjaut) tofile(qtemp/qaobjaut)+
mbr(*first)
read rcvf
msg blah blah blah
if cond(usrprf *eq &oaown then(goto +
cmdlibl(authorizated)
goto cmdlbl(read)
authorized: chgvar var(&authority) value(Y)
endpgm: endpgm
my question is where is this file kept so i can see it, nothing prints out, and is there other usrprf data there too?
ANSWER: I suggest you use two CL programs to accomplish your task. In the first, let the DSPOBJAUT command create the file in QTEMP library. Then OVRDBF to the file in QTEMP and call a second program that reads and processes the file.
- Laird
---------- FOLLOW-UP ----------
QUESTION: yes, but you didnt answer my question, where on the as400 is those files that contain userprofile authority levels, i am employees i want to verify are not authorised in some file
AnswerIt is the weekend, and I'm not in front of an AS/400, so I cannot check. But there may be an OUTFILE option on the DSPUSRPRF command that will create a file that creates authority attributes. To my knowledge, there is no permanent physical file that holds those values - they are part of the user profiles.
- Laird