• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Admin Alert: The Joys of Creating User Profile Information Files

    April 7, 2004 Joe Hertvik

    Inside an OS/400 partition, there are always questions about user profiles and how they are configured. These questions, including the last time user passwords were changed, which profiles have expired, and which users have which authorities, may require you to search through dozens of user profiles to get answers. I find it’s helpful to create and maintain a user profile information file for centralizing such information.

    A user profile information file contains the complete set of user profile parameters that are defined for one profile, a subset of your OS/400 user profiles, or all of the iSeries or AS/400 user profiles in your shop. You create this file by redirecting the Display User Profile (DSPUSRPRF) command information into an output file. To create this file for all users on an OS/400 partition, for example, run the command with these parameters:

    DSPUSRPRF  USRPRF(*ALL) TYPE(*BASIC) OUTPUT(*OUTFILE)
       OUTFILE(LIB/FILENAME)
    

    This command creates a complete file listing of all the parameters that are assigned to each user profile in your partition. Information about each user and group profile is contained inside individual records. This file can be used in OS/400 queries or can be downloaded into a database program, like Microsoft Access, or into a Microsoft Excel spreadsheet, for further processing. Here are just a few pieces of information that you can glean by working with this file:

    • Which users are consuming the most storage on your system? (Sort the file by the Storage Used field, UPMXSU.)

    • Which user profiles have been unused for the longest period of time? (Sort the file by the Previous Sign-On Date field, UPPSOD).

    • Which user profiles are disabled? (Display all records that contain the word *DISABLED in the Status field, UPSTAT.)

    • Which profiles have passwords that will never expire? (Look for records with a -1 in the Password Expiration Interval field, UPPWEI.)

    And there’s a lot more information you can find by just opening the file inside a database program. Look at the file’s field layout, after you’ve created it, to determine what type of information you can retrieve.

    But there are also a few tricks to keep in mind when creating your user profile information file. In particular, remember these three points:

    1. You can only send DSPUSRPRF information to an output file when you designate the type of information parameter (TYPE) as *BASIC. For most of the other DSPUSRPRF TYPE values–including user Device Authority (when the TYPE parameter equals *DEVAUT) and Object Authority (setting TYPE equal to *OBJAUT)–the information can only be displayed or printed; it cannot be captured to an output file.
    2. You can also create user profile information files that contain subsets of your OS/400 profiles or files that contain information for only one individual user profile. If all accounting user profiles start with the letters AC, for example, you could create a user profile information file with just those user IDs by entering the DSPUSRPRF command, like this:
    3. DSPUSRPRF USRPRF(AC*) TYPE(*BASIC) OUTPUT(*OUTFILE) 
         OUTFILE(LIB/FILENAME)
      

      For user profile subsets, use the common starting letters of each profile name you want to capture in the output file as a wildcard character (for example, AC for accounting).

      Please participate in our iSeries programming survey at
      http://www.surveymonkey.com/s.asp?u=74193419903

      If you wanted to dump the user profile information for just one user into a file, you would enter the command this way:

      DSPUSRPRF USRPRF(USERIDNAME) TYPE(*BASIC) 
         OUTPUT(*OUTFILE) OUTFILE(LIB/FILENAME)
      

      Also be aware that creating a profile information file by using DSPUSRPRF this way will generate a completely new file each time it runs. This function is performed through the Output member options parameter (OUTMBR) of DSPUSRPRF, which is set to replace file records by default (OUTMBR equals *REPLACE). If you want to change the command so that it appends your new records to an existing file, run DSPUSRPRF this way with the second value of the OUTMBR parameter set to *ALL, like this:

      DSPUSRPRF USRPRF(USERIDNAME) TYPE(*BASIC) OUTPUT(*OUTFILE)
         OUTFILE(LIB/FILENAME) OUTMBR(*FIRST *ADD)
      
    4. The DSPUSRPRF generated outfile is modeled on the QADSPUPB file in the QSYS library, and it uses the QSYDSUPB format inside that file. So if you wanted to open your user profile information file for more advanced processing inside a CL or an RPG program, code and compile your program using QADSPUPB and then override the QADSPUPB file at runtime, with the information file you created through the DSPUSRPRF command.

    As you see, there are many benefits to listing your user profile information inside a DSPUSRPRF output file. Try it yourself and see if it answers user profile questions in your shop.

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    OCEAN User Group

    OCEAN TechCon25 Online

    It’s an Exciting Time for IBM i !

    July 16 & 17, 2025 – ONLINE

    Two virtual days of learning, presented by an outstanding group of IBM’ers and IBM Champions, featuring leading-edge topics.

    FREE for OCEAN members!

    Register NOW!

    Annual (12-month) Individual OCEAN Memberships are $80 and a Corporate Membership is $250. A Corporate Membership would allow your entire company to have full access to the OCEAN website & video library and to attend OCEAN events at member rates. Act now because rates are increasing on August 1, 2025.

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tango/04 Launches New Message Log Monitor Will On Demand Put iSeries in Demand? Not Likely, Says Gartner

    Leave a Reply Cancel reply

Volume 4, Number 11 -- April 7, 2004
THIS ISSUE
SPONSORED BY:

Advanced Systems Concepts
Guild Companies
WorksRight Sofware
COMMON
Client Server Development

Table of Contents

  • ILE in Practice
  • Using Exception Breakpoints in WDSc
  • Using Filters in the Remote Systems LPEX Editor
  • Admin Alert: The Joys of Creating User Profile Information Files
  • OS/400 Alert: Microsoft Previews Windows XP Service Pack 2

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • With Power11, Power Systems “Go To Eleven”
  • With Subscription Price, IBM i P20 And P30 Tiers Get Bigger Bundles
  • Izzi Buys CNX, Eyes Valence Port To System Z
  • IBM i Shops “Attacking” Security Concerns, Study Shows
  • IBM i PTF Guide, Volume 27, Number 26
  • Liam Allan Shares What’s Coming Next With Code For IBM i
  • From Stable To Scalable: Visual LANSA 16 Powers IBM i Growth – Launching July 8
  • VS Code Will Be The Heart Of The Modern IBM i Platform
  • The AS/400: A 37-Year-Old Dog That Loves To Learn New Tricks
  • IBM i PTF Guide, Volume 27, Number 25

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle