What is Alternate Index ? How is it different from regular
index ?

Answers were Sorted based on User's Feedback



What is Alternate Index ? How is it different from regular index ?..

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

What is Alternate Index ? How is it different from regular index ?..

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

Post New Answer

More COBOL Interview Questions

how to transfer the file from pc to mainframe??

2 Answers  


I am getting S00F abend when i try to compare two variable of different pic class,one variable is of 9(09) and another is S9(09) comp-3. First i moved the data from S9(09) comp-3 to 9(09), but no luck. So i tried to move the data from S9(09) comp-3 to X (09) and move to 9(09). I am getting same error message, Please help me to find solution for this ptoblem. ERROR MESSAGE - "The system or user abend S00F R=NULL was issued."

1 Answers  


why mainframe we use not like java as frontend oracle as backend. or not word excel.In there also huge ammount data stored.

2 Answers   TCS,


can you declare redefine in level 01?

8 Answers   Patni,


select TURE Statement(s) aboUt eject statemenet in cobol? a)The eject statememnt must be the only statement on the line b.It causes the program to edit abnormally c. eject statement can be written in either area A or area B d. specifies that the next source statement is to be printed at Top of the next page e.The EJECTstatement has no effect on the compilation of the source program itself

2 Answers  






What are differences between COBOL and java ? why we are giving more preference to COBOL ?

3 Answers   TCS,


How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?

0 Answers  


how many bytes does a s9(12)COMP-4 field occupy?? a.2 b.4 c.8 d.1 ans with reason please

2 Answers  


example for sub strings ? and refernce modifications whit output pls

0 Answers   College School Exams Tests, IBM,


What is difference between static and dynamic call in cobol?

0 Answers  


write a program to eliminate duplicate records in a input file and send them to output file.THIS IS IGATE RECENT QUESTIONN.....JUST 1 WEEK BACKKKK...

5 Answers   iGate,


Is it possible to mutliply a comp variable with an comp-3 variable. Will there be any error if i do it?

3 Answers   IBM, UST,


Categories