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



Allen, if I understand your need properly, you want to determine
the key fields as specified on the OPNQRYF command. If that is
all you want, simply write a validity checking program that
will be passed a bunch of parameters. If you write it in C the
6th argument points to the key field information. Our product
actually reassembles the OPNQRYF command for a variety of
reasons which is a non-trivial exercise, but if you just want
the key field names then it shouldn't be too bad.

Mark Holm
Centerfield Technology

-----Original Message-----
From: mi400-admin@midrange.com [mailto:mi400-admin@midrange.com]On
Behalf Of Allen Hartley
Sent: Tuesday, January 22, 2002 4:53 PM
To: mi400@midrange.com
Subject: Re: [MI400] Retrieving key field info from OPNQRYF command


Dennis,

I need to know the key fields when I open the file and the API only gets the
key information based on the file as it was originally created not taking
into
account the OPNQRYF key information.  I did determine that when in debug
mode,
the system sends a program message CPI4321 listing the new key fields and
their
order but this is not available if you are not in debug mode, I don't know
why.  I was hoping that their was some way to retrieve the OPNQRYF
information
with an MI program as none of the API have that ability.

Thank again for you help.
Allen

Dennis Lovelady wrote:

> Well, you got me, Allen.
>
> I have a couple of programs that I was able to combine in an effort to
> prove/disprove that capability.  As yet, I am unable to retrieve anything
> other than the DEFINED keys for the file, not as actually presented from
> OPNQRYF.  Methinks OPNQRYF doesn't populate the feedback information as we
> would hope.  I cannot guess why that choice would have been made.  But if
> it isn't in the feedback area (and I can't find a way to force it into
> there), then we're not going to be able to pull it out.
>
> Perhaps there is some other way?  What is it that you're trying to
> accomplish, big-picture wise?
>
> Dennis
>
> Allen Hartley <hartley@prodatacomputer.com>@midrange.com on 01/22/2002
> 12:18:47 PM
>
> Please respond to mi400@midrange.com
>
> Sent by:  mi400-admin@midrange.com
>
> To:   mi400@midrange.com
> cc:
> Subject:  Re: [MI400] Retrieving key field info from OPNQRYF command
>
> Dennis,
>
> Yes I specified to allow override processing '1' and I tried both *INT &
> *EXT
> for the format type (field 9).
>
> Thanks
> Allen
>
> Dennis Lovelady wrote:
>
> > Hmmm... that doesn't sound right, though I must admit not playing with
> > OPNQRYF's effects on the API.
> >
> > I'll toy with it, but in the meantime, are you certain you've specified
> to
> > allow override processing in the API  ('1' in API parm field 7)?
> >
> > Dennis
> >
> > Allen Hartley <hartley@prodatacomputer.com>@midrange.com on 01/22/2002
> > 12:03:45 PM
> >
> > Please respond to mi400@midrange.com
> >
> > Sent by:  mi400-admin@midrange.com
> >
> > To:   mi400@midrange.com
> > cc:
> > Subject:  Re: [MI400] Retrieving key field info from OPNQRYF command
> >
> > Dennis,
> >
> > I use the QDBRTVFD API to get the file information FILD0100 and from
that
> I
> > get the key information based on the key offset, but this is only for
the
> > file which has no keys and not for the currently used access path
> > (OPNQRYF).  I tried to use FILD0300 to retrieve the key field
information
> > but it comes back with an error stating that the file is not a keyed
> file.
> >
> > Allen
> >
> > Dennis Lovelady wrote:
> >
> > > Hi, Allen:
> > >
> > > Have a look at the QDBRTVFD API.
>
> _______________________________________________
> This is the MI Programming on the AS400 / iSeries (MI400) mailing list
> To post a message email: MI400@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/mi400
> or email: MI400-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/mi400.



_______________________________________________
This is the MI Programming on the AS400 / iSeries (MI400) mailing list
To post a message email: MI400@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/mi400
or email: MI400-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/mi400.




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.