AS400 Mid Range/userprofile user/authority on a cl

Advertisement


Question
QUESTION: 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

Answer
It 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

AS400 Mid Range

All Answers


Answers by Expert:


Ask Experts

Volunteer


Concise Systems/Laird Scranton

Expertise

General AS/400, RPG/400, SDA and CL programming questions. AS/400 performance tuning.

Experience


Past/Present clients
CB Sportswear
Coca-Cola of New York
Encore Paper Company
Golub Corporation
HBO Home Video
Imperial Pools
Kaiser Permanente of NE New York
Mallinckrodt Medical
Marigold Foods
Manpower & Associates
National Datacomputers
New York State Easter Seals Society
New York State Food Merchants Association
Pepsi-Cola Allied Bottlers
Petricca Construction
Taconic Telephone Corporation
TOMRA Recycling
Unistress Corporation

©2012 About.com, a part of The New York Times Company. All rights reserved.