There is an OS/400 command to display the current user ID - DSPWSUSR. This command resides in library QSYS and...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
can be run from any command line. The default output is to the display, but *PRINT is allowed. The following is an excerpt from the help screen for the command:
"The Display Work Station User (DSPWSUSR) command allows you to display information about your current session. Information shown includes:
* Display station * Number of interactive jobs in session * Interactive job currently active"