• Subject: Re: OPNQRYF QRYSLT Question...
  • From: Chuck Lewis <CLEWIS@xxxxxxxxxx>
  • Date: Tue, 13 Jul 1999 07:18:26 -0500

Thanks Booth !

As I noted in my reply to Peter - CHGVAR cleans up (to a certain extent <BG> 
the syntax
for this parameter. The program(s) I alluded to in that response were receiving 
various
information from an inquiry screen allowing a user to perform a search and I 
can STILL
remember FIGHTING with this stuff (ESPECIALLY passing this information) until I 
hit on
CHGVAR !!!

That SNDUSRMSG is a GREAT idea, by the way !!!

Chuck

boothm@ibm.net wrote:

> Here is something I did.  The idea isn't mine, but it worked for me:
>
> 0003.00              DCL        VAR(&QSL) TYPE(*CHAR)  LEN(180)
> 0004.00              DCL        VAR(&DQ) TYPE(*CHAR)  LEN(1) VALUE('"')
> ....
> 0027.00              CHGVAR     VAR(&QSL) VALUE('ENGTRM *EQ ' *CAT &DQ +
>  0028.00                  *CAT &TERM *CAT &DQ *CAT ' *AND ENGACD *GE ' +
>  0029.00                            *CAT &DQ *CAT &FROMALPH *CAT &DQ +
>  0030.00                           *CAT ' *AND ENGACD *LE ' *CAT &DQ *CAT
> +       0031.00                           &TOALPH *CAT &DQ *CAT ' *AND
> ENG#CD *GE ' +    0032.00                            *CAT &FROMNUMS  +
>
> 0033.00                       *CAT ' *AND ENG#CD *LE ' *CAT  +
>  0034.00                           &TONUMS  )
>  0035.00    /*        SNDUSRMSG  MSG(&QSL)                             */
>  0036.00    /* NOTE: SHARE(*YES) IS CRITICAL TO OPERATION OF OPNQRYF!!! */
>  0037.00              OVRDBF     ENGRP1 SHARE(*YES)
>  0038.00              OPNQRYF    FILE((ENGRP1)) FORMAT(*FILE) QRYSLT(&QSL)
> +      0039.00                           KEYFLD((ENGRP1/ENGFYR)
> (ENGRP1/ENGTRM) +       0040.00                           (ENGRP1/ENGACD)
> (ENGRP1/ENG#CD))
>
> (notice the &QSL field is the piece that makes this work easier.) (notice
> the commented SNDUSRMSG statement? That let me see what was actually
> happening.)
>
> In <378A9C4F.F22AC5A7@IQUEST.NET>, on 07/12/99
>    at 08:54 PM, Chuck Lewis <CLEWIS@IQUEST.NET> said:
>
> >Hi Eric !
>
> >While reading the Online Book examples I saw the %RANGE and remember
> >THINKING I should check that out but got sidetracked with what I was
> >already doing (tunnel vision) <G>...
>
> >OK, so here is what I have:
>
> >OPNQRYF  FILE((WFBLBLSP)) QRYSLT('BLDN07=%RANGE("' *TCAT &START *TCAT'"
> >"' *TCAT &END *TCAT '")')
>
> >and I get:
>
> >Character ''' not valid following string '*TCAT     '.
>
> >Hate to be a pest but what am I missing ?
>
> >Thanks !
>
> >Chuck
>
> >eric.delong@pmsi-services.com wrote:
>
> >>      I think you might want to try:
> >>      ('BLDN07=%RANGE("' *tcat &START *tcat'" "' *tcat &END *tcat '")')
> >>
> >>      eric.delong@pmsi-services.com
> >>
> >> ______________________________ Reply Separator 
>_________________________________
> >> Subject: OPNQRYF QRYSLT Question...
> >> Author:  <MIDRANGE-L@midrange.com > at INET_WACO
> >> Date:    7/12/99 2:29 PM
> >>
> >> Hi Folks,
> >>
> >> Been a LONG time since I've used OPNQRY. Used to do all sorts of tricky
> >> things with it including KILLER searches. Only problem is, all examples
> >> are gone (old job) and I'm in DUH mode. Tried online books (IBM) and
> >> can't seem to find exactly what I need.
> >>
> >> Here goes...
> >>
> >> Need to be able to pass 2 parameters to a CL which will do OPNQRY on a
> >> file.
> >> The parameters are both 3 characters. The field I'm checking is a Bin
> >> Label location field and is BLDN07 (not that this matters to you) and
> >> the fields I'm passing are a starting Bin Location (&START) and an
> >> Ending Bin Location (&END).
> >>
> >> For example, I am wanting to run Bin Labels for locations E02 - E10.
> >>
> >> If I have the QRYSLT defined as:
> >>
> >> QRYSLT('BLDN07 *GE *BCAT &START)
> >>
> >> It takes that fine. When I go to add a *AND BLDN07 *LE &END) it goes
> >> nuts...
> >>
> >> What am I missing ? I seem to remember using the " in these strings...
> >>
> >> TIA !!
> >>
> >> Chuck
> >>
> >> +---
> >> | 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.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.com
> >+---
>
> --
> -----------------------------------------------------------
> boothm@ibm.net
> Booth Martin
> -----------------------------------------------------------
>
> +---
> | 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.com
+---


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.