× 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.


  • Subject: RE: Query
  • From: Rob Berendt <rob@xxxxxxxxx>
  • Date: Tue, 1 Jun 1999 15:35:42 -0500

Parms with method 1 - Converting Query/400 into QM/400.
CRTSRCPF yourlib/QQMQRYSRC
RTVQMQRY QMQRY(qrylib/yourqry)       
         SRCFILE(yourlib/QQMQRYSRC)
         ALWQRYDFN(*YES)
Use SEU to edit member.  For example change
SELECT                     
  ALL       IPROD, IDESC   
  FROM      GPIDIVF/IIM T01
  WHERE     ICLAS <> 'xx'  
  ORDER BY  IPROD ASC      
to
SELECT                     
  ALL       IPROD, IDESC   
  FROM      GPIDIVF/IIM T01
  WHERE     ICLAS <> &class
  ORDER BY  IPROD ASC      
Compile with command CRTQMQRY.  Run with command STRQMQRY.
PGM (                                                                + 
      &CLPCLASS        /* Item class                              */ + 
    )                                                                  
    DCL  &APOS        *CHAR   1  /* Apostrophe                       */
    DCL  &CLPCLASS    *CHAR   2  /* Item Class                       */
    DCL  &PARM        *CHAR   4  /* Item Class                       */
             CHGVAR     VAR(&APOS) VALUE(X'7D')                        
             CHGVAR  &PARM (&APOS *TCAT &CLPCLASS *TCAT &APOS)         
             STRQMQRY   QMQRY(ROB/IIM) SETVAR((CLASS &PARM))           
END:                                                                   
             ENDPGM                                                    


Parms with method 2 - store parameters in a separate file.
CRTSRCPF yourlib/QDDSSRC
Add a member with the following
                            REF(IIM)     
R PARMSR                                 
  CLASS     R               REFFLD(ICLAS)
Compile it using CRTPF.
Insert a value, perhaps using a prompting program (or UPDDTA to test).  Then 
make this
file your primary file, and join it to your other file, in Query/400.


You can add additional parms using either method.





LDiRosa@GIBRALTAR1.COM on 06/01/99 03:02:37 PM
Please respond to MIDRANGE-L@midrange.com@Internet
To:     MIDRANGE-L@midrange.com@Internet
cc:      
Fax to: 
Subject:        RE: Query

I would love some details on this.  I need to pass parms, but have not had
time to convert from Query/400 to DB2 Query .....

> -----Original Message-----
> From: Rob Berendt [SMTP:rob@dekko.com]
> Sent: Tuesday, June 01, 1999 2:13 PM
> To:   MIDRANGE-L@midrange.com
> Subject:      RE: Query
> 
> There are some steps you can do to pass parms to Query/400.
> 
> Method 1:
> Convert the Query/400 query into QM/400 and modify it.
> 
> Method 2:
> Set up your parameters in a separate file and join with this file.
> Details available upon request.
> 
> 
> 
> 
> 
> LDiRosa@GIBRALTAR1.COM on 06/01/99 01:04:11 PM
> Please respond to MIDRANGE-L@midrange.com@Internet
> To:   MIDRANGE-L@midrange.com@Internet
> cc:    
> Fax to:       
> Subject:      RE: Query
> 
> DB2 Query Manager for the AS/400 would be an excellent choice if you want
> to
> control user queries to only run in BATCH mode.  Another nice feature is
> that you can pass parameters to a query written in this app.  One downfall
> of AS/400 wrkqry, another potential choice for you, is that it cannot
> receive parms.  They both function very similar and can both take
> advantage
> of the predictive query govenor that comes with most AS/400's past V3R1.
> This query govenor can monitor a query and not allow it to take all the
> AS/400 resources.  Hope this helps.
> 
> Thanks,
> Lynn P. DiRosa
> Gibraltar Steel, Corporate 
> Information Services
> 
> 
> > -----Original Message-----
> > From:       Paul A Troup IV [SMTP:ptroup@gulftel.com]
> > Sent:       Tuesday, June 01, 1999 12:52 PM
> > To: MIDRANGE-L@midrange.com
> > Subject:    Query
> > 
> > I'm looking for a query program to run on˙the 400.˙ Does anyone have any
> > recommendations?˙ 
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
> MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
> david@midrange.comm
> +---
> 
> 
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
> MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
> david@midrange.com
> +---
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.comm
+---


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.