Question

  Asked: Oct 23 2007   5:30 PM GMT
  Asked by: CLKelly


Using %NOT in OPNQRYF


OPNQRYF, %NOT, QRYSLT

I know that %NOT is a function available for using in the qryslt parameter of opnqryf but I can't figure out how to code it. I would like to eliminate all records with a range in the middle of the possible range, for example, select all facilities except those is the range of 600 - 699. Is this possible?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



The %NOT function is not a comparison function, it accepts a string argument and returns a bitwise logical not value of the string argument.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

WaltZ400  |   Oct 24 2007  4:40PM GMT

If you use a %RANGE function in OPNQRYF it has to be preceded by an equal operand (= or *eq). Why don’t you just say QRYSLT(’facility 699′)?

 

WaltZ400  |   Oct 24 2007  4:42PM GMT

If you use a %RANGE function in OPNQRYF it has to be preceded by an equal operand (= or *eq). Why don’t you just say QRYSLT(’facility *lt 600 *or facility *gt 699′)?

 

CLKelly  |   Oct 25 2007  12:53PM GMT

Thank you Kevleemor and WaltZ400. Since I’m working within the constraints of a selection program that I’d like to enhance to allow excludes as well as includes it gets a little tricky to use WaltZ400’s suggestion. It is what I would do if I were writing from scratch. Kevleemor, could you give an example of using %NOT? I have yet to find anythng in any of my online searches. Many Thanks!

 

Kevleemor  |   Dec 20 2007  3:13PM GMT

HI CLKelly, I don’t have an example of how to use the %NOT builtin function. But I can show you the IBM OPNQRYF reference page where the discription resides:

<a href="http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/cl/opnqryf.htm" rel="nofollow">http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm?info/cl/opnqryf.htm</a>

This page will show you all the capibilities of Open Query File.

Kevin