ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Qrcvdtaq

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

  • Qrcvdtaq

    I have been working with data queues for a while on a project. This one has me stumped. I know the SND works, I can see what it has in the que with debug. This just sits there waiting to get something! What is the issue. Help please.

    Code:
       $RCVQ         BEGSR                                              
    
                                                                         
                      Z-ADD     -1            VWWAIT                     
                      CALL      'QRCVDTAQ'                           95  
                      PARM      'CRC151QA'    VWDTAQ           10        
                      PARM      '*LIBL   '    VWLIB            10        
                      PARM                    FLDLEN            5 0      
                      PARM                    C#STRU                     
                      PARM                    VWWAIT            5 0

  • #2
    Re: Qrcvdtaq

    You are using *LIBL for your library, so I would make sure you dont have that dataq created in more than one library in your library list.

    And how are you using debug to see the data in the dataq?
    Michael Catalani
    IS Director, eCommerce & Web Development
    Acceptance Insurance Corporation
    www.AcceptanceInsurance.com
    www.ProvatoSys.com

    Comment


    • #3
      Re: Qrcvdtaq

      I used debug on the send, and the data is there. Cant' really debug anything in this rcv program. I also specified my library name for the *LIBL, but the same results.
      I really appreciate your help. Thanks.

      Comment


      • #4
        Re: Qrcvdtaq

        ONCE u received the data through rcvdtaq ,its get clear

        Comment


        • #5
          Re: Qrcvdtaq

          I know, this is where it sits. It doesn't recieve the data. The message at the bottom highlighted, and inhibated.




          Code:
           301        * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
              302       C     $RCVQ         BEGSR                                
              303        *                                                       
              304       C                   Z-ADD     -1            VWWAIT       
              305       C                   CALL      'QRCVDTAQ'                 
              306       C                   PARM      'CRC151QA'    VWDTAQ       
              307       C                   PARM      '*LIBL   '    VWLIB        
              308       C                   PARM                    FLDLEN       
              309       C                   PARM                    C#STRU       
              310       C                   PARM                    VWWAIT       
              311                                                                
              312       C*                  MOVEL     VCORH         VWORH        
                                                                                 
           Debug . . .                                                           
                                                                                 
           F3=End program   F6=Add/Clear breakpoint   F10=Step   F11=Display vari
           F12=Resume       F17=Watch variable   F18=Work with watch   F24=More k
           [B]Step completed at line 305                                            [/B]
          Last edited by tomholden; April 7, 2010, 09:08 AM. Reason: added code tags...again

          Comment


          • #6
            Re: Qrcvdtaq

            what is the value of *IN95 on the CALL to the API? i created a simple test case using the same code you have posted and it works fine for me (on v6.1). perhaps there's something you have in the program that's faulty prior to the QRCVDTAQ call?
            I'm not anti-social, I just don't like people -Tommy Holden

            Comment


            • #7
              Re: Qrcvdtaq

              please use [code][/code] tags when posting code...
              I'm not anti-social, I just don't like people -Tommy Holden

              Comment


              • #8
                Re: Qrcvdtaq

                It was a copy and paste, so I know it's not the code itself. I believe it's the data queue, I just don't know what I'm missing. Thanks for all your help so far.

                Comment


                • #9
                  Re: Qrcvdtaq

                  Are you sure it's holding on the QRCVDTAQ statement? If *in95 is on, then there was an error, and it could be something as simple as an authority issue.

                  Did you check the error indicator on your SEND? If it errored out, then the data isnt there.

                  Depending on the security level of your machine, you could use the DMPOBJ command against the dataq. Look at the dump in the spool file, and you would be able to see the data in the dataq if it exists.

                  Also check to make sure this isnt a *keyed dataq.
                  Last edited by MichaelCatalani; April 7, 2010, 09:31 AM.
                  Michael Catalani
                  IS Director, eCommerce & Web Development
                  Acceptance Insurance Corporation
                  www.AcceptanceInsurance.com
                  www.ProvatoSys.com

                  Comment


                  • #10
                    Re: Qrcvdtaq

                    I would also like to see debug on this line
                    Code:
                    312       C*                  MOVEL     VCORH         VWORH
                    and you do know that this is commented out --- Right?

                    jamie
                    All my answers were extracted from the "Big Dummy's Guide to the As400"
                    and I take no responsibility for any of them.

                    www.code400.com

                    Comment


                    • #11
                      Re: Qrcvdtaq

                      I do know it's commented out. It doesn't reach that line of code. It sits at the rcv. Inhibiated. Can't make it recieve the data queue.

                      Comment


                      • #12
                        Re: Qrcvdtaq

                        then there is more than one dataq named the same thing and your program
                        is pointed to the one that the RPG program is not writting to.

                        jamie
                        All my answers were extracted from the "Big Dummy's Guide to the As400"
                        and I take no responsibility for any of them.

                        www.code400.com

                        Comment


                        • #13
                          Re: Qrcvdtaq

                          Use the DMPOBJ against the dataq and make sure the data is there. If it's not, then one of several issues could be happening:

                          A) The send errored out and didnt actually write the data

                          B) another program is already running against this dataq and is reading the data before your program can get to it

                          If the data IS in the dataq when you perform the dmpobj, then:

                          A) check to see if the data queue is keyed.
                          Michael Catalani
                          IS Director, eCommerce & Web Development
                          Acceptance Insurance Corporation
                          www.AcceptanceInsurance.com
                          www.ProvatoSys.com

                          Comment


                          • #14
                            Re: Qrcvdtaq

                            I used debug on the send, and the data is there.
                            I'm assuming you mean that you see the data in the variable that gets sent to the Send API. But that doesn't necessarily mean that the Send actually did what you think it did. If it didn't write anything, then your Receive will just sit there until something hits the dataq (just like it's doing now).

                            I suggest you go back to the sending program, run it in debug, and see if the call to the "Send" API gets an error message returned.
                            "Time passes, but sometimes it beats the <crap> out of you as it goes."

                            Comment


                            • #15
                              Re: Qrcvdtaq

                              I'm with littlepd on this one.
                              Philippe

                              Comment

                              Working...
                              X