ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

replay Inquiry Message

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replay Inquiry Message

    I'm trying to do a cpysplf and i get the Iquiry message CPA3311, and i got to replay G to process with the copy.
    So i can do a monmsg(CPA3311), but how can i do the replay?
    I find one solucion, but i don't like it that is:
    ADDRPYLE SEQNBR(100) MSGID(CPA3311) RPY(G) and CHGJOB INQMSGRPY(*SYSRPYL).

    Is there any way i can replay the CPA3311 messege?

  • #2
    Re: replay Inquiry Message

    i don't have time to spend on it but you might be able to do this using RTVMSG and SNDRPY
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: replay Inquiry Message

      Hi Thunder,
      I do have a solution for this, but I'm at work now
      The solution is at home, where all the good stuff is
      I'll post it later, if you still need it.
      Regards

      Kit
      http://www.ecofitonline.com
      DeskfIT - ChangefIT - XrefIT
      ___________________________________
      There are only 3 kinds of people -
      Those that can count and those that can't.

      Comment


      • #4
        Re: replay Inquiry Message

        MC Press Online - How to Forward Messages in CL
        "Time passes, but sometimes it beats the <crap> out of you as it goes."

        Comment


        • #5
          Re: replay Inquiry Message

          You could try this: It does use the ADDRPYLE, but it cleans up after itself
          Code:
                       DCL        VAR(&SYSRPYCRT) TYPE(*LGL) LEN(1) VALUE('0')
                       DCL        VAR(&JOBRPY) TYPE(*CHAR) LEN(10)
                       DCL        VAR(&RPLYSEQ) TYPE(*DEC) LEN(4 0) VALUE(5555)     
          ...
                            RTVJOBA    INQMSGRPY(&JOBRPY)                            
                            CHGJOB     INQMSGRPY(*SYSRPYL)                           
          A32B2RETRY:       CHGVAR     VAR(&RPLYSEQ) VALUE(&RPLYSEQ + 1)             
                            ADDRPYLE   SEQNBR(&RPLYSEQ) MSGID(CPA32B2) RPY('I')      
                            MONMSG     MSGID(CPF2555) EXEC(GOTO CMDLBL(A32B2RETRY))  
                            CHGVAR     VAR(&SYSRPYCRT) VALUE('1')  
          ...
          do stuff
          ...
                          IF         COND(&SYSRPYCRT *EQ '1') THEN(DO) 
                             RMVRPYLE   SEQNBR(&RPLYSEQ)               
                             MONMSG     MSGID(CPF0000)                 
                             CHGJOB     INQMSGRPY(&JOBRPY)             
                          ENDDO
          Regards

          Kit
          http://www.ecofitonline.com
          DeskfIT - ChangefIT - XrefIT
          ___________________________________
          There are only 3 kinds of people -
          Those that can count and those that can't.

          Comment

          Working...
          X