Now, Get RPG Codes in all three formats only on this website on every RPGLE related programming article.

Fixed, /Free and Fully Free RPG


Access Path and Types of Access Paths in AS400

Access Path and Types of Access Paths in AS400
Access Path and Types of Access Paths in AS400,access path,types of access path,arrival sequence access path,keyed access path,arrival access path,keyed sequence access path,access path building,Immediate access path ,Rebuild access path,Delayed access path,default access path maintenance,access path example
Access Path and Types of Access Paths in AS400

Access path

A file contains the access path that describes how the records are retrieved from the file.

Types of Access Path

There are two types of access paths on that basis records are retrieved.

  • Arrival sequence (Non-keyed) access path
  • Keyed-sequence access path
  • Arrival sequence (Non-keyed) access path

    The arrival sequence access path retrieves the record in the order the records are stored in the file.

    Keyed-sequence access path

    The keyed-sequence access path retrieves the record in the order of the key field defined in the file. The keyed sequence access path gets updated whenever any record gets added, deleted or the value of the key field gets changed.

    Example of Keyed-Sequence Access Path

  • Create a physical file FILE1 as below
  • A          R RFILE1                    
    A            EMPID          2  0    
    A            EMPNAME       20
    
  • Create a logical file FILE1LF as below
  • A                                      UNIQUE
    A          R RDILE1                    PFILE(FILE1)
    A            EMPID
    A            EMPNAME
    A          K EMPID

    The logical file FILE1LF based on PF FILE1 is a keyed sequence access path having key field EMPID and having Unique records

    Post a Comment

    © AS400 and SQL Tricks. All rights reserved. Developed by Jago Desain