Now, Get RPG Codes in all three formats only on this website on every RPGLE related programming article.

Fixed, /Free and Fully Free RPG


User Profile Message Queue in AS400

User Profile Message Queue in AS400
User Profile Message Queue in AS400, User profile message queue, msgq, message queue, types of message queue, types of msgq, as400, ibmi, introduction, what, about, what is, why, how
User Profile Message Queue in AS400

User Profile Message Queue

User Profile Message Queue is used for communication between different users. The user profile message queue is created in the QUSRSYS library when the user profile is created.

                              Work with Objects 
                                                
Type options, press Enter.                      
  2=Edit authority        3=Copy   4=Delete   5=
  8=Display description   13=Change description 
                                                
Opt  Object      Type      Library     Attribute
     EASYCLASS   *MSGQ     QUSRSYS              

Example for sending a message to the User Profile Message queue

  • Just run the following command to check for your Use Profile message queue. Here in the MSGQ parameter, we specify *USRPRF value for the User Profile message queue.
  • WRKMSG MSGQ(*USRPRF)
                                    Display Messages              
                                                           System:
     Queue . . . . . :   EASYCLASS               Program . . . . :
       Library . . . :     QUSRSYS                 Library . . . :
     Severity  . . . :   00                      Delivery  . . . :
                                                                  
     Type reply (if required), press Enter.                       
       Job 319557/EASYCLASS/EASYCLASS ended abnormally.                                              
    
  • Let's send some messages using the SNDMSG command to the User Profile message queue named EASYCLASS at the same user profile message queue.
  • SNDMSG   
    SNDMSG MSG('Hello This is AS400andSQLTricks.com')
           TOUSR(EASYCLASS)                          
           MSGTYPE(*INQ)                             
           RPYMSGQ(EASYCLASS)                        
    
                                    Display Messages                 
                                                           System:   
     Queue . . . . . :   EASYCLASS               Program . . . . :   
       Library . . . :     QUSRSYS                 Library . . . :   
     Severity  . . . :   00                      Delivery  . . . :   
                                                                     
     Type reply (if required), press Enter.                          
       From  . . . :   EASYCLASS      12/21/21   10:49:55            
       Hello This is AS400andSQLTricks.com                           
         Reply . . .  __________________________________________                                                
                                                                                                              
    

    Reply with WELCOME.

                                   Display Messages                 
                                                          System:   
    Queue . . . . . :   EASYCLASS               Program . . . . :   
      Library . . . :     QUSRSYS                 Library . . . :   
    Severity  . . . :   00                      Delivery  . . . :   
                                                                    
    Type reply (if required), press Enter.                          
      From  . . . :   EASYCLASS      12/21/21   10:49:55            
      Hello This is AS400andSQLTricks.com                           
        Reply . . .   WELCOME______________________________                                       
                                                                    
    

    We will see the reply below.

                                    Display Messages                 
                                                           System:   
     Queue . . . . . :   EASYCLASS               Program . . . . :   
       Library . . . :     QUSRSYS                 Library . . . :   
     Severity  . . . :   00                      Delivery  . . . :   
                                                                     
     Type reply (if required), press Enter.                          
       From  . . . :   EASYCLASS      12/21/21   10:49:55            
       Hello This is AS400andSQLTricks.com                           
         Reply . . :   WELCOME                                       
    

    Related Post

    Post a Comment

    © AS400 and SQL Tricks. All rights reserved. Developed by Jago Desain