When you are using Different LFs of the same file in one program, There will be a problem of duplication while compiling.
To avoid this we can use RENAME & PREFIX Keyword at the time of LF Declaration in F – Spec.
And You can use SETLL & READE paralally on different LFs without duplicates.
RENAME: we use this keyword for renaming the Record format of that particular file.
PREFIX: By using this keyword we can give the prefix for the field names in File.
Eg: We have TEST(Physical File) and 4 Logical files on the same TEST1, TEST2, TEST3 & TEST4 and considering all 5 having the same record format TESTR.
We can use these keywords like this.
FTEST1 UF A E K DISK PreFix(T1_)
FTEST2 UF A E K DISK PreFix(T2_)
By using the new record formats we can access the same PF paralally.
You can distinguish the fields of the logical files based on PreFix.
Like, T1_Field for TEST1 & T2_Field for TEST2.