Problem solve Get help with specific problems with your technologies, process and projects.

Who are you signed on as?

Working with multiple user profiles? This tool is helpful to find out who you are signed on as.

You Can View User Feedback To This Tip

If you are working with multiple user profiles this little tool is very helpful to find out who you are signed on as.

It has a CL program called "WHO" and a command program called "WHO".

CL program - WHO

  PGM                                     
 DCL VAR(&USER) TYPE(*CHAR) LEN(10)      
 RTVJOBA USER(&USER)                     
 SNDPGMMSG MSG('You are :' *BCAT &USER)  
 ENDPGM                                  

Command Program - WHO
CMD        PROMPT('WHO') 

USER FEEDBACK TO THIS TIP

  • It not only provides the sign on information but the workstation information as well.

    If you need a shorter command, create a CPP in CL:

    PGM
    DSPWSUSR
    ENDPGM

    And a command, such as ID, that uses the CPP you created:

    CMD PROMPT('ID-Display Workstation User')

    —Robert Clay

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Ask your programming questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.


Dig Deeper on iSeries CL programming

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close