50 pts.
 DB2/400
Why do I need logical file in DB2/400?

Software/Hardware used:
ASKED: October 23, 2012  3:18 PM

Answer Wiki:
Logical file, we can say as a mirror image or the view of the physical file.
using logical file:
. We can view , insert, update, delete data of a physical file without any worry about deleting the data while compiling, hence provides security to data.
. We can  have multiple physical file view in single logical file
Last Wiki Answer Submitted:  October 27, 2012  7:45 am  by  jatin18   95 pts.
All Answer Wiki Contributors:  jatin18   95 pts. , Michael Tidmarsh   14,000 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Maybe you could give us a little background on what you’re trying to do. 
 
If this is homework, you’ve failed to read the assignment. 
 
DB2/400 logical files are very useful to me. 

 44,630 pts.

 

Why do I need logical file in DB2/400?
 
You don’t need them. Why do you think they are ‘needed’ rather than simply ‘useful’?
 
Tom

 110,115 pts.

 

Logical files are very usefull in getting the selective fields and also selective records from the physical file….
need of logical files is scenario dependent….

 155 pts.

 

If logical files were not need then why do they exist ?There is a benefit and programmers now how to take advantage of them.

 4,115 pts.

 

If logical files were not need then why do they exist ?
 
Many things exist that are not needed. A need can be reduced or eliminated by newer technology. How needed is the CABEQ op-code in RPG IV?
 
My point initially was differentiating between “need” and “utility”. LFs are useful, though not actually “needed”. The differentiation was to get the OP to clarify the question in order to raise it above the homework research level.
 
Tom

 110,115 pts.

 

using logical file:
. We can view , insert, update, delete data of a physical file without any worry about deleting the data while compiling, hence provides security to data.
No, if you add/change/delete data “in the logical file” you are adding/changing/deleting data from the physical file as well. 
Logical file, we can say as a mirror image or the view of the physical file
if you want to go with the mirror analogy, a logical is like a FUNHOUSE mirror, you can see the object (or part of it) in a different way, but you can’t see anything that isn’t already there.

 7,205 pts.

 

Another reason for a LF is security.  For example PAYMAST might be secured to just HR, but a LF over PAYMAST could include only a few fields, so an employee number or address lookup could be authorized to add’l people, such as those doing internal mailing.

 3,115 pts.

 

Another reason for a LF is security.
 
But again, that’s become a “utility” issue rather than a “need”. Since SQL column-level security, and with embedded SQL, DDS LFs for security are no longer the only method.
 
I should mention that I do use DDS LFs (and LFs created/implemented by SQL). I just recognize that there are ways not to use them although alternatives are sometimes not as straightforward.
 
Tom

 110,115 pts.