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



I think the comment was more directed at the idea that you need to use a
Datastructure to organise how the fields are stored in memory if you have
any intention of basing other fields over them. You can't just assume they
will be stored in the program in the order they appear in the database file.

Personally, I'm quite happy to have an array based on a Pointer and then
use %Addr() to put the Pointer where I want the array to start.
But I understand that not everyone is comfortable with this technique.

However I wouldn't do that without first using a DS to ensure that the
fields were going to be stored how I expect.
Either a DS I have keyed, with just the fields I want, or using ExtName
based on the file ( assuming the fields are on the file in the correct
sequence ) because It's easier.

I would say the main difference with doing that and the %POS BIF that Jon
is suggesting, is that everything is grouped together in the DS ( The
fields from the file, and the array you have defined over the same storage
) and it is not able to be moved around.
So it's clearer and less prone to scullduggery.

But of course that's just my interpretation :-)
best regards,
Craig



On 15 June 2018 at 15:54, Dan <dan27649@xxxxxxxxx> wrote:

Jon, forgive my ignorance. I saw that you warned against using a pointer
to mark the beginning of an array per Craig's comment in Alan's OP based on
his experience that he'd seen that an array of fields that appear in
sequence in the definition may not appear that way in the input buffer, so
I am unsure why you think that a %POS BIF would fix that. It just seems to
me to be an easier way to define what is essentially a pointer. What am I
missing?

- Dan
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


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.