The Compare User Profile 2 command compares the information between
single or multiple user profiles on the current system to the same
user profile information from a different system or a different
version on the current system. The DSPUSRPRF outfile function must
be used to capture the information to be compared.
CMPUSRPRF2 may be used to determine:
** That profiles match on different systems.
** The changes that have occurred to user profiles on the current
The major attributes which are not compared are:
- Owner of the user profile
- Text description
- Status (Enabled or Disabled)
- Document password
- Create date and time
You must have *ALLOBJ authority to use CMPUSRPRF2.
Comparing profiles on different systems
Assume you want to compare the JONES profile on two systems. First
capture the information on the second system with a DSPUSRPRF command
DSPUSRPRF USRPRF(JONES) TYPE(*BASIC) OUTPUT(*OUTFILE)
Transfer the USRPRFP file to your own system and use the command:
CMPUSRPRF2 USRPRF(JONES) USRINF(xxx/USRPRFP)
A spooled file would be output with any differences.
Any name may be used for the USRINF file, but the file must have been
output by DSPUSRPRF using TYPE(*BASIC).
You can capture all or many profiles in the same DSPUSRPRF outfile by
using *ALL or a generic name on DSPUSRPRF or by using multiple
DSPUSRPRF commands and adding to the same file (see the OUTMBR
parameter). CMPUSRPRF2 allows a comparison of:
- A single user profile
- A generically named user profile
- All user profiles
- All system supplied user profiles
- All user profiles
A DDM file may be used rather than transferring the outfile to the
A few values that do not exist on CRTUSRPRF are compared such as
whether the user profile is a group profile.
Spooled files output
Two different spooled files are output:
** Summary (USRPRFSUM), if multiple user profiles are compared.
This file is only output if a generic user profile name is
specified or one of the special values such as *ALLUSR. The
file has one line per user profile. The file will also
include a list of any user profiles that have been deleted.
** Detail (USRPRFDTL), to explain any differences. If no
differences exist, this spooled file may be deleted by
Comparing to the same system information
If you periodically capture all user profile information with
DSPUSRPRF and store it in a file (such as a separate member per
month), you can use CMPUSRPRF2 to determine the changes that have
occurred on your own system. This can be helpful when problems arise
or auditing requires a determination of what has changed.
Two functions are supported:
** Comparing against the current values. You must specify the
USRINF and MBR parameters for the information that was
previously captured (such as last month) with the DSPUSRPRF
OUTFILE function. The USRINF2 and MBR2 parameters should be
defaulted. DSPUSRPRF is run internally to create the outfile
of current information.
** Comparing two versions that were previously captured with the
DSPUSRPRF OUTFILE function. For example, if you capture
information every month and it is now March and you want to
compare the January and February versions. Specify both the
USRINF/MBR and USRINF2/MBR2 parameters to describe the
file/members to be compared.
Differences with TAA CMPUSRPRF command
CMPUSRPRF compares two profiles on the current system.
CMPUSRPRF2 compares one or more user profiles with information stored
in the outfile of DSPUSRPRF. The normal use is to compare the same
user profile on multiple systems.
CMPUSRPRF2 escape messages you can monitor for
TAA9893 User profile does not exist in the USRINF file
TAA9895 Differences exist (optional based on ESCAPE parm)
Escape messages from based on functions will be re-sent.
Comparing information created on a different release
It is valid to compare user profile information between different
releases. If the current release is at a higher level than the
system being compared to, any additional user profile values that
exist on the current system will appear as differences (the downlevel
information will normally appear as blanks).
If the system on which CMPUSRPRF2 is used is downlevel, any new
attributes will not be compared.
Command parameters *CMD
USRPRF The name of the user profile to be compared. The
user profile must exist on the current system and
will be compared to the same user profile
information found in the file described by the
A specific name, a generic name, *ALLUSR, *ALLIBM,
or *ALL may be specified.
USRINF The qualified name of the file that contains the
user profile information. The file must have been
created by the DSPUSRPRF OUTFILE TYPE(*BASIC)
function. The library defaults to *LIBL. *CURLIB
may also be used.
The DSPUSRPRF OUTFILE function creates one record
for each requested profile. CMPUSRPRF2 will search
the file for the user profile named in the USRPRF
MBR The member of the USRINF file to be processed. The
default is *FIRST. A specific member or *LAST may
also be entered. The intent of the parameter is to
allow you to have a single file with members from
different systems or one member per month.
ADDLVAL Whether to compare some additional values. The
default is *NO which means the additional values are
The additional values that can be compared will
normally differ between systems, but it may be an
advantage to display the differences. For example,
if you are comparing from a previous version from
the same system, you would probably be interested in
the comparison. The additional values are:
- Previous signon date and time
- Signon attempts not valid
- Date password was changed
- Storage used
*YES may be specified to display any differences in
the additional values.
ESCAPE Whether to send an escape message if differences
exist. The default is *NO which means a completion
message is sent.
*YES may be specified to send TAA9895 if differences
exist. If multiple user profiles are compared, the
escape message is sent after all user profiles have
been compared and any one profile differs.
LSTTYPE The type of listing to be output for the USRPRFDTL
spooled file. This parameter is only meaningful if
generic user profiles or a special value for USRPRF
The default is *DIFF meaning only those profiles
that have differences will be listed.
*ALL may be specified to list all profiles.
DLTSPLF Whether to delete the spooled file created to
explain differences and no differences exist. The
default is *YES meaning the spooled file is deleted
if no differences are found. The spooled file is
always retained if differences exist.
*NO may be specified to ensure a spooled file will
exist regardless of whether differences exist or
Note that this parameter does not control whether
the summary spooled file is output if generic or
multiple user profiles are compared. That spooled
file is always output.
USRINF2 Whether to compare against the current user profile
information on the current system or a specified
*CURRENT is the default to compare against the
current user profile information.
A specific file and library may be entered to
compare against a previous set of information
created by the DSPUSRPRF OUTFILE TYPE(*BASIC)
MBR2 The member of the USRINF2 file to be processed if
the USRINF2 parameter names a specific file.
*CURRENT is the default which may only be used when
USRINF2(*CURRENT) is specified meaning the current
user profile information on the current system is
used for the comparison.
*FIRST, *LAST, or a specific member of the file may
OUTPUT How to output the results. * is the default to
display the spooled file if the command is entered
interactively. If *ALL or generic profiles are
requested, the summary output is displayed.
Individual user spooled files (if any), must be
If the command is entered in batch or *PRINT is
specified, one or more spooled files are output.
The individual spooled files that have no
differences are deleted based on the DLTSPLF
Most of the attributes (but not all) are compared. CMPUSRPRF2 uses
outfile information and is limited to the attributes found in the
If the user profile to be compared does not exist, it is considered a
*USER type (not *IBM). This is only a consideration if *ALLUSR or
*ALLIBM is specified for the USRPRF parameter.
The following TAA Tools must be on your system:
CHKALLOBJ Check *ALLOBJ special authority
CHKGENERC Check generic
CHKIBMPRF Check IBM profile
CHKOBJ3 Check object 3
EDTVAR Edit variable
RTVFMT Retrieve format
RTVSYSVAL3 Retrieve system value 3
SNDCOMPMSG Send completion message
SNDESCMSG Send escape message
SNDSTSMSG Send status message
None, the tool is ready to use. You must capture the user profile
information to be compared as described previously.
Objects used by the tool
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
CMPUSRPRF2 *CMD TAASEEE QATTCMD
TAASEEEC *PGM CLP TAASEEEC QATTCL
TAASEEER *PGM RPG TAASEEER QATTRPG
TAASEEER11 *PGM RPG TAASEEER11 QATTRPG
TAASEEEP *FILE PF TAASEEEP QATTDDS
The TAASEEEP file is a duplicate of the QADSPUPB file used by
DSPUSRPRF. It is only used to compile against.
TAASEEER is the summary report.
TAASEEER11 is the detail report.