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



I think you would get all the ones with all that criteria that are P's, and
all the B's. If that the output you're getting? I think the OR is causing
all B's to be included.

One word...SQL. Of course, that's not a word, but still.

And along the SQL line, when that hacker got busted for stealing 130 million
CC and debit card numbers, some earnest reporter on the radio said the
hacker used "a sophisticated technique called SQUL injection". God love the
U has to follow Q lesson she learned in school.

On Fri, Aug 21, 2009 at 11:49 AM, Robert Ostrowski <
Bob.Ostrowski@xxxxxxxxxxxxxxxx> wrote:

I can't figure out why this won't work...

Before I changed the OPNQRYF:

QSYS/OPNQRYF FILE((*CURLIB/ESTFIL)) QRYSLT('ESDIV *EQ "' +
*CAT &DIV *CAT '" *AND ESBTYP *EQ '' '' +
*AND ESSLMN *GE ' *CAT &SLMN1 *CAT ' *AND +
ESSLMN *LE ' *CAT &SLMN2 *CAT ' *AND +
ESDDTE *GE ' *CAT &FROM1 *CAT ' *AND +
ESDDTE *LE ' *CAT &TO1 *CAT ' *AND ESSTUS +
*EQ "' *CAT &STAT *CAT '" ') +
KEYFLD((ESDIV *ASCEND) (ESSLMN) (ESDDTE +
*DESCEND) (ESEST#))



After my change:

QSYS/IF COND((&STAT *EQ 'P') *OR (&STAT *EQ 'B')) THEN(DO)
QSYS/OPNQRYF FILE((*CURLIB/ESTFIL)) QRYSLT('ESDIV *EQ "' +
*CAT &DIV *CAT '" *AND ESBTYP *EQ '' '' +
*AND ESSLMN *GE ' *CAT &SLMN1 *CAT ' *AND +
ESSLMN *LE ' *CAT &SLMN2 *CAT ' *AND +
ESDDTE *GE ' *CAT &FROM1 *CAT ' *AND +
ESDDTE *LE ' *CAT &TO1 *CAT ' *AND ESSTUS +
*EQ "' *CAT 'P' *CAT '" *OR ESSTUS +
*EQ "' *CAT 'B' *CAT '" ') +
KEYFLD((ESDIV *ASCEND) (ESSLMN) (ESDDTE +
*DESCEND) (ESEST#))
ENDDO


If the &STAT variable is P or B, they want to see on the report where
the ESSTUS field
Is P (Pending) or B (Bidding).

If I end up getting EVERYTHING in the file when there should only be a
few records.






Bob Ostrowski | Senior Programmer/Analyst
TRAINOR GLASS COMPANY | National - IT
11901 S. Austin Ave. | Alsip, IL 60803
T 708.293.4218 | F 708.293.6218
bob.ostrowski@xxxxxxxxxxxxxxxx
<mailto:firstname.lastname@xxxxxxxxxxxxxxxx> | www.trainorglass.com
<http://www.trainorglass.com>

Project Management On-Line <http://webapps.trainorglass.com/> | View
your project's progress and communicate with your project manager

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



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.