As400 files – a basic question from a newbie

Backup and Recovery
Web development

Answer Wiki



Not a silly question at all. A member is a means of grouping records in the file together.

Most physical files on the AS/400 have a single member, but they can have others added using the ADDPFM (Add Physical File Member) command. Source files are prime examples of multi-member files.

Some applications will create a member in a temporary file for each individual user to keep their records separate during processing. You can use the OVRDBF command to process a particular member when the file is opened.

All the best



Some additional but potentially important info —

Physical files can also have zero members. IBM supplies a number of such files for use in various systems management tasks. The point of these is to supply us with the “file description” without actually having any data. You can copy these ‘model’ files into your work libraries and put your own data into them. An example would be a file that can hold (and describe) a set of entries from the system audit journal — AF entries, for example; audit entries for any Authority Failures that have happened. Physical files with no members are useful because of their descriptive attributes.

Also, actual SQL TABLEs cannot have more than a single member. Although you can use SQL to process native physical files and you can process SQL TABLEs with native I/O operations, you cannot perform native operations on actual SQL TABLEs that affect the number of members. The SQL Standard has no “member” concepts. (SQL can be directed to operate on particular members, but SQL itself can’t choose which member.)


Discuss This Question: 5  Replies

Send me notifications when members answer or reply to this question.
  • WickedWoman
    Astradyne has pretty well nailed the answer but I thought I'd add a little more info. When a file has multiple members each physical file member must be addressed separately. However, logicals can be built over the file that include some or all of the members to allow them to be handled as one file.
    0 pointsBadges:
  • Bamaro70
    The file member is where the data is actually stored. By default, all data files have a default member (*First) that has the same name as the file itself. If you need, you can then add additional members to the file which can be processed separately from other members. For example you may have a Sales file but then have separate members for individual days.
    0 pointsBadges:
  • RIRedCheryl
    Month end or year end processing for various applications is an example of when it is beneficial to use multiple members in one file. We commonly save the current month end data to member using the datestamp or other convention, prior to clearing the *first member for use in accumulating data for the new month or year.
    0 pointsBadges:
  • LuisHernandez
    Something else. You could considerer using members if you need to save the data before and after some process run. You will have only one file (filename) but it will have many members and each one probably will have different data with the same structure (it is the more common approach). You access the member?s data coding 'filename(membername)'. How was mentioned before, you need to be careful with logical file; understand what will happen if you use only the filename (without the membername), how you will code it in one CL to override or select the right member name (some rules about how you built the `membername? could be necessary), and so on. Regards
    0 pointsBadges:
  • CindyB
    A couple of things I didn't see in response to your question. One thing, if you aren't aware of it is that in order to allow multiple members of a file you need to set the Maximum Members (MAXMBRS) parameter to either a number or *NOMAX. The default for MAXMBRS is 1. One reason we use multiple members of a file is for a work file. We have an application that is used for multiple reasons. Many times jobs are run concurrently putting data into different members. After the final set of data is in a member and a report or file is created, the data is saved to tape in case the user needs to use it again or has questions about the data. When the file is backed up to tape, the member and member description is cleared. Each time a member will be used a description is put on the member so that others know it's being used and will find a member without a description. Hope that helps as well.
    0 pointsBadges:

Forgot Password


Your password has been sent to:

To follow this tag...




Share this item with your network: