I'm not sure where I learned it, but the *FIRST member of a physical file has nothing to do with the name of the member, and everything to do with which member was created first.  Think of the member names as an array of names; when a member is added, it is always added to the end of the array.  The first element of the array is the *FIRST member

On 11/16/2023 6:10 PM, Roger Harman wrote:
I can't speak to the save issue but....

With no overrides, the default member used by RPG should be *FIRST.

Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power



-----Original Message-----
From: MIDRANGE-L<midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Patrik Schindler
Sent: Thursday, November 16, 2023 4:19 PM
To:midrange-l@xxxxxxxxxxxxxxxxxx
Subject: Multiple members files

Hello,

I have a data PF to which I want to add multiple members on a monthly base, effectively lessening the amount of data to copy to tape daily when running savchgobj. When one record is changed in one huge member, the whole member is saved. With separate "read only" members, I assume only the changed members since the last full-save (manual save or Save 21) are saved. Is this correct?

I also assumed that new data is added to the alphabetically latest member, which is surprisingly not the case and renders my concept moot. I've observed this on V4R5 without DB2 Multisystem installed.

My RPGLE application just opens the file and uses WRITE to create new records. No overrides, no SQL, or other specialities are used so far. New records end up in neither the first nor the last member, alphabetically as well as order of prior running addpfm. This doesn't even change when the application is ended and restarted.

How does the system determine which member is used for new records, in a multi-member data-PF?

I wanted to read about files and members to clarify this question myself but I can't come up with the right place where this might be documented. I remember to have seen a contemporary "Files" documentation in PDF format but I can't find it. So I guess my memory's wrong and the name was something else. Pointers to the correct documentation are welcome!

Thanks!

:wq! PoC
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email:MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:https://lists.midrange.com/mailman/listinfo/midrange-l
or email:MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
athttps://archive.midrange.com/midrange-l.

Please contactsupport@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.


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.