What is Alternate Index ? How is it different from regular
index ?
Answers were Sorted based on User's Feedback
Answer / vish
The answer provided by NK is absolutely correct but we
should be very careful whil choosing the alternate index as
it may not be Unique. e.g. in the example given by NK, the
Emp# will always be Unique within a company but many many
employees can have the same name. So if we declare Emp_name
as AIX (i.e. alternate Index) and then use it for fetching
data then we may end up in multiple rows and hence we may
need additonal logic to arrive at the desired unique record.
Your comments are Welcome!!
| Is This Answer Correct ? | 14 Yes | 0 No |
Answer / nk
The purpose of any index is to provide the most efficient
access to the records in a file. Say you have a file of
employee names and numbers. Usually the primary index will
be the employee number. If you request a record by
providing the empl#, the access will be very fast. If you
have to very often request a record by the empl name, you
may want to create a second (a/k/a alternate) index based
on the name. So when you provide a name, the access to the
correct record also will be very fast.
| Is This Answer Correct ? | 10 Yes | 2 No |
What is the Linkage section? What is the Use and Why the parm length use alway "PARM-LENGTH PIC S9(4) or PIC S9 (4) COMP." any reason?.Please let me know any one... Cheers,Prasad
What is 66 level number and where it is used in real time by software developers?
2 Answers ITC Indian Tobacco Company, TCS,
Which is the best IBM mainframe Training Institute in Ameerpet, Hyderabad
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
What is the mode in which you will OPEN a file for writing?
how do u indetify files succesfully executed or not ?
a pic s9(4) comp b pic s9(4) comp-3 c ???????????????? d ???????????????? move a to c add a+B giving d. what is ur declaration for c,d?
How to recover a deleted source physical file from library?
What is difference between comp & comp-4?
Write down the divisions of cobol program?
how to convert vsam table into DB2 table?
i want to learn mainframes. i completed MCA ,whats the future of mainframes