× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



   Rob,

   Thanks for the thought, but I'm trying to suppress the interactive prompt
   for the variables.  The ? causes the prompt to be forced, and goes on the
   start of the command.  ?- before a keyword hides that keyword in the
   prompt of the command, so it can't be changed.  Even with that specified,
   QM prompts for the variables when it is run.  The prompt is being done at
   run time of the query, and not before the command is run, as it would with
   the ? specified.

   Example:

                   ?STRQMQRY   QMQRY(NameOQry) +
                               QMFORM(*QMQRY) +
                               ?-SETVAR((Variable1 &Var1) (q &q))

   The above command causes the command to be prompted before the execution
   of the command in the CL program,  hiding the setvar keyword.  Then when
   the command is executed, Query Manager prompts for the value of each
   variable, one at a time.  I don't think that you can specify the ?- on the
   keyword with out causing the command to be prompted (? to start the
   command).  Even if you could - my testing has shown me that the prompt
   when QM runs, still asks for variable data, and does not use the variables
   passed in the setvar keyword.

   Any other thoughts?

   Jim

   At 04:17 PM 9/26/2005 Monday, Rob wrote:

     RTVJOBA TYPE(&TYPE)

     if (&type='B') do
                     STRQMQRY   QMQRY(NameOQry) +
                                 QMFORM(*QMQRY) +
                                 SETVAR((Variable1 &Var1) (q &q))
     enddo
     else do
                     STRQMQRY   QMQRY(NameOQry) +
                                 QMFORM(*QMQRY) +
                                 ?SETVAR((Variable1 &Var1) (q &q))
     enddo

     May need a little cleanup work.

     Rob Berendt
     --
     Group Dekko Services, LLC
     Dept 01.073
     PO Box 2000
     Dock 108
     6928N 400E
     Kendallville, IN 46755
     http://www.dekko.com

     Jim Essinger <esinger@xxxxxxxx>
     Sent by: midrange-l-bounces@xxxxxxxxxxxx
     09/26/2005 04:49 PM
     Please respond to
     Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>

     To
     midrange-l@xxxxxxxxxxxx
     cc

     Fax to

     Subject
     Interactive Display of QMQry with passed variables

        Hello,

        I've been searching IBM info center,and the list archive for a few
     hours
        now, and I can't see if what I want to do can be done.

        I have a QMQry that has parms passed to it.  CL is as follows.

                     DCL        VAR(&Var1) +
                                 TYPE(*CHAR) +
                                 LEN(9)

                     DCL        VAR(&Q) +
                                 TYPE(*CHAR) +
                                 LEN(1) +
                                 VALUE('''')
      
                     STRQMQRY   QMQRY(NameOQry) +
                                 QMFORM(*QMQRY) +
                                 SETVAR((Variable1 &Var1) (q &q))

        The Var1 is passed to the program as character.

        What I want is for the qry to run with the passed  parms, but when it
     is
        run in an interactive job, I get prompted for the variables Var1, and
        'Q'.

        Anyone know how to make it use the passed parms with running
        interactively?

        Thanks!

      
     
----------------------------------------------------------------------------------------------
        Jim Essinger
        Senior Programmer/Analyst
        UnLtd Support Services
        PO Box 730
        Fruitland ID 83619
        208-452-4058 Ext 133
      
     
----------------------------------------------------------------------------------------------

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.