|
I have used the API method as well as reading file QSYS/QADBFLD. In many cases reading the QADBKFLD is easier. I do not have acces to OS400 right now to look, but the file may contain null fields, and may be *EXCLUDE. Don Tully "Bob Cozzi" <cozzi@xxxxxxxxx> wrote in message news:200409231814.i8NIErkY009489@xxxxxxxxxxxxxxxxxxxx > The field with the number of fields in it from QUSLFLD is named QUSNBRLE > To get it you need to read the standard header, and from within it use > subfield QUSOHS+1 to get the location of the header returned by QUSLFLD. > Within that area is the QUSNBRLE subfield that contains the number of field > names returned. > Or, use the RPG xTools and just do this: > Eval nFldCount = CrtFldList('QGPL/FIELDS' : 'CUSTMAST') > > -Bob Cozzi > > > -----Original Message----- > From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] > On Behalf Of CWilt@xxxxxxxxxxxx > Sent: Thursday, September 23, 2004 12:57 PM > To: rpg400-l@xxxxxxxxxxxx > Subject: RE: Key field info > > Rob and Scott have tried, now I'll give it my shot.... > > The number of entries field isn't shown under the QUSLFLD API. > > Instead, it has the following: > > Format of the Generated List > The field list consists of: > > -A user area > -A generic header > -An input parameter section > -A header section > The FLDL0100, FLDL0200, or FLDL0300 list data section > For details about the user area and generic header, see User space format > for list APIs. > > Notice the "see User space format for list APIs". Now when you following > that link you'll find detailed information about the user area and generic > header sections listed above. Specifically, you'll see where the generic > header section contains the number of entries field at offset 184 (from the > start of the generic header). > > Does that make sense? > > Charles > > > > > > -----Original Message----- > > From: Tony Carolla [mailto:carolla@xxxxxxxxx] > > Sent: Thursday, September 23, 2004 1:36 PM > > To: RPG programming on the AS400 / iSeries > > Subject: Re: Key field info > > > > > > > > > > Thanks Rob. > > > > All of the information I have on APIs is located at IBM's site -- I > > don't even have QSYSINC loaded, so I have to hand-code the PR's (oh, > > the agony -- never forget that Binary4 = 10I 0!!!). > > > > In the description of the QUSLFLD API, in the header section, I don't > > see anything indicating the number of fields returned. I know that > > this is the norm, but I am not seeing it for this API. > > > > I looked in QSYS2/SYSCOLUMNS, and I don't see a field that indicates > > which fields are keys. I looked in several of the views in QSYS2 > > (syskeys, syskeycst, systables, sysindexes), and I don't see any > > columns in these views that tell the key fields. > > > > > > > > -- > > "Enter any 11-digit prime number to continue..." > > -- > > This is the RPG programming on the AS400 / iSeries (RPG400-L) > > mailing list > > To post a message email: RPG400-L@xxxxxxxxxxxx > > To subscribe, unsubscribe, or change list options, > > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > > or email: RPG400-L-request@xxxxxxxxxxxx > > Before posting, please take a moment to review the archives > > at http://archive.midrange.com/rpg400-l. > > > -- > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > > > > -- > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > >
As an Amazon Associate we earn from qualifying purchases.
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 copyright@midrange.com.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.