|
Frankly reading the file QSYS2/SYSCOLUMNS will tell you most of the information in that API. Basic property of api's is to check out the list header. See the section For details about the user area and generic header, see User space format for list APIs. or http://publib.boulder.ibm.com/infocenter/iseries/v5r3/ic2924/info/apis/usf.htm This will return the number of list entries. Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com Tony Carolla <carolla@xxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 09/23/2004 10:51 AM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To rpg400-l@xxxxxxxxxxxx cc Fax to Subject Key field info I have written a quick little app to list the fields in a physical file, using the QUSCRTUS, QUSPTRUS, QUSLRCD and QUSLFLD APIs. The fields are placed in a subfile, and listed for the user. It's basically like DSPFFD, without all the extra 'stuff' that I don't usually need to see at a glance. Neato. I would like to also indicate which fields are key fields, and what order these key fields are in. I can't see which API would help me with this detail. I don't see any option on the QUSLFLD API to show this, nor on the QUSLRCD API. Also, I don't see a way of knowing how many fields are returned from the QUSLFLD API. I currently have a DS based on a POINTER to the user space, and I increment the pointer after each field retrieval to the subfile. I test the first character of the field name for containing an alpha character, and if it does not, I assume I have reached the end of the loop. Kind of messy, but it works. Is there a better way? TIA Tony Carolla, Programmer/Analyst MedAmerica Billing Services, Inc. -- "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.
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 [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.