1. i need the code for this program in cobol.
2+1=3
4+3=7
6+5=11
8+7=15
10+9=19

do a loop on below equation . Varying n from 1 to required
value
(2n) + (2n-1)

2. What is label record is standard or omitted in file description of data division?

Label record is standard means it will use disk files. But
tape files can have standard label too.

If the label record is omitted it should be a the tape file
without any begin and end blocks on the tape.

3. How would find total records in files using seqientional?

We can increment the count for each reading of record in a file.
Read file
count = count + 1
At end
display count

5. Suppose I have 1000 rows in a db2 table. I want to update first 100 records, How do I do it?

is there identity column in this table, for example, if
there is a column indexnum int(supposed start from 1), you
can use the Update Table Set XXX=XXX where indexnum < 101

6. How to handle -911 (deadlock) error in a db2 program so that the program will never abend?

Dead lock time out erro occurs in the following case:
If two or more programs acquired exclusive lock on the
data,which may be needed for other programs without that
data which can not proceed further.

Solution: You can roll back current unit of work for one of
the programs after preset time interval for deadlocks and
terminate that program.

7. select distinct(empid),distinct(dept),name
from EMP
will the above query work?

No, It will not work. SELECT DISTINCT works only for single
cloumn.

DISTINCT can be applied multiple times only when you want
to apply aggregate functions such as COUNT, AVG & SUM.
e.g.
SELECT COUNT(EMPNO)/COUNT(DISTINCT(WORKDEPT)), COUNT
(DISTINCT(JOB))
FROM DSN8810.EMP

9. How can we increment subscript and index?

SUBCRIPT:
CAN BE INCREMENT OR DECREMENT USING ARITHMETIC OPERATIONS
INDEX:
CAN BE INCREMENT OR DECREMENT USING SET VERB