ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

help with rtvmqry

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

  • help with rtvmqry

    i created a management query by using crtqmqry and rtvmqry so that i can pass parameters on the query, so that the users can input the date range that they need for their report. i also created a CLP to do it, but every time the program runs, it generates 3 spooled files and the report is cut into 3, which normally fits into 1 spooled file before i used crtqmqry and rtvqry. how can i fit it into 1 spooled file again? thanks so much... =)
    Last edited by lushh; September 23, 2007, 09:56 PM.

  • #2
    Re: help with rtvmqry

    You have to do an OVRPRTF before you run the qmq !

    Like this:

    OVRPRTF FILE(QPQXPRTF) PAGESIZE(72 132) OVRFLW(66) +
    PAGRTT(*AUTO) SECURE(*YES) OVRSCOPE(*JOB)

    ... then run your qmq...

    ...and then delete the ovr , like this:

    DLTOVR FILE(QPQXPRTF) LVL(*JOB)


    Hope this helps !

    Peet
    Once there was a river, now there's a Stone !

    Comment


    • #3
      Re: help with rtvmqry

      thanks. it did work!!! =) is there any way that i can insert a header or title in the query? thanks so much..

      Comment


      • #4
        Re: help with rtvmqry

        As far as I know, no, but you can insert a footer (sort of) using the PRTTXT kwd on OVRPRTF.
        OVRPRTF QPQXPRTF ... PRTTXT('blah blah blah')
        The printed text must not exceed 30 characters IIRC.
        Philippe

        Comment


        • #5
          Re: help with rtvmqry

          I think Mercury tells teh trues, only a footer can be take on the outpt !

          Peet
          Once there was a river, now there's a Stone !

          Comment


          • #6
            Re: help with rtvmqry

            lushh, you can create a header / Footer / and even more formatting for a QmQry.

            1) from a command line. STRQM.
            You get this screen;
            PHP Code:
                                   DB2 UDB for iSeries Query Manager
                                                                    
             Select one of the following
            :                           
                                                                    
                  
            1. Work with Query Manager queries                
                  2. Work with Query Manager report forms           
                  3. Work with Query Manager tables 

            2) use "1". enter a 2 on the query. Press F5 to run it to display. Press enter after it runs. ON the botom of the screen is this.

            PHP Code:
            F10=Cursor   F13=Edit form        F16=Repeat find      F17=Repeat change 
            F19
            =Left     F20=Right            F21=System command   F24=More keys     
            RUN QUERY successful

            Press F13 to edit the form.

            PHP Code:
                                          Select Report Format   
                                                                 
             Form 
            . . . . . . . :   *                            
                                                                 
             
            Type optionspress Enter.  Press F21 to select all.
               
            1=Select                                          
                                                                 
                                                                 
               Opt     Report Format                             
                     Edit column formatting                      
                     Edit page heading                           
                     Edit page footing                           
                     Edit 
            final text                             
                     Edit 
            break text                             
                     Specify formatting options 
            From here you can edit a bunch of stuff.


            When all done save the new QMFORM.

            Then when ya want to run the QMQRY do something like this.

            PHP Code:
            STRQMQRY QMQRY(MYQRYOUTPUT(*PRINT) QMFORM(MYQRYFORM
            You can even use variables on the QmForm.
            Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

            Comment


            • #7
              Re: help with rtvmqry

              I've learnt something today and am happy !
              I nearly never use QMQRY as I find it much confusing.
              Philippe

              Comment


              • #8
                Re: help with rtvmqry

                thanks guys! it really did help! it worked.. thank you.. =)

                Comment

                Working...
                X