You can execute the DSPUSRPRF command to an output file.
DSPUSRPRF USRPRF(*ALL) TYPE(*BASIC) OUTPUT(*OUTFILE) OUTFILE(QGPL/USERFILE)
The OUTFILE parameter can be changed to whatever file name you want and library you want it to go to. Execute the command using a profile with *ALLOBJ or *SECADM authority. When in doubt do it using QSECOFR. The file you create will contain basic information about every user profile on the system. Initial program and library is included as well as job description, output queue, accounting code, and more. This file can then be queried.