IBM MainFrame Questions and Answers
Download IBM MainFrame eBook

Download PDF Download IBM MainFrame Questions eBook

IBM MainFrame Questions and Answers: Submit Your Question

Q - 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

Ans- do a loop on below equation . Varying n from 1 to required
value
(2n) + (2n-1)
Is This Answer Correct?    8 Yes 0 No
Submit Your Answer

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

Ans- 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.
Is This Answer Correct?    1 Yes 0 No
Submit Your Answer

Q - 3 How would find total records in files using seqientional?

Ans- We can increment the count for each reading of record in a file.
Read file
count = count + 1
At end
display count
Is This Answer Correct?    1 Yes 0 No
Submit Your Answer

Q - 4 Can 88 level variable be declared in FD section?

Ans- yes
Is This Answer Correct?    0 Yes 3 No
Submit Your Answer

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

Ans- 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
Is This Answer Correct?    0 Yes 0 No
Submit Your Answer

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

Ans- 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.
Is This Answer Correct?    0 Yes 0 No
Submit Your Answer

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

Ans- 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
Is This Answer Correct?    0 Yes 0 No
Submit Your Answer

Q - 8 We have an output dataset in job with disp parameter as SHR.
Can we write data in that file dataset?

Ans- we cannot write when disp is share
Is This Answer Correct?    0 Yes 0 No
Submit Your Answer

Q - 9 How can we increment subscript and index?

Ans- SUBCRIPT:
CAN BE INCREMENT OR DECREMENT USING ARITHMETIC OPERATIONS
INDEX:
CAN BE INCREMENT OR DECREMENT USING SET VERB
Is This Answer Correct?    0 Yes 0 No
Submit Your Answer

Place Your Question