Workstation Message Queue in AS400

Workstation Message Queue in AS400
Workstation Message Queue in AS400, *WRKSTN msgq, message queue, msgq, types of message queue, as400, ibmi, introduction, about, what, what is, how,
Workstation Message Queue in AS400

Workstation Message Queue

Workstation Message queues are used for sending and receiving messages between one workstation user and the other workstation user and the system operator. The workstation message queue has the same name assigned as the workstation name. The Workstation message queue is created by the system any new workstation is opened on the AS400 system.

Example for Sending Message to the Workstation Message queue

  • Just run the following command to check for your workstation message queue. Here in the MSGQ parameter, we specify the *WRKSTN value for the workstation message queue.
  • WRKMSG MSGQ(*WRKSTN)

    Currently, there are no messages on the workstation message queue at our workstation.

                                    Display Messages               
                                                           System: 
     Queue . . . . . :   QPAD092526              Program . . . . : 
       Library . . . :     QSYS                    Library . . . : 
     Severity  . . . :   00                      Delivery  . . . : 
                                                                   
     Type reply (if required), press Enter.                        
       (No messages available)                                       
    
  • Let's send a message using the SNDMSG command to the workstation message queue named QPAD092526 at our workstation of Inquiry type.
  • SNDMSG MSG('Hello This is AS400andSQLTricks.com')   
         TOMSGQ(QPAD092526) 
         MSGTYPE(*INQ) 
         RPYMSGQ(*WRKSTN)
    
  • Just run the DSPMSG command to see the message sent to the workstation and wait for our reply.
  • DSPMSG MSGQ(*WRKSTN) 
    

    Display the message on the Workstation MSGQ.

                                   Display Messages                 
                                                          System:   
    Queue . . . . . :   QPAD092526              Program . . . . :   
      Library . . . :     QSYS                    Library . . . :   
    Severity  . . . :   00                      Delivery  . . . :   
                                                                    
    Type reply (if required), press Enter.                          
      From  . . . :   EASYCLASS      12/21/21   10:26:03            
      Hello This is AS400andSQLTricks.com                           
        Reply . . :                                                 
      From  . . . :   EASYCLASS      12/21/21   10:26:03            
      Hello This is AS400andSQLTricks.com                           
        Reply . . .   ____________________________________________                                             
                                                                    
                                                                    
                                                                    
                                                                    
                                                                    
                                                                    
                                                                    
                                                                    
    F3=Exit              F11=Remove a message                 F12=Ca
    F13=Remove all       F16=Remove all except unanswered     F24=Mo
                                                                    
    
  • Send a reply as WELCOME. We can then recheck the reply using the same command DSPMSG MSGQ(*WRKSTN).
  •                                 Display Messages                
                                                           System:  
     Queue . . . . . :   QPAD092526              Program . . . . :  
       Library . . . :     QSYS                    Library . . . :  
     Severity  . . . :   00                      Delivery  . . . :  
                                                                    
     Type reply (if required), press Enter.                         
       From  . . . :   EASYCLASS      12/21/21   10:26:03           
       Hello This is AS400andSQLTricks.com                          
         Reply . . :                                                
       From  . . . :   EASYCLASS      12/21/21   10:26:03           
       Hello This is AS400andSQLTricks.com                          
         Reply . . .   _WELCOME____________________________________                                      
                                                                    
    

    Related Post

    Post a Comment

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