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



The issue is where you store the data and access it. In this case, "the
data" I'm referring to is the field descriptions. Using the API is the
fastest method of generating the field description list, however if the user
space first needs to be created, i.e., it is not already created and out
there somewhere, then you're not going to see a whole lot of difference
between using the QUSLFLD API and DSPFFD. 
Which ever method you use, you then need to store the field descriptions in
some type of multiple occurrence data structure and then loop through it to
locate the field definitions for each record.
An array of qualified data structures is not really needed, but will
accomplish the effect should you want to restrict the code to V5R1 and
later.  In V5R1 they added support for the DIM() keyword to data structures.
This gives you the ability to use the data structure in code as an array.


Bob Cozzi
Cozzi Consulting
www.rpgiv.com


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Peter Colpaert
Sent: Friday, September 12, 2003 3:19 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: User space, outfile or workfile




Scott,

"an array of qualified datastructures".  It's probably due to it being the
end of the week, but I have absolutely no idea what you're talking about.

Care to give an example and explain how to use it?

And no, I don't need the data by key, but definitely by field sequence.

Anyway, looping through the user space is no biggie, I just have to add the
entry length to the pointer of the current entry, and voila, next entry
(this is something I have already done for an improved DSPFFD I made.  It
will be on the website also if and when I get to that).

Thanks,

Peter






                                     I'm assuming that you won't need to
                                     access the data by key?  (I can't
                                     think of a reason that you would!)
                                     Therefore, user space access will be
                                     faster than file access -- no reason
                                     to make a temp file in QTEMP.

                                     Personally, I think I would load the
                                     relevant bits of the user space into
                                     an array of qualified data structures.
                                     An array in main storage will run
                                     slightly faster than user space will
                                     (very slightly) but will be much
                                     easier to read and work with. Since
                                     you'll be looping the array for every
                                     record in the file, you might as well
                                     have something that's easy to work
                                     with :)






      ______________________________________________________________________
   The information contained in this communication is confidential and may
   be legally privileged. It is intended solely for the use of the
   individual or the entity to whom it is addressed and others authorised
   to receive it. If you have received it by mistake, please let the sender
   know by e-mail reply and delete it from your system.
   If you are not the intended recipient you are hereby notified that any
   disclosure, copying, distribution or taking any action in reliance of
   the contents of this information is strictly prohibited and may be
   unlawful.
   Honda Europe NV is neither liable for the proper and complete
   transmission of the information contained in this communication nor for
   any delay in its receipt.



_______________________________________________
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 thread ...

Follow-Ups:
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.