Logical files with the default setting for MAINT(*IMMEDIATE) provide an up-to-date map of the data by updating the map with every add/delete or key change in the file(s).
Logical file with maint(*REBUILD) is very much like a view, it contains the rules and when used will build the required index on the fly. No overhead when it’s not in use, significant when it is. The logical file can be keyed which is useful in native languages, the view can be sorted.
An SQL Index resembles the logical file MAINT(*IMMEDIATE) in that it maintains a map of the data, however, an index does not provide alternate formats or joins.
I’m sure there is more.
Just to add to the discussion.
Logical Files are just a set of indixes providing an ordered access as per the key(s) defined. The data still resides in the physical that the logical is built over.
Howerever, any updates/deletes done via the logical updates teh physical.
Logical files are very useful to reorder the data, but bead in mind the response implications when too many logicals are built ove the same physical. Any update to the physical will trigger updates to all the logicals (especially if *IMMED is specified) and can have an impact on response times.