• Subject: Re: RUNQRY behavior
  • From: MacWheel99@xxxxxxx
  • Date: Sat, 27 Jan 2001 13:22:00 EST

From Alister Wm Macintyre

I have been programming AS/400 since 1998 and worked on S/36 before that & I 
am not yet a Jedi Master but have learned some things that are not clearly 
spelled out in the documentation.  You are probably much closer to being a 
Jedi Master of 400 programming than I am.

A query definition does NOT use whatever logical you specify for sequence or 
selection criteria.  It uses the logical that you specified to identify the 
physical file that is to be processed, then depending upon the logic within 
the query definition, OS/400 will seek to use the best logical for 
processing, within a reasonable time period to figure that out, and it is at 
that point that it will include the one you suggested as one of those to 
consider.

So if the files being used are large & complex & there are many logicals 
already on the system, OS/400 may not have time to figure out optimal logical 
access paths to use, so it ends up using the one you SUGGESTED in your query 
definitions.  When writing query definitions we cannot depend upon the rules 
in our suggested logical, we have to repeat those rules in our selection 
criteria & sort request.

RUNQRY *N file is consistent with this & more obvious because we should have 
written good query definitions in which a conflict between suggested logical 
and actual logical only impacts performance & not the output from the query.

When I RUNQRY *N file I rarely press enter, but F4 then change bottom of 
screen to *YES & occasionally change output options to print.  I have never 
tried to *OUTFILE here at command line.

MacWheel99@aol.com (Alister Wm Macintyre) (Al Mac)
AS/400 Data Manager & Programmer for BPCS 405 CD Rel-02 mixed mode (twinax 
interactive & batch) @ http://www.cen-elec.com Central Industries of 
Indiana--->Quality manufacturer of wire harnesses and electrical 
sub-assemblies - fax # 812-424-6838

>  From:    cgalgano@ediconsulting.com (Carl Galgano)
>  
>  This may seem like a stupid newbie question (I've done work on the AS400
>  since 1988 and the S/38 before that), but I have noticed something about 
the
>  RUNQRY command that I can not figure out.
>  
>  If I specify RUNQRY *N logicalfile/library, I would expect that the RUNQRY
>  command would display the file in the sequence specified by the logical
>  file, not the arrival sequence of the file, but that is not the case.  It
>  always seems to use the arrival sequence.  Is this correct?  Can it be
>  overridden to use the key sequence in the LF.  I know that I can create a
>  query over the file and just use the RUNQRY command to run the query
>  defn..... it just seems illogical how the RUNQRY command works.....
>  
>  What do you guys (that's New York plural for all sexes) think?
>  Carl
>  
>  
>  Carl J. Galgano
>  EDI Consulting Services, Inc.
>  550 Kennesaw Avenue, Suite 800
>  Marietta, GA  30060
>  (770) 422-2995 - voice
>  (419) 730-8212 - fax
>  mailto:cgalgano@ediconsulting.com
>  http://www.ediconsulting.com
>  AS400 EDI, Networking, E-Commerce and Communications Consulting and
>  Implementation
>  http://www.icecreamovernight.com
>  Premium Ice Cream Brands shipped Overnight


+---
| 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-2022 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.