Ü  Access path

·         Access path describes the order in which records are to be read.

 

·         Access paths can be kept on the system permanently (such as physical or logical file) or temporarily.

 

·         OPNQRYF command may create a temporary access path for use one time, and then discard the access path.   

 

Ü Types of Access Path

·         Arrival sequence access path

·         Keyed sequence access path   

 

·         Arrival sequence access path

ü  Sequentially, where each record is taken from the next sequential physical position in the file.

ü  Directly by relative records number, where the record number is identified by its position from the start of the file.

 

·          Keyed sequence access path

ü  It is based on the contents of the key fields as defined in DDS. This type of access path is updated in the contents of a key field is changed.

ü  There are three ways of bounding the access path:

o   Immediate

o   Rebuild

o   Delayed

 

·        Access path maintenance (MAINT) parameter of a physical file

CHGPF 

                          Change Physical File (CHGPF)                         
                                                                               
 Type choices, press Enter.                                                    
                                                                                
 Physical file  . . . . . . . . .                 Name                         
   Library  . . . . . . . . . . .     *LIBL       Name, *LIBL, *CURLIB         
 System . . . . . . . . . . . . .   *LCL          *LCL, *RMT, *FILETYPE        
 Source file  . . . . . . . . . .   *NONE         Name, *NONE                  
   Library  . . . . . . . . . . .                 Name, *LIBL, *CURLIB         
 Expiration date for member . . .   *SAME         Date, *SAME, *NONE           
 Maximum members  . . . . . . . .   *SAME         Number, *SAME, *NOMAX        
 Access path size . . . . . . . .   *SAME         *SAME, *MAX4GB, *MAX1TB      
 Access path maintenance  . . . .   *SAME         *SAME, *IMMED, *REBLD, *DLY  
 Access path recovery . . . . . .   *SAME         *SAME, *NO, *AFTIPL, *IPL    
 

*** The MAINT parameter specifies how access paths are maintained for closed files.

While a file is open, the system maintains the access paths as changes are made to the data (this data may be key field data of other file) in the file.

But the same data can have access path in multiple file. Some files may be open at that time and some file may be closed at that time. For open file, the access path for will change at the time related data is modified. But for closed file how the access path will change is being decided by this MAINT parameter.

e.g. The account no. field may be used by many a files as a part of composite key field. In such a case if a file is updating this account no. field or adding one more account no.,  in such a case what should be the effect of this change if the other file using this filed is not open at that time the change is made. 

The three ways of maintaining access paths of closed files are:

ü  *IMMED: Immediate maintenance of an access path means that the access path is maintained as changes are made to its associated data, regardless if the file is open.

ü  *REBLD: Rebuild maintenance of an access path means that the access path is only maintained while the file is open, not when the file is closed; the access path is rebuilt when the file is opened the next time. When a file with rebuild maintenance is closed, the system stops maintaining the access path. When the file is opened again, the access path is totally rebuilt.

ü  *DLY: Delayed maintenance of an access path means that any maintenance for the access path is done after the file member is opened the next time and while it remains open. However, the access path is not rebuilt as it is with rebuild maintenance. Updates to the access path are collected from the time the member is closed until it is opened again. When it is opened, only the collected changes are merged into the access path.

*Note: If you do not specify the type of maintenance for a file, the default is immediate maintenance.





User Comments:





Copyright © Go4as400.com, 2013-2017. Copyright notice