Retrieve msgs from QSYSOPR without RCVMSG

85 pts.
Tags:
AS400 Command
Is thre any other way to retrieve messages from QSYSOPR with out using RCVMSG

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • CharlieBrowne
    Yes, You can use APIs.
    If you do a search for QSYSOPR API, you will get a list of web sites that give you more infor4mation.
    Also as I recall there is a program you can download for free from the web. OPRMONE
    41,380 pointsBadges:
    report
  • poojaary
    PGM                                                                         
                 DCL        VAR(&MSG) TYPE(*CHAR) LEN(75)                       
                 DCL        VAR(&MSG2) TYPE(*CHAR) LEN(75)                      
                 DCL        VAR(&SENDER)   TYPE(*CHAR)   LEN(80)                
                 DCL        VAR(&SEV)      TYPE(*DEC)    LEN(02 0)              
                 DCL        VAR(&SEVC)     TYPE(*char)   LEN(02)                
                 DCL        VAR(&MSGID)    TYPE(*CHAR)   LEN(7)                 
                 DCL        VAR(&JOBNAME)  TYPE(*CHAR)   LEN(10)                
                 DCL        VAR(&JOBNO)    TYPE(*CHAR)   LEN(6)                 
                 DCL        VAR(&USERNAME) TYPE(*CHAR)   LEN(10)                
                 DCL        VAR(&MSGKEY)   TYPE(*CHAR)   LEN(4)                 
                 DCL        VAR(&count)    TYPE(*dec)    LEN(4) value(0)        
           /*    MONMSG     MSGID(CPF0000)   */                                 
                                                 
    READ:       RCVMSG     MSGQ(QSYSOPR) MSGTYPE(*RPY) MSGKEY(*NONE) +               
                             WAIT(*MAX) RMV(*NO) KEYVAR(&MSGKEY) +                   
                             MSG(&MSG) SECLVL(&MSG2) MSGID(&MSGID) +                 
                             SEV(&SEV) SENDER(&SENDER)                               
                                                                                     
                                                                                     
                CHGVAR     VAR(&COUNT) VALUE(&COUNT + 1)                             
                CHGVAR     VAR(&jobname) VALUE(%SST(&sender 1 10))                   
                CHGVAR     VAR(&jobno) VALUE(%SST(&sender 11 6))                     
                CHGVAR     VAR(&username) VALUE(%SST(&sender 17 10))                 
                CHGVAR     &SEVC  &SEV                                               
                                                                                     
                CALL       PGM(library/pgm) PARM(&MSGID &SENDER +              
                             &SEVC &MSG &MSG2 &JOBNAME &JOBNO +                      
                             &USERNAME &COUNT)                                       
                                                                                     
                IF (&msgid *eq '       ') THEN(DO)                                   
                GOTO EXIT                                
                 ENDDO        
                 ELSE DO      
                 GOTO READ    
                 ENDDO        
        EXIT:                 
    ENDPGM                                                

    85 pointsBadges:
    report
  • poojaary
    above is the code i have written. but it is not fetching messages "which are in needing reply field" . so please provide me the code to fetch messages needing reply messages. please refer the screen shot  

    85 pointsBadges:
    report
  • ToddN2000
    What reply type messages are you looking for ? Are they program generated like record lock errors or system generated like printer messages? That may make a difference using *RPY as the message type.. Never tried it myself.
    9,915 pointsBadges:
    report
  • poojaary
    Yeah its inquiry message type from qsysopr which are needing  reply part.  can i retrieve those messages and send mail. Thanks in advance
    85 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following