Logical file in AS400

Logical file in AS400
Logical file in AS400, lf, dds lf, lf in as400 lf in ibmi ,db2, db2 for i sql, sql, as400 logical files, create, introduction , what is
Logical file in AS400

Introduction

The Logical file (LF) is a database file object that does not contain actual data but denotes how the data is actually retrieved to the RPG or CL program. It is simply an access path to the data over the physical file. Any logical file (LF) cannot exist without the physical file (PF) existence i.e. Logical files (LF) are dependent files of the physical files (PF).

A Logical file (LF) with Keys are Access path (INDEX) over the physical file (PF) and a Logical file (LF) with no key are VIEWS over the physical file (PF).

A logical file (LF) can have a maximum of up to 32 record formats defined in it and has a permanent object on the IBM i system where we can specify filter criteria as well using SELECT or OMIT criteria.

If there is/are Logical files (LF) present for a physical file (PF) then we cannot delete Physical file (PF) until and unless we delete all the dependent Logical files (LF) over that physical file (PF). But Logical file (LF) can be deleted without deleting the Physical file (PF) first.

The Create Logical File (CRTLF) command is used to create the Logical file over the Physical file (PF)

CRTLF FILE(EASYCLASS1/DUMMY)      
      SRCFILE(EASYCLASS1/QDDSSRC) 
      SRCMBR(DUMMY)
CRTLF, Logical file, LF, LF in AS400, Introduction t logical files in as400, ibmi, iseries
CRTLF

We need to provide the LF name, the library where LF gets created, the source file, the source file library, and the source member used to create the LF.

Once the LF is created we see the object of any LF as follows using the WRKOBJ command.LF object has a type of *FILE and attribute as LF.

Logical file, LF object, LF, LF object in AS400, CRTLF in as400,ibmi, CRTLF
Logical file

Types of Logical Files

There are 2 types of Logical files (LF) that exist. Please follow the below link to read about them.

  1. Non-Join Logical File (LF)
  2. Join Logical File (LF)

Related Post

Post a Comment

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